>-----Original Message-----
>From: Mike Frysinger [mailto:[email protected]] 
>Sent: Saturday, September 26, 2009 1:24 AM
>To: Cai, Cliff
>Cc: [email protected]
>Subject: Re: [Linux-kernel-commits] [7448] trunk/sound/soc: 
>task[#5443]add ADAU1371 support
>
>On Fri, Sep 25, 2009 at 04:41, Cai, Cliff wrote:
>>From: Mike Frysinger [mailto:[email protected]]
>>>On Thu, Sep 24, 2009 at 05:48,  <[email protected]> wrote:
>>>> Added: trunk/sound/soc/blackfin/bf5xx-adau1371.c (0 => 7448)
>>>>
>>>> +static struct snd_soc_card bf5xx_adau1371; static struct 
>>>> +snd_soc_device *adau1371_socdev;
>>>
>>>so this means there can only be one instance of adau1371 in a system 
>>>at a time ?  we have to stop this global state usage that keeps 
>>>showing up in our ASoC code.
>>
>> No,instances can share the same structs.
>
>if there are two adau1371 codecs in play, wont 
>adau1371_probe() be called twice ?  seems like adau1371_socdev 
>should be allocated dynamically and then passed via the i2c 
>private data field rather than using a global variable.

If there are two codecs then only need to alocate and add platform device twice,
See bf5xx_adau1371_init in bf5xx-adau1371.c
Bf5xx_adau1371_snd_device can be an array if needed.

>also, why is soc_codec_dev_adau1371 declared twice ?  at the top:
>struct snd_soc_codec_device soc_codec_dev_adau1371; then later on:
>struct snd_soc_codec_device soc_codec_dev_adau1371 = { ... }; -mike

Done,thanks.

Cliff
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to