summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2018-12-07 18:50:07 -0500
committerMark Brown <broonie@kernel.org>2018-12-13 10:36:19 -0500
commitf231c34ca9772f0b0e2d1b781e9c415847aff522 (patch)
tree422c2841689bd11db90243248b9413471a99b404 /sound
parent7f981bdcf55fda28a9a70c9e8151dd200771a0a8 (diff)
ASoC: Intel: Skylake: add error logs on probe, remove dependency on NHLT
Add error logs to make probe debug easier. Also remove hard-coded dependency on NHLT. NHLT literally stands for NonHdaudioLinkTable and is only required for SSP/DMIC interfaces. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/skylake/skl-nhlt.c3
-rw-r--r--sound/soc/intel/skylake/skl.c41
2 files changed, 32 insertions, 12 deletions
diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c
index 01a050cf8775..5d125a3df527 100644
--- a/sound/soc/intel/skylake/skl-nhlt.c
+++ b/sound/soc/intel/skylake/skl-nhlt.c
@@ -180,6 +180,9 @@ int skl_get_dmic_geo(struct skl *skl)
180 unsigned int dmic_geo = 0; 180 unsigned int dmic_geo = 0;
181 u8 j; 181 u8 j;
182 182
183 if (!nhlt)
184 return 0;
185
183 epnt = (struct nhlt_endpoint *)nhlt->desc; 186 epnt = (struct nhlt_endpoint *)nhlt->desc;
184 187
185 for (j = 0; j < nhlt->endpoint_count; j++) { 188 for (j = 0; j < nhlt->endpoint_count; j++) {
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index f04e9ec4432b..f9888b1d5521 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -1010,8 +1010,10 @@ static int skl_probe(struct pci_dev *pci,
1010 bus = skl_to_bus(skl); 1010 bus = skl_to_bus(skl);
1011 1011
1012 err = skl_first_init(bus); 1012 err = skl_first_init(bus);
1013 if (err < 0) 1013 if (err < 0) {
1014 dev_err(bus->dev, "skl_first_init failed with err: %d\n", err);
1014 goto out_free; 1015 goto out_free;
1016 }
1015 1017
1016 skl->pci_id = pci->device; 1018 skl->pci_id = pci->device;
1017 1019
@@ -1020,26 +1022,39 @@ static int skl_probe(struct pci_dev *pci,
1020 skl->nhlt = skl_nhlt_init(bus->dev); 1022 skl->nhlt = skl_nhlt_init(bus->dev);
1021 1023
1022 if (skl->nhlt == NULL) { 1024 if (skl->nhlt == NULL) {
1025#if !IS_ENABLED(CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC)
1026 dev_err(bus->dev, "no nhlt info found\n");
1023 err = -ENODEV; 1027 err = -ENODEV;
1024 goto out_free; 1028 goto out_free;
1025 } 1029#else
1030 dev_warn(bus->dev, "no nhlt info found, continuing to try to enable HDaudio codec\n");
1031#endif
1032 } else {
1026 1033
1027 err = skl_nhlt_create_sysfs(skl); 1034 err = skl_nhlt_create_sysfs(skl);
1028 if (err < 0) 1035 if (err < 0) {
1029 goto out_nhlt_free; 1036 dev_err(bus->dev, "skl_nhlt_create_sysfs failed with err: %d\n", err);
1037 goto out_nhlt_free;
1038 }
1030 1039
1031 skl_nhlt_update_topology_bin(skl); 1040 skl_nhlt_update_topology_bin(skl);
1041
1042 /* create device for dsp clk */
1043 err = skl_clock_device_register(skl);
1044 if (err < 0) {
1045 dev_err(bus->dev, "skl_clock_device_register failed with err: %d\n", err);
1046 goto out_clk_free;
1047 }
1048 }
1032 1049
1033 pci_set_drvdata(skl->pci, bus); 1050 pci_set_drvdata(skl->pci, bus);
1034 1051
1035 /* create device for dsp clk */
1036 err = skl_clock_device_register(skl);
1037 if (err < 0)
1038 goto out_clk_free;
1039 1052
1040 err = skl_find_machine(skl, (void *)pci_id->driver_data); 1053 err = skl_find_machine(skl, (void *)pci_id->driver_data);
1041 if (err < 0) 1054 if (err < 0) {
1055 dev_err(bus->dev, "skl_find_machine failed with err: %d\n", err);
1042 goto out_nhlt_free; 1056 goto out_nhlt_free;
1057 }
1043 1058
1044 err = skl_init_dsp(skl); 1059 err = skl_init_dsp(skl);
1045 if (err < 0) { 1060 if (err < 0) {
@@ -1056,8 +1071,10 @@ static int skl_probe(struct pci_dev *pci,
1056 1071
1057 /* create device for soc dmic */ 1072 /* create device for soc dmic */
1058 err = skl_dmic_device_register(skl); 1073 err = skl_dmic_device_register(skl);
1059 if (err < 0) 1074 if (err < 0) {
1075 dev_err(bus->dev, "skl_dmic_device_register failed with err: %d\n", err);
1060 goto out_dsp_free; 1076 goto out_dsp_free;
1077 }
1061 1078
1062 schedule_work(&skl->probe_work); 1079 schedule_work(&skl->probe_work);
1063 1080