summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorSameer Pujar <spujar@nvidia.com>2019-05-12 23:05:48 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2019-05-21 17:59:28 -0400
commita61083cbcb862128f856c4a4c7266dd61f68ea0d (patch)
tree96f52aa7c681237e571e92cfa189c96e33d500a8 /sound/pci/hda
parent69a4e0c29df732e2f09f4b72c50af7c99f6f69b1 (diff)
ALSA: hda/tegra: use macro for codec probe
We have been using DT property "nvidia,max-codec-slot" to pass maximum supported codec slots for the HDA controller. There is a fallback option to use HDA_MAX_CODECS slots if the DT property is not specified. Right now value passed from the DT and HDA_MAX_CODECS macro value are same. Even in future if number of supported codec slots increases, the macro in the driver can be updated. No need to have DT property for this. This patch removes DT parsing of the property and instead uses the macro HDA_MAX_CODECS to probe. Later DT entries can be removed. Bug 200454686 Change-Id: I5ae23450259028f0b7fdf694745509f824e3e11d Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2117499 (cherry picked from commit 976964687b45696131a63ff5073fa6cccc91c7a9) Reviewed-on: https://git-master.nvidia.com/r/2122538 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_tegra.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 040c18c79..c326c79ce 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -109,7 +109,6 @@ struct hda_tegra {
109 int partition_id; 109 int partition_id;
110 void __iomem *regs; 110 void __iomem *regs;
111 struct work_struct probe_work; 111 struct work_struct probe_work;
112 int num_codecs;
113 struct kobject *kobj; 112 struct kobject *kobj;
114 struct hda_pcm_devices *hda_pcm_dev; 113 struct hda_pcm_devices *hda_pcm_dev;
115}; 114};
@@ -783,10 +782,6 @@ static void hda_tegra_probe_work(struct work_struct *work)
783 if (err < 0) 782 if (err < 0)
784 goto out_free; 783 goto out_free;
785 784
786 if (of_property_read_u32(np, "nvidia,max-codec-slot",
787 &hda->num_codecs) < 0)
788 hda->num_codecs = HDA_MAX_CODECS;
789
790 bus->avoid_compact_sdo_bw = of_property_read_bool(np, 785 bus->avoid_compact_sdo_bw = of_property_read_bool(np,
791 "nvidia,avoid-compact-sdo-bw"); 786 "nvidia,avoid-compact-sdo-bw");
792 787
@@ -802,7 +797,7 @@ static void hda_tegra_probe_work(struct work_struct *work)
802 hda_tegra_writel(gsc_id, hda->regs + HDA_GSC_REG); 797 hda_tegra_writel(gsc_id, hda->regs + HDA_GSC_REG);
803 798
804 /* create codec instances */ 799 /* create codec instances */
805 err = azx_probe_codecs(chip, hda->num_codecs); 800 err = azx_probe_codecs(chip, HDA_MAX_CODECS);
806 if (err < 0) 801 if (err < 0)
807 goto out_free; 802 goto out_free;
808 803