[alsa-devel] [PATCH] ASoC: Allocate PCM operations dynamically to support multiple DAIs

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Dec 27 11:34:02 CET 2011


On Tue, Dec 27, 2011 at 04:49:46PM +0900, Sangsu Park wrote:
> > On Fri, Dec 23, 2011 at 10:37:51AM +0900, Sangbeom Kim wrote:

> +       struct snd_pcm_ops *soc_pcm_ops = platform->driver->ops;
>         struct snd_pcm *pcm;
>         char new_name[64];
>         int ret = 0, playback = 0, capture = 0;
> 
>         if (playback)
> -               snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &soc_pcm_ops);
> +               snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, soc_pcm_ops);
> 
>         if (capture)
> -               snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &soc_pcm_ops);
> +               snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, soc_pcm_ops);

> But, it seems to make mutex dead lock.
> When starting playback, it tells some messages.

We still need to use the indirections in the SoC ops in the same way as
we do at present so that the DAI drivers and DAPM get called as well.


More information about the Alsa-devel mailing list