[PATCH] ALSA: hda/cmedia: Remove duplicate pin configuration parsing

wangdich9700@163.com posted 1 patch 12 hours ago
sound/hda/codecs/cmedia.c | 7 -------
1 file changed, 7 deletions(-)
[PATCH] ALSA: hda/cmedia: Remove duplicate pin configuration parsing
Posted by wangdich9700@163.com 12 hours ago
From: wangdicheng <wangdicheng@kylinos.cn>

The cmedia_probe() function calls snd_hda_parse_pin_defcfg() and
snd_hda_gen_parse_auto_config() twice unnecessarily. Remove The
duplicate code.

Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
---
 sound/hda/codecs/cmedia.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/sound/hda/codecs/cmedia.c b/sound/hda/codecs/cmedia.c
index e6e12c01339f..88dd80d987d4 100644
--- a/sound/hda/codecs/cmedia.c
+++ b/sound/hda/codecs/cmedia.c
@@ -39,13 +39,6 @@ static int cmedia_probe(struct hda_codec *codec, const struct hda_device_id *id)
 		spec->out_vol_mask = (1ULL << 0x10);
 	}
 
-	err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0);
-	if (err < 0)
-		goto error;
-	err = snd_hda_gen_parse_auto_config(codec, cfg);
-	if (err < 0)
-		goto error;
-
 	err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0);
 	if (err < 0)
 		goto error;
-- 
2.25.1
Re: [PATCH] ALSA: hda/cmedia: Remove duplicate pin configuration parsing
Posted by Takashi Iwai 11 hours ago
On Wed, 01 Apr 2026 10:26:25 +0200,
wangdich9700@163.com wrote:
> 
> From: wangdicheng <wangdicheng@kylinos.cn>
> 
> The cmedia_probe() function calls snd_hda_parse_pin_defcfg() and
> snd_hda_gen_parse_auto_config() twice unnecessarily. Remove The
> duplicate code.
> 
> Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>

Oh, that was a silly mistake that was introduced at the big code
change.

Applied now with the Fixes tag.


thanks,

Takashi