Re: [alsa-devel] ALSA DMIX support without MMAP ?
mmap is supported by the Samsung drivers.
Thanks for this information which i overlooked.
This looks like the dmix data rates are getting out of sync with what the hardware is doing. Enabling CONFIG_SND_PCM_XRUN_DEBUG will produce more diagnostic information from the driver side
I got the problem and after doing the changes DMIX plugin is working very fine. As you know XRUN was happening and this happening in snd_pcm_update_hw_ptr_post function. This happened because stop_threshold is increased suddenly(Is it done by dmix? If yes then why ?) ?????? In normal condtions this would have been fine but in my code i was multiplying it by some amount causing it to wrap around(stop_threshold=0 );Causing XRUN.So i just removed this multiplying factor.
One more Rate conversion query: ./alsa_aplay -v -D"plug:'dmix:RATE=44100'" bond.wav Playing WAVE 'bond.wav' : Unsigned 8 bit, Rate 11025 Hz, Mono Plug PCM: Rate conversion PCM (44100, sformat=U8) As you can see bond.wav is sampled at 11025k but when i am playing with Plug PCM there is some noise in the song why????Is rate conversion algoritm not able to resample it properly?
If i play with ./alsa_aplay -v -D"plug:'dmix:RATE=11025'" bond.wav then no noise.Probably because no resampling happening?
Mark Brown Heartfelt Thanks for your time.
On Thu, 14 Jan 2010, ANISH KUMAR wrote:
mmap is supported by the Samsung drivers.
Thanks for this information which i overlooked.
This looks like the dmix data rates are getting out of sync with what the hardware is doing. Enabling CONFIG_SND_PCM_XRUN_DEBUG will produce more diagnostic information from the driver side
I got the problem and after doing the changes DMIX plugin is working very fine. As you know XRUN was happening and this happening in snd_pcm_update_hw_ptr_post function. This happened because stop_threshold is increased suddenly(Is it done by dmix? If yes then why ?) ?????? In normal condtions this would have been fine but in my code i was multiplying it by some amount causing it to wrap around(stop_threshold=0 );Causing XRUN.So i just removed this multiplying factor.
For dmix, the stop_threshold should be equal to boundary value, thus XRUN check should never be true. If you got xrun with dmix, something is wrong.
One more Rate conversion query: ./alsa_aplay -v -D"plug:'dmix:RATE=44100'" bond.wav Playing WAVE 'bond.wav' : Unsigned 8 bit, Rate 11025 Hz, Mono Plug PCM: Rate conversion PCM (44100, sformat=U8) As you can see bond.wav is sampled at 11025k but when i am playing with Plug PCM there is some noise in the song why????Is rate conversion algoritm not able to resample it properly?
The default linear resampler is not very good quality. You may use some sox resamplers from the alsa-plugins package, but they're more CPU intensive. Check google.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
participants (2)
-
ANISH KUMAR
-
Jaroslav Kysela