Skip to contentSkip to conversation

ALSA: hda - Cleanup setting of pin_configs in patch_stac927x

PATCH In review Herton Ronaldo Krzesinski 2 participants 2 messages Feb 11, 2009 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda - Cleanup setting of pin_configs in patch_stac927x

After commit "ALSA: hda - Fix restore of pin configs at resume for STAC/IDT codecs", the introduced stac_save_pin_cfgs function checks already for pins == NULL case, saving then default pin configs from machine with stac92xx_save_bios_config_regs. So we can remove the extra checks when stac927x_brd_tbl[spec->board_config] == NULL.

---
 sound/pci/hda/patch_sigmatel.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
sound/pci/hda/patch_sigmatel.c +3 -4
index 12b3088..6fa064d 100644
@@ -5292,10 +5292,9 @@ static int patch_stac927x(struct hda_codec *codec)
 							stac927x_models,
 							stac927x_cfg_tbl);
  again:
-	if (spec->board_config < 0 || !stac927x_brd_tbl[spec->board_config]) {
-		if (spec->board_config < 0)
-			snd_printdd(KERN_INFO "hda_codec: Unknown model for"
-				    "STAC927x, using BIOS defaults\n");
+	if (spec->board_config < 0) {
+		snd_printdd(KERN_INFO "hda_codec: Unknown model for"
+			    "STAC927x, using BIOS defaults\n");
 		err = stac92xx_save_bios_config_regs(codec);
 	} else
 		err = stac_save_pin_cfgs(codec,
Signature · 1 line
1.6.1.3
#1 lore raw

At Wed, 11 Feb 2009 20:33:15 -0200,

Quoted 8 lines · Herton Ronaldo Krzesinski

After commit "ALSA: hda - Fix restore of pin configs at resume for STAC/IDT codecs", the introduced stac_save_pin_cfgs function checks already for pins == NULL case, saving then default pin configs from machine with stac92xx_save_bios_config_regs. So we can remove the extra checks when stac927x_brd_tbl[spec->board_config] == NULL.

Applied now. Thanks.

Takashi

Quoted 30 lines
---
 sound/pci/hda/patch_sigmatel.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
sound/pci/hda/patch_sigmatel.c +3 -4
index 12b3088..6fa064d 100644
@@ -5292,10 +5292,9 @@ static int patch_stac927x(struct hda_codec *codec)
 							stac927x_models,
 							stac927x_cfg_tbl);
  again:
-	if (spec->board_config < 0 || !stac927x_brd_tbl[spec->board_config]) {
-		if (spec->board_config < 0)
-			snd_printdd(KERN_INFO "hda_codec: Unknown model for"
-				    "STAC927x, using BIOS defaults\n");
+	if (spec->board_config < 0) {
+		snd_printdd(KERN_INFO "hda_codec: Unknown model for"
+			    "STAC927x, using BIOS defaults\n");
 		err = stac92xx_save_bios_config_regs(codec);
 	} else
 		err = stac_save_pin_cfgs(codec,
Signature · 6 lines
1.6.1.3

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel