[alsa-devel] Separate dma driver for cpu_dais
jassisinghbrar at gmail.com
Thu Feb 18 03:14:57 CET 2010
On Wed, Feb 17, 2010 at 10:14 PM, Mark Brown
<broonie at opensource.wolfsonmicro.com> wrote:
> On Wed, Feb 17, 2010 at 09:15:56PM +0900, jassi brar wrote:
>> On Wed, Feb 17, 2010 at 7:52 PM, Mark Brown
>> > What modifications are you looking for here? ASoC doesn't make any
>> > effort to avoid reuse of DAIs in multiple links - it doesn't actively do
>> > anything to help here but equally well it's not supposed to get in the
>> > way.
>> The workaround to enable a cpu_dai to be used in multiple dai_links isn't
> What workaround?
The same as that for codec_dai.
cpu_dai is used exact the same way as codec_dai except for runtime
pointer assignment in soc_pcm_open as i mentioned already.
>> going to work as such because of cpu_dai->runtime = runtime done
>> in soc_pcm_open.
>> Luckily for codec_dai, we can use the same in more than one dai_link.
> Right, OK - CPU DAIs don't come up so much so I've not noticed that.
Though, from what I have seen, except atmel-pcm.c, no driver reads
snd_pcm_runtime from the cpu_dai. And atmel-pcm.c can be easily
modified to accommodate any change.
So, it seems, the member 'struct snd_pcm_runtime *' of 'struct snd_soc_dai'
is mostly unused. We can easily move it to 'struct snd_soc_dai_link' or
even drop it altogether to reduce redundancy(I prefer).
More information about the Alsa-devel