[alsa-devel] [PATCH 3/3] ASoC: SAMSUNG: Match spdif source clock id and asoc platform device

Jassi Brar jassisinghbrar at gmail.com
Fri Dec 3 11:33:32 CET 2010


On Fri, Dec 3, 2010 at 7:23 PM, Jassi Brar <jassisinghbrar at gmail.com> wrote:
> On Fri, Dec 3, 2010 at 7:17 PM, Seungwhan Youn <claude.youn at gmail.com> wrote:
>>>> -       smdk_snd_spdif_device = platform_device_alloc("soc-audio", -1);
>>>> +       smdk_snd_spdif_device = platform_device_alloc("soc-audio", 0);
>>>
>>> I think this is not appropriate.
>>>
>>> Maybe you should do :-
>>>  sclk_audio0 = clk_get(NULL, "sclk_audio");
>>
>> Yes, I think so, but without id, there is no way to find sclk_audio0
>> in current samsung s5p. Because, current sclk_audio0,1,2 is only to
>> distinguished by id not by name, and also all sclk_audio0's id for s5p
>> is '0' for now. So, I think that this modification is more batter to
>> modify all s5p's sclk_audio clock id to '-1'.
>
> the platform_device soc-audio has nothing to do with a particular
> audio controller, so I don't favor associating with a controller.
> Good for us, SPDIF needs sclk_audio0 which is the first instance
> that clk_get will come across and hence we can still get the clock.

Ok, I see it wouldn't work as such.

Theoretically we have two parallel clocks from same source - one goes
to I2S_0 and the other to SPDIF.
So, IMO, we need to clone the sclk_audio0 clock with SPDIF specific name
and that has id as -1


More information about the Alsa-devel mailing list