Re: [PATCH 2/2] ALSA: hda/tegra: fix tegra-hda on tegra30 soc

From: Jon Hunter
Date: Fri Jan 08 2021 - 06:34:27 EST



On 08/01/2021 10:54, Jon Hunter wrote:
>
> On 08/01/2021 08:00, Sameer Pujar wrote:
>
> ...
>
>>>>> Signed-off-by: Peter Geis <pgwipeout@xxxxxxxxx>
>>>>> Tested-by: Ion Agorria <ion@xxxxxxxxxxx>
>>>>> ---
>>>>>    sound/pci/hda/hda_tegra.c | 3 +--
>>>>>    1 file changed, 1 insertion(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
>>>>> index 70164d1428d4..f8d61e677a09 100644
>>>>> --- a/sound/pci/hda/hda_tegra.c
>>>>> +++ b/sound/pci/hda/hda_tegra.c
>>>>> @@ -388,8 +388,7 @@ static int hda_tegra_first_init(struct azx
>>>>> *chip, struct platform_device *pdev)
>>>>>            * in powers of 2, next available ratio is 16 which can be
>>>>>            * used as a limiting factor here.
>>>>>            */
>>>>> -       if (of_device_is_compatible(np, "nvidia,tegra194-hda"))
>>>>> -               chip->bus.core.sdo_limit = 16;
>>>>> +       chip->bus.core.sdo_limit = 16;
>>>> Future Tegra chips address this problem and hence cannot be enforced by
>>>> default. May be we can have like below:
>>>>
>>>> if (of_device_is_compatible(np, "nvidia,tegra30-hda"))
>>>> chip->bus.core.sdo_limit = 16;
>>>>
>>> It will need to be a bit more complicated than that, since the
>>> tegra186 and tegra210 device trees have "nvidia,tegra30-hda" as a
>>> fallback.
>>> Looking at the generation map, tegra30-hda can be the fallback for the
>>> broken implementation and tegra210-hda can be the fallback for the
>>> working implementation.
>>> Does that work for you?
>>
>> As per above explanation, it is fine to apply the workaround for
>> Tegra210/186 as well. So it simplifies things for all existing chips.
>
>
> FYI ... we now have minimal support for Tegra234 in upstream that should
> not require this. Given that the Tegra234 device-tree does not include
> support for HDA yet, I think it is fine to apply this as-is. However,
> once we do add support for Tegra234 HDA, then we should ensure that this
> is not applied. So that said ...
>
> Reviewed-by: Jon Hunter <jonathanh@xxxxxxxxxx>


Sorry I was chatting with Sameer offline and we think if we just switch
the test to the following then this will take care of Tegra234 when we
add it ...

if (of_device_is_compatible(np, "nvidia,tegra30-hda"))

Peter, would you be able to send a V2 with this?

Thanks!
Jon

--
nvpublic