Bug 219897
Summary: | Sound recording stops working | ||
---|---|---|---|
Product: | Drivers | Reporter: | Aravind (aravindhv10) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | RESOLVED CODE_FIX | ||
Severity: | low | CC: | aravindhv10, tiwai |
Priority: | P3 | ||
Hardware: | AMD | ||
OS: | Linux | ||
URL: | https://github.com/NixOS/nixpkgs/issues/365577 | ||
Kernel Version: | 6.12.14, 6.6.80 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
output of alsa-info command when mic is not working
Output of alsa-info command when mic is working Fix patch |
Description
Aravind
2025-03-19 04:13:13 UTC
Hi, in case this bug report is still being considered, I think the problem might be in the line: SND_PCI_QUIRK(0x1849, 0x0269, "Positivo Master C6400", ALC269VB_FIXUP_ASUS_ZENBOOK), of sound/pci/hda/patch_realtek.c (this was introduced in one the newer commits of 6.14 rc) Sorry, my hardware is a bit slow. Will check and confirm soon. What does this do exactly (Sorry again, I am a beginner)? Hi, the issue was not in the PCI quirk, I managed to narrow it down to these 2 files which changed from 6.12.13 to 6.12.14: diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c index 8e74be038b0f..0091ab3f2bd5 100644 --- a/sound/pci/hda/hda_auto_parser.c +++ b/sound/pci/hda/hda_auto_parser.c @@ -80,7 +80,11 @@ static int compare_input_type(const void *ap, const void *bp) /* In case one has boost and the other one has not, pick the one with boost first. */ - return (int)(b->has_boost_on_pin - a->has_boost_on_pin); + if (a->has_boost_on_pin != b->has_boost_on_pin) + return (int)(b->has_boost_on_pin - a->has_boost_on_pin); + + /* Keep the original order */ + return a->order - b->order; } /* Reorder the surround channels @@ -400,6 +404,8 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec, reorder_outputs(cfg->speaker_outs, cfg->speaker_pins); /* sort inputs in the order of AUTO_PIN_* type */ + for (i = 0; i < cfg->num_inputs; i++) + cfg->inputs[i].order = i; sort(cfg->inputs, cfg->num_inputs, sizeof(cfg->inputs[0]), compare_input_type, NULL); diff --git a/sound/pci/hda/hda_auto_parser.h b/sound/pci/hda/hda_auto_parser.h index 579b11beac71..87af3d8c02f7 100644 --- a/sound/pci/hda/hda_auto_parser.h +++ b/sound/pci/hda/hda_auto_parser.h @@ -37,6 +37,7 @@ struct auto_pin_cfg_item { unsigned int is_headset_mic:1; unsigned int is_headphone_mic:1; /* Mic-only in headphone jack */ unsigned int has_boost_on_pin:1; + int order; }; struct auto_pin_cfg; diff --git a/sound/soc/amd/Kconfig b/sound/soc/amd/Kconfig index 6dec44f516c1..c2a5671ba96b 100644 --- a/sound/soc/amd/Kconfig +++ b/sound/soc/amd/Kconfig @@ -105,7 +105,7 @@ config SND_SOC_AMD_ACP6x config SND_SOC_AMD_YC_MACH tristate "AMD YC support for DMIC" select SND_SOC_DMIC - depends on SND_SOC_AMD_ACP6x + depends on SND_SOC_AMD_ACP6x && ACPI help This option enables machine driver for Yellow Carp platform using dmic. ACP IP has PDM Decoder block with DMA controller. by reverting these 2 files, I was able to get the mic working again. That's about the quirk. The quirk entry casually worked in the past, but not in a proper way, hence it got broken after we corrected the pin table sort. Please get alsa-info.sh output from the working and non-working cases. Run the script with --no-upload option and attach the outputs to Bugzilla. Created attachment 307887 [details]
output of alsa-info command when mic is not working
Created attachment 307888 [details]
Output of alsa-info command when mic is working
Thanks. Please try the fix patch below. Once after confirming it's working, I'll submit and merge to the upstream. Created attachment 307891 [details]
Fix patch
Yes, it is working properly after the quirk line added, thanks! The bug can be closed. |