Skip to contentSkip to conversation

ALSA: hda/ca0132 - add missed snd_hda_gen_parse_auto_config

PATCH In review Chuhong Yuan 2 participants 2 messages Dec 9, 2019 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda/ca0132 - add missed snd_hda_gen_parse_auto_config

It is found that all usages of snd_hda_parse_pin_defcfg() are followed with snd_hda_gen_parse_auto_config() except here.
This should be a miss and needs to add the missed call.

---
 sound/pci/hda/patch_ca0132.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/pci/hda/patch_ca0132.c +5 -0
index b7a1abb3e231..ea1187a13241 100644
@@ -24,6 +24,7 @@
 #include "hda_local.h"
 #include "hda_auto_parser.h"
 #include "hda_jack.h"
+#include "hda_generic.h"
 
 #include "ca0132_regs.h"
 
@@ -8844,6 +8845,10 @@ static int patch_ca0132(struct hda_codec *codec)
 	if (err < 0)
 		goto error;
 
+	err = snd_hda_gen_parse_auto_config(codec, &spec->autocfg);
+	if (err < 0)
+		goto error;
+
 	return 0;
 
  error:
Signature · 1 line
2.24.0
#1 lore raw
Quoted 4 lines · Chuhong Yuan

It is found that all usages of snd_hda_parse_pin_defcfg() are followed with snd_hda_gen_parse_auto_config() except here.
This should be a miss and needs to add the missed call.

No, this will break things badly.

CA0132 codec driver has own configurator, and the pincfg parser is called there because the initialization function requires the pincfg information for the digital audio pins.

thanks,

Takashi

Quoted 32 lines
---
 sound/pci/hda/patch_ca0132.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/pci/hda/patch_ca0132.c +5 -0
index b7a1abb3e231..ea1187a13241 100644
@@ -24,6 +24,7 @@
 #include "hda_local.h"
 #include "hda_auto_parser.h"
 #include "hda_jack.h"
+#include "hda_generic.h"
 
 #include "ca0132_regs.h"
 
@@ -8844,6 +8845,10 @@ static int patch_ca0132(struct hda_codec *codec)
 	if (err < 0)
 		goto error;
 
+	err = snd_hda_gen_parse_auto_config(codec, &spec->autocfg);
+	if (err < 0)
+		goto error;
+
 	return 0;
 
  error:
Signature · 1 line
2.24.0