alsa driver problem
Dear all:
i meet some problem in using the ALSA in the ARM base SOC. the get avail_min return zero! but it is have value in the debug info.
output from the driver.
Rule 1 [bf00713c]: SAMPLE_BITS = [16 16] -> [16 16]
Rule 2 [bf0072a4]: SAMPLE_BITS = [16 16] -> [16 16]
Rule 3 [bf007240]: FRAME_BITS = [32 32] -> [32 32]
Rule 4 [bf007370]: FRAME_BITS = [32 32] -> [32 32]
Rule 5 [bf007370]: FRAME_BITS = [32 32] -> [32 32]
Rule 6 [bf0072a4]: CHANNELS = [2 2] -> [2 2]
Rule 7 [bf007370]: RATE = [44100 44100] -> [44100 44100] Rule 8 [bf007370]: RATE = [44100 44100] -> [44100 44100] Rule 9 [bf0072a4]: PERIODS = [4 4] -> [4 4]
Rule 10 [bf0072a4]: PERIOD_SIZE = [4096 4096] -> [4096 4096] Rule 11 [bf007370]: PERIOD_SIZE = [4096 4096] -> [4096 4096] Rule 12 [bf007308]: PERIOD_SIZE = [4096 4096] -> [4096 4096] Rule 13 [bf007240]: BUFFER_SIZE = [16384 16384] -> [16384 16384] Rule 14 [bf007370]: BUFFER_SIZE = [16384 16384] -> [16384 16384] Rule 15 [bf007308]: BUFFER_SIZE = [16384 16384] -> [16384 16384] Rule 16 [bf007308]: PERIOD_BYTES = [16384 16384] -> [16384 16384] Rule 17 [bf007308]: BUFFER_BYTES = [65536 65536] -> [65536 65536] Rule 18 [bf007370]: PERIOD_TIME = (92879 92880) -> (92879 92880) Rule 19 [bf007370]: BUFFER_TIME = (371519 371520) -> (371519 371520) Rule 20 [bf033c00]: CHANNELS = [2 2] -> [2 2]
Rule 21 [bf033e74]: RATE = [44100 44100]s->codec_idx:0x0,s->rate_idx:0x0 -> [44100 44100]
Rule 22 [bf0062ec]: BUFFER_BYTES = [65536 65536] -> [65536 65536]
output form the aplayer.....start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 4096xfer_align: 4096silence_threshold: 0silence_size: 0
boundary: 1073741824
aplay: set_params:1013: snd_pcm_sw_params
ALSA lib pcm.c:873:(snd_pcm_sw_params) params->avail_min is 0
aplay: set_params:1017: unable to install sw params:start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 0xfer_align: 113608silence_threshold: 0silence_size: 0
boundary: 1073741824
when i force the avail_min to 4096, the whole system work well. who can tell me any idea?
Thanks!
Br
Thomas
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Quoted 3 lines · thomas.luo
when i force the
avail_minto 4096, the whole system work well. who can tell me any idea?
This may be related to a compiler optimisation bug for ARM that caused PCM refinement to fail.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27363
More info can be found by searching the archives.
Liam
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
----- Original Message ----- From: "Liam Girdwood" <[email protected]>
To: "thomas.luo" <[email protected]>
Cc: <[email protected]>
Sent: Friday, January 12, 2007 10:23 PM
Subject: Re: [Alsa-devel] alsa driver problem
Quoted 6 lines · thomas.luo
Quoted 4 lines
when i force the
avail_minto 4096, the whole system work well. who can tell me any idea?
Quoted 9 lines
This may be related to a compiler optimisation bug for ARM that caused PCM refinement to fail.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27363
More info can be found by searching the archives.
Liam
Dear Liam:
i have apply this patch, but it is same. this is my code in the aplay.
sleep(1);snd_pcm_hw_params_dump(params, log);
sleep(1);
error(_("chunk_size:%x\n"),chunk_size); snd_pcm_hw_params_get_period_size(params, &chunk_size, 0); //chunk_size =4096; error(_("chunk_size:%x\n"),chunk_size);
sleep(1);snd_pcm_hw_params_dump(params, log);
sleep(1);
and the output.
Rule 1 [bf00713c]: SAMPLE_BITS = [16 16] -> [16 16]
Rule 2 [bf0072a4]: SAMPLE_BITS = [16 16] -> [16 16]
Rule 3 [bf007240]: FRAME_BITS = [32 32] -> [32 32]
Rule 4 [bf007370]: FRAME_BITS = [32 32] -> [32 32]
Rule 5 [bf007370]: FRAME_BITS = [32 32] -> [32 32]
Rule 6 [bf0072a4]: CHANNELS = [2 2] -> [2 2]
Rule 7 [bf007370]: RATE = [44100 44100] -> [44100 44100] Rule 8 [bf007370]: RATE = [44100 44100] -> [44100 44100] Rule 9 [bf0072a4]: PERIODS = [4 4] -> [4 4]
Rule 10 [bf0072a4]: PERIOD_SIZE = [4096 4096] -> [4096 4096] Rule 11 [bf007370]: PERIOD_SIZE = [4096 4096] -> [4096 4096] Rule 12 [bf007308]: PERIOD_SIZE = [4096 4096] -> [4096 4096] Rule 13 [bf007240]: BUFFER_SIZE = [16384 16384] -> [16384 16384] Rule 14 [bf007370]: BUFFER_SIZE = [16384 16384] -> [16384 16384] Rule 15 [bf007308]: BUFFER_SIZE = [16384 16384] -> [16384 16384] Rule 16 [bf007308]: PERIOD_BYTES = [16384 16384] -> [16384 16384] Rule 17 [bf007308]: BUFFER_BYTES = [65536 65536] -> [65536 65536] Rule 18 [bf007370]: PERIOD_TIME = (92879 92880) -> (92879 92880) Rule 19 [bf007370]: BUFFER_TIME = (371519 371520) -> (371519 371520) Rule 20 [bf033c00]: CHANNELS = [2 2] -> [2 2]
Rule 21 [bf033e74]: RATE = [44100 44100]s->codec_idx:0x0,s->rate_idx:0x0 -> [44100 44100]
Rule 22 [bf0062ec]: BUFFER_BYTES = [65536 65536] -> [65536 65536]
ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 32 CHANNELS: 2 RATE: 44100 PERIOD_TIME: (92879 92880) PERIOD_SIZE: 4096 PERIOD_BYTES: 16384 PERIODS: 4 BUFFER_TIME: (371519 371520) BUFFER_SIZE: 16384 BUFFER_BYTES: 65536 TICK_TIME: 10000 aplay: set_params:968: chunk_size:400
aplay: set_params:971: chunk_size:0
ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 32 CHANNELS: 2 RATE: 44100 PERIOD_TIME: (92879 92880) PERIOD_SIZE: 4096 PERIOD_BYTES: 16384 PERIODS: 4 BUFFER_TIME: (371519 371520) BUFFER_SIZE: 16384 BUFFER_BYTES: 65536 TICK_TIME: 10000 start_mode: DATA xrun_mode: STOP tstamp_mode: NONE period_step: 1 sleep_min: 0 avail_min: 4096 xfer_align: 4096 silence_threshold: 0 silence_size: 0 boundary: 1073741824 aplay: set_params:1024: snd_pcm_sw_params
ALSA lib pcm.c:873:(snd_pcm_sw_params) params->avail_min is 0
aplay: set_params:1028: unable to install sw params:start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 0xfer_align: 114112silence_threshold: 0silence_size: 0
boundary: 1073741824
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Quoted 1 line · thomas.luo
i have apply this patch, but it is same. this is my code in the aplay.
Iirc, you need to rebuild your kernel and alsa-lib before the optimisation issue goes away. If this doesn't help, then it looks like your issue is caused by something else.
Liam
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV