[alsa-devel] commit bd5389278c96f585afcac4058420e4f3ac201d2a introduce big problem

Takashi Iwai tiwai at suse.de
Tue Nov 8 10:49:31 CET 2011


At Tue, 8 Nov 2011 17:16:33 +0800,
Scott Jiang wrote:
> 
> Hi Takash,
> 
> commit bd5389278c96f585afcac4058420e4f3ac201d2a
> Author: Takashi Iwai <tiwai at suse.de>
> Date:   Fri Aug 21 01:18:00 2009 +0200
> 
>     pcm: workaround for avoiding automatic start in mmap mode
> 
>     In the normal mmap mode, the stream isn't started automatically even after
>     the data >= start_threshold has been written.   However, in the
>     mmap-emulation mode, the stream is started because it uses
>     snd_pcm_write_areas() internally.
> 
>     As a workaround for this inconsistency, start_threshold value is changed
>     dynamically in sw_parmams and mmap_commit callbacks in mmap-emul plugin.
>     Meanwhile, start_threshold for slave PCM is set to boundary so that only
>     this plugin (or the one over it) can control the start of the stream.
> 
>     This will fix problems in some apps using pulse plugin in the mmap mode.
> 
>     Signed-off-by: Takashi Iwai <tiwai at suse.de>
> 
> src/pcm/pcm_mmap_emul.c
> 
> This commit caused codec using mmap-emul plugin can't work.
> My config file list below:
> 
> bfin-ad1836.pcm.default {
>         @args [ CARD ]
>         @args.CARD {
>                 type string
>         }
>         type plug
>         slave.pcm {
>                 type mmap_emul
>                 slave.pcm {
>                         type hw
>                         card $CARD
>                         format S32_LE
>                         rate 48000
>                 }
>         }
> }
> 
> Alsa will not send SNDRV_PCM_IOCTL_START to driver.

And how are you testing it?  The whole background is missing...


Takashi


More information about the Alsa-devel mailing list