ALSA: hda/tegra: sound card name from device tree
authorSameer Pujar <spujar@nvidia.com>
Wed, 20 Feb 2019 15:13:24 +0000 (20:43 +0530)
committerTakashi Iwai <tiwai@suse.de>
Fri, 22 Feb 2019 09:46:43 +0000 (10:46 +0100)
commitc0bde003a01384b599b7600a4b16ee706163ac53
treeb4c52c6f52c67025848ec5fcdc65d05058e7b7e7
parent11ce4308307c380d0fa7a7694739ce712acb6174
ALSA: hda/tegra: sound card name from device tree

A platform can have multiple sound cards for different audio paths.
Following is the print seen duirng device boot for jetson-xavier,
  ALSA device list:
    #0: nvidia,p2972-0000 at 0x3518000 irq 17
By looking at above, it is not very clear if the sound card is for
HDA. It becomes confusing when platform has registered multiple cards,
and platform model name is used for card.

This patch uses "nvidia,model" property mentioned in hda device tree
to get the card name. Since property is optional, legacy boards will
continue to use "tegra-hda". Custom name can be passed wherever needed.
This naming convention is conistent with the way sound cards are named
in general.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_tegra.c