기존 이솝 임베디드 포럼의 지식인 서비스가 게시판 형태로 변경되었습니다.

오늘 가입한 리눅스 초보자인데요. 프로젝트 수행관련해서 질문드립니다.

SMDK2440A에 리눅스 2.6 커널을 올렸습니다.

제가 하고 싶은 건 mp3 파일을 디코드해서 실제 사운드를 내보내는 것입니다.
mp3 decoding은 libmad를 porting해서 pcm data를 만들건데,
decoding된 데이터를 내보내는 sound driver를 구현하자니 막막합니다.

예제로 볼수 있거나 실행가능한 smdk2440용 sound device driver code와 playing application 샘플에 대한 정보를 찾을만한 곳이 있을까요?
PDS에 비슷한 파일이 올려있는 것 같기는 한데 컴파일 방법이나 실행 방법에 대해 전혀 아이디어가 없어서요.... OTL

감사합니다.

고현철

2006.10.27 02:14:42
*.117.46.252

pds의 파일 중

oss.c 파일에서

audio_fd = open("/dev/dsp", O_RDONLY, 0);
if (audio_fd < 0)
{
printf("Cannot open /dev/dsp ==> open /dev/sound/dsp n");
audio_fd = open("/dev/sound/dsp", O_RDONLY, 0); // devfs때문
if (audio_fd < 0)
{
printf("Cannot open /dev/sound/dspn");
return -1;
}
}

이 부분 중 O_RDONLY를 O_WRONLY로 바꾸시고, oss_write함수를 쓰면 그냥 play가 가능합니다.

file에서 읽어서 넣어주면 됩니다.

ps> 물론 sound driver가 잡혀있어야 합니다.

고현철

2006.10.27 02:14:58
*.117.46.252

컴파일은 make depend;make 하면 됩니다.

조성현

2006.10.27 18:51:45
*.94.41.89

에궁... sound driver 잡는 법 좀 가르켜주세요.
PDS에 있는 aesop2440_audio 파일을 컴파일하려고 했더니 오류 마구 뜹니다.
어디서부터 고치기 시작해야 할 지 막막한데 조언주시면 감사하겠습니다...

=================
aesop2440_sound.c:52: linux/dma-mapping.h: 해당 파일을 찾을 수 없습니다.
aesop2440_sound.c:59: asm/hardware/clock.h: 해당 파일을 찾을 수 없습니다.
aesop2440_sound.c:61: asm/arch/regs-iis.h: 해당 파일을 찾을 수 없습니다.
aesop2440_sound.c:63: aesop2440-audio.h: 해당 파일을 찾을 수 없습니다.
aesop2440_sound.c:115: parse error before `s3c2410_dma_client_t'
aesop2440_sound.c:115: warning: no semicolon at end of struct or union
aesop2440_sound.c:116: warning: type defaults to `int' in declaration of `audio_stream_t'
aesop2440_sound.c:116: warning: data definition has no type or storage class
aesop2440_sound.c:123: parse error before `output_stream'
aesop2440_sound.c:123: warning: type defaults to `int' in declaration of `output_stream'
aesop2440_sound.c:123: warning: data definition has no type or storage class
aesop2440_sound.c:124: parse error before `input_stream'
aesop2440_sound.c:124: warning: type defaults to `int' in declaration of `input_stream'
aesop2440_sound.c:124: warning: data definition has no type or storage class
aesop2440_sound.c:131: parse error before `->'
aesop2440_sound.c:131: stray '' in program
aesop2440_sound.c:132: parse error before `->'
aesop2440_sound.c:132: stray '' in program
aesop2440_sound.c:133: parse error before `->'
aesop2440_sound.c:155: parse error before `*'
aesop2440_sound.c:156: warning: function declaration isn't a prototype
aesop2440_sound.c: In function `audio_clear_buf':
aesop2440_sound.c:159: `s' undeclared (first use in this function)
aesop2440_sound.c:159: (Each undeclared identifier is reported only once
aesop2440_sound.c:159: for each function it appears in.)
aesop2440_sound.c:166: warning: implicit declaration of function `s3c2410_dma_ctrl'
aesop2440_sound.c:166: `S3C2410_DMAOP_FLUSH' undeclared (first use in this function)
aesop2440_sound.c:176: warning: implicit declaration of function `dma_free_coherent'
aesop2440_sound.c: At top level:
aesop2440_sound.c:191: parse error before `*'
aesop2440_sound.c:192: warning: function declaration isn't a prototype
aesop2440_sound.c: In function `audio_setup_buf':
aesop2440_sound.c:198: `s' undeclared (first use in this function)
aesop2440_sound.c:222: warning: implicit declaration of function `dma_alloc_coherent'
aesop2440_sound.c:222: warning: assignment makes pointer from integer without a cast
aesop2440_sound.c: At top level:
aesop2440_sound.c:262: parse error before `*'
aesop2440_sound.c:263: warning: function declaration isn't a prototype
aesop2440_sound.c: In function `audio_reset_buf':
aesop2440_sound.c:266: `s' undeclared (first use in this function)
aesop2440_sound.c:268: `S3C2410_DMAOP_FLUSH' undeclared (first use in this function)
aesop2440_sound.c: At top level:
aesop2440_sound.c:284: parse error before `*'
aesop2440_sound.c:285: warning: function declaration isn't a prototype
aesop2440_sound.c: In function `audio_dmaout_done_callback':
aesop2440_sound.c:286: `buf' undeclared (first use in this function)
aesop2440_sound.c:289: request for member `frag_wq' in something not a structure or union
aesop2440_sound.c:291: `result' undeclared (first use in this function)
aesop2440_sound.c:291: `S3C2410_RES_OK' undeclared (first use in this function)aesop2440_sound.c: At top level:
aesop2440_sound.c:300: parse error before `*'
aesop2440_sound.c:301: warning: function declaration isn't a prototype
aesop2440_sound.c: In function `audio_dmain_done_callback':
aesop2440_sound.c:302: `buf' undeclared (first use in this function)
aesop2440_sound.c:304: `size' undeclared (first use in this function)
aesop2440_sound.c:306: request for member `frag_wq' in something not a structure or union
aesop2440_sound.c:308: `result' undeclared (first use in this function)
aesop2440_sound.c:308: `S3C2410_RES_OK' undeclared (first use in this function)aesop2440_sound.c: In function `audio_sync':
aesop2440_sound.c:318: `s' undeclared (first use in this function)
aesop2440_sound.c:319: parse error before `*'
aesop2440_sound.c:326: `b' undeclared (first use in this function)
aesop2440_sound.c:329: warning: implicit declaration of function `s3c2410_dma_enqueue'
aesop2440_sound.c:331: stray '' in program
aesop2440_sound.c:342: parse error before `static'
aesop2440_sound.c:348: `from' undeclared (first use in this function)
aesop2440_sound.c:348: `count' undeclared (first use in this function)
aesop2440_sound.c:355: warning: type defaults to `int' in declaration of `type
name'
aesop2440_sound.c:357: `dst' undeclared (first use in this function)
aesop2440_sound.c:360: `end' undeclared (first use in this function)
aesop2440_sound.c:366: warning: type defaults to `int' in declaration of `type
name'
aesop2440_sound.c:380: warning: type defaults to `int' in declaration of `type
name'
aesop2440_sound.c: In function `aesop2440_audio_write':
aesop2440_sound.c:391: `s' undeclared (first use in this function)
aesop2440_sound.c:392: parse error before `int'
aesop2440_sound.c:417: `ret' undeclared (first use in this function)
aesop2440_sound.c:430: `chunksize' undeclared (first use in this function)
aesop2440_sound.c:448: warning: implicit declaration of function `copy_from_user_mono_stereo'
aesop2440_sound.c:468: stray '' in program
aesop2440_sound.c:479: parse error before `static'
aesop2440_sound.c:484: parse error before `int'
aesop2440_sound.c:514: stray '' in program
aesop2440_sound.c:544: warning: passing arg 1 of `copy_to_user' discards qualifiers from pointer target type
aesop2440_sound.c:565: stray '' in program
aesop2440_sound.c:576: parse error before `static'
aesop2440_sound.c:586: request for member `active' in something not a structure or union
aesop2440_sound.c:588: request for member `buffers' in something not a structure or union
aesop2440_sound.c:591: request for member `frag_wq' in something not a structure or union
aesop2440_sound.c:591: `wait' undeclared (first use in this function)
aesop2440_sound.c:593: request for member `nbfrags' in something not a structure or union
aesop2440_sound.c:595: request for member `buffers' in something not a structure or union
aesop2440_sound.c:596: `mask' undeclared (first use in this function)
aesop2440_sound.c:603: request for member `active' in something not a structure or union
aesop2440_sound.c:605: request for member `buffers' in something not a structure or union
aesop2440_sound.c:607: request for member `frag_wq' in something not a structure or union
aesop2440_sound.c:611: request for member `nbfrags' in something not a structure or union
aesop2440_sound.c:613: request for member `buffers' in something not a structure or union
aesop2440_sound.c:623: parse error before `static'
aesop2440_sound.c:627: warning: control reaches end of non-void function
aesop2440_sound.c: In function `iispsr_value':
aesop2440_sound.c:646: warning: implicit declaration of function `clk_get_rate'aesop2440_sound.c:646: warning: implicit declaration of function `clk_get'
aesop2440_sound.c:646: `S_CLOCK_FREQ' undeclared (first use in this function)
aesop2440_sound.c: In function `audio_set_dsp_speed':
aesop2440_sound.c:687: `S_CLOCK_FREQ' undeclared (first use in this function)
aesop2440_sound.c:695: request for member `rate' in something not a structure or union
aesop2440_sound.c:695: request for member `rate' in something not a structure or union
aesop2440_sound.c:684: warning: `tmp' might be used uninitialized in this function
aesop2440_sound.c: At top level:
aesop2440_sound.c:703: parse error before `*'
aesop2440_sound.c:704: warning: function declaration isn't a prototype
aesop2440_sound.c: In function `audio_set_fragments':
aesop2440_sound.c:705: `s' undeclared (first use in this function)
aesop2440_sound.c:709: `val' undeclared (first use in this function)
aesop2440_sound.c: In function `aesop2440_audio_ioctl':
aesop2440_sound.c:770: request for member `fragsize' in something not a structure or union
aesop2440_sound.c:772: request for member `fragsize' in something not a structure or union
aesop2440_sound.c:803: `s' undeclared (first use in this function)
aesop2440_sound.c:804: parse error before `*'
aesop2440_sound.c:806: `flag' undeclared (first use in this function)
aesop2440_sound.c:806: `sum' undeclared (first use in this function)
aesop2440_sound.c:806: `inf' undeclared (first use in this function)
aesop2440_sound.c:807: parse error before `)'
aesop2440_sound.c:817: `err' undeclared (first use in this function)
aesop2440_sound.c:823: `i' undeclared (first use in this function)
aesop2440_sound.c:830: `frags' undeclared (first use in this function)
aesop2440_sound.c:831: `bytes' undeclared (first use in this function)
aesop2440_sound.c:835: warning: type defaults to `int' in declaration of `__r1'aesop2440_sound.c:835: warning: type defaults to `int' in declaration of `__p'
aesop2440_sound.c:836: warning: type defaults to `int' in declaration of `__r1'aesop2440_sound.c:836: warning: type defaults to `int' in declaration of `__p'
aesop2440_sound.c:837: warning: type defaults to `int' in declaration of `__r1'aesop2440_sound.c:837: warning: type defaults to `int' in declaration of `__p'
aesop2440_sound.c:838: warning: type defaults to `int' in declaration of `__r1'aesop2440_sound.c:838: warning: type defaults to `int' in declaration of `__p'
aesop2440_sound.c:842: case label not within a switch statement
aesop2440_sound.c:845: parse error before `*'
aesop2440_sound.c:847: parse error before `)'
aesop2440_sound.c:870: warning: type defaults to `int' in declaration of `__r1'aesop2440_sound.c:870: warning: type defaults to `int' in declaration of `__p'
aesop2440_sound.c:871: warning: type defaults to `int' in declaration of `__r1'aesop2440_sound.c:871: warning: type defaults to `int' in declaration of `__p'
aesop2440_sound.c:872: warning: type defaults to `int' in declaration of `__r1'aesop2440_sound.c:872: warning: type defaults to `int' in declaration of `__p'
aesop2440_sound.c:873: warning: type defaults to `int' in declaration of `__r1'aesop2440_sound.c:873: warning: type defaults to `int' in declaration of `__p'
aesop2440_sound.c:874: break statement not within loop or switch
aesop2440_sound.c: At top level:
aesop2440_sound.c:877: parse error before `case'
aesop2440_sound.c: In function `aesop2440_audio_open':
aesop2440_sound.c:948: request for member `fragsize' in something not a structure or union
aesop2440_sound.c:949: request for member `nbfrags' in something not a structure or union
aesop2440_sound.c:950: request for member `channels' in something not a structure or union
aesop2440_sound.c:954: request for member `frag_wq' in something not a structure or union
aesop2440_sound.c:958: request for member `fragsize' in something not a structure or union
aesop2440_sound.c:959: request for member `nbfrags' in something not a structure or union
aesop2440_sound.c:960: request for member `channels' in something not a structure or union
aesop2440_sound.c:964: request for member `frag_wq' in something not a structure or union
aesop2440_sound.c: At top level:
aesop2440_sound.c:1078: parse error before `*'
aesop2440_sound.c:1082: warning: function declaration isn't a prototype
aesop2440_sound.c: In function `audio_init_dma':
aesop2440_sound.c:1085: `s' undeclared (first use in this function)
aesop2440_sound.c:1085: `S3C2410_DMA_CH2' undeclared (first use in this function)
aesop2440_sound.c:1087: warning: implicit declaration of function `s3c2410_dma_request'
aesop2440_sound.c:1093: warning: implicit declaration of function `s3c2410_dma_config'
aesop2440_sound.c:1093: `S3C2410_DCON_CH2_I2SSDO' undeclared (first use in this function)
aesop2440_sound.c:1093: `S3C2410_DCON_SYNC_PCLK' undeclared (first use in this
function)
aesop2440_sound.c:1093: `S3C2410_DCON_HANDSHAKE' undeclared (first use in this
function)
aesop2440_sound.c:1096: warning: implicit declaration of function `s3c2410_dma_setflags'
aesop2440_sound.c:1096: `S3C2410_DMAF_AUTOSTART' undeclared (first use in this
function)
aesop2440_sound.c:1098: warning: implicit declaration of function `s3c2410_dma_set_buffdone_fn'
aesop2440_sound.c:1099: warning: implicit declaration of function `s3c2410_dma_devconfig'
aesop2440_sound.c:1099: `S3C2410_DMASRC_MEM' undeclared (first use in this function)
aesop2440_sound.c:1099: `BUF_ON_APB' undeclared (first use in this function)
aesop2440_sound.c:1107: `S3C2410_DMA_CH1' undeclared (first use in this function)
aesop2440_sound.c:1115: `S3C2410_DCON_SRCSHIFT' undeclared (first use in this function)
aesop2440_sound.c:1121: `S3C2410_DMASRC_HW' undeclared (first use in this function)
aesop2440_sound.c: At top level:
aesop2440_sound.c:1131: parse error before `*'
aesop2440_sound.c:1132: warning: function declaration isn't a prototype
aesop2440_sound.c: In function `audio_clear_dma':
aesop2440_sound.c:1133: warning: implicit declaration of function `s3c2410_dma_free'
aesop2440_sound.c:1133: `s' undeclared (first use in this function)
aesop2440_sound.c: At top level:
aesop2440_sound.c:1146: `aesop2440_audio_llseek' undeclared here (not in a function)
aesop2440_sound.c:1146: initializer element is not constant
aesop2440_sound.c:1146: (near initialization for `aesop2440_audio_fops.llseek')aesop2440_sound.c:1148: `aesop2440_audio_read' undeclared here (not in a function)
aesop2440_sound.c:1148: initializer element is not constant
aesop2440_sound.c:1148: (near initialization for `aesop2440_audio_fops.read')
aesop2440_sound.c:1149: `aesop2440_audio_poll' undeclared here (not in a function)
aesop2440_sound.c:1149: initializer element is not constant
aesop2440_sound.c:1149: (near initialization for `aesop2440_audio_fops.poll')
aesop2440_sound.c:1154: initializer element is not constant
aesop2440_sound.c:1154: (near initialization for `aesop2440_audio_fops.owner')
aesop2440_sound.c:1154: initializer element is not constant
aesop2440_sound.c:1154: (near initialization for `aesop2440_audio_fops.owner')
aesop2440_sound.c:1154: initializer element is not constant
aesop2440_sound.c:1154: (near initialization for `aesop2440_audio_fops')
aesop2440_sound.c: In function `aesop2440_audio_probe':
aesop2440_sound.c:1236: request for member `dma_ch' in something not a structure or union
aesop2440_sound.c:1236: `S3C2410_DMA_CH2' undeclared (first use in this function)
aesop2440_sound.c:1237: request for member `dmaclient' in something not a structure or union
aesop2440_sound.c:1245: request for member `dma_ch' in something not a structure or union
aesop2440_sound.c:1245: `S3C2410_DMA_CH1' undeclared (first use in this function)
aesop2440_sound.c:1246: request for member `dmaclient' in something not a structure or union
aesop2440_sound.c: At top level:
aesop2440_sound.c:126: warning: `ao_dcon' defined but not used
aesop2440_sound.c:126: warning: `ai_dcon' defined but not used
aesop2440_sound.c:150: warning: `set_iis_bus_to_duplex_mode' declared `static'
but never defined
aesop2440_sound.c:263: warning: `audio_reset_buf' defined but not used
make: *** [aesop2440_sound.o] 오류 1

고현철

2006.10.27 20:25:41
*.117.46.252

커널을 재 포팅하셔야 할 듯 하네요....

aesop sound driver를 커널에 맞게 맞춰야 할 듯 합니다.
쉽게 말로 설명할 수 없는 문제인 듯....
List of Articles
번호 제목 글쓴이 날짜sort 조회 수
6188 rebis보드에 카메라 모듈에 과한 질문입니다. [2] 노현우 2006-10-01 1161
6187 이홍석님의 패키지를 따라하다가 문제가 좀 있네요. <==[완료] [4] 박영학 2006-10-02 1825
6186 USB자동 마운트 결과 <== [완료] [1] 박영학 2006-10-03 1120
6185 고도리님 DM9000A 판매처? [1] 윤광윤 2006-10-05 907
6184 혹시 실수 연산을 정수 연산으로 바꿔주는 lib 같은거 있나요? &... [1] 한승혁 2006-10-05 1424
6183 VOIP 관련 오디오코덱자료를 얻으려면 ... [1] 장석원 2006-10-06 965
6182 s3c2413 보드에 리눅스커널2.6의 시리얼콘솔을 새로 포팅하려 하는데 ... [1] 장석원 2006-10-08 1165
6181 u-boot 1.1.4의 u-boot-arm.h 관련 질문...입니다..[완료] [2] 손진호 2006-10-14 1132
6180 이재훈님의 OPIE, TSLIB 해보신분 계신가요? <==[완료] [4] 박영학 2006-10-14 1036
6179 3차보든 언제 나오는지요 [3] 김영호 2006-10-19 1070
6178 밑에 글에 이어서 SD에 포팅에 대하여<=[완료] [6] 서성준 2006-10-20 1536
6177 오늘 가입한 신입인데요..궁금한게 있어서요.. [1] 김영일 2006-10-20 917
6176 [궁금] 3차 공제와 관련해서.. <= [완료] [3] 이득재 2006-10-22 1313
6175 SD/MMC 모듈 올린후<=[완료] [5] 서성준 2006-10-24 1472
6174 [s3c2440] FTDI USB Serial converter사용하고 싶은데요??[완료... [8] 김창연 2006-10-24 7853
6173 [질문] printf 에 관해 <= [완료] [2] 양용현 2006-10-26 856
» SMDK2440A 오디오 재생 관련 [4] 조성현 2006-10-27 1431
6171 부트로더에서 자동부팅을할려구하는데요..<==완료 [1] 윤현승 2006-10-27 954
6170 cs8900에서 받는 irq 핀을 변경하려는데... [2] 이율삼 2006-10-30 964
6169 s3c2440에서 터치스크린 설정시 ==> [완료] [7] 강권일 2006-11-01 1584

사용자 로그인