* [PATCH V1 0/4] ALSA: hda: jack detect fixes
@ 2025-06-19 2:08 joakim.zhang
2025-06-19 2:08 ` [PATCH V1 1/4] ALSA: hda: fix controller cannot suspend when codec using jackpoll joakim.zhang
` (4 more replies)
0 siblings, 5 replies; 34+ messages in thread
From: joakim.zhang @ 2025-06-19 2:08 UTC (permalink / raw)
To: perex, tiwai, linux-sound
Cc: chris.chiu, kailang, geans_chen, cix-kernel-upstream,
Joakim Zhang
From: Joakim Zhang <joakim.zhang@cixtech.com>
- fixes for hda jack detection with polling mode
Joakim Zhang (4):
ALSA: hda: fix controller cannot suspend when codec using jackpoll
ALSA: hda: add no_pin_sense_update flag for jack detection
ALSA: hda: disable jackpoll_in_suspend when system shutdown
ALSA: hda/realtek: fix mic jack detect failed on alc256
include/sound/hda_codec.h | 1 +
sound/pci/hda/hda_codec.c | 3 +++
sound/pci/hda/hda_generic.c | 11 +++++++++--
sound/pci/hda/hda_jack.c | 2 +-
sound/pci/hda/patch_realtek.c | 2 ++
5 files changed, 16 insertions(+), 3 deletions(-)
--
2.49.0
^ permalink raw reply [flat|nested] 34+ messages in thread* [PATCH V1 1/4] ALSA: hda: fix controller cannot suspend when codec using jackpoll 2025-06-19 2:08 [PATCH V1 0/4] ALSA: hda: jack detect fixes joakim.zhang @ 2025-06-19 2:08 ` joakim.zhang 2025-06-20 12:00 ` Takashi Iwai 2025-06-19 2:08 ` [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack detection joakim.zhang ` (3 subsequent siblings) 4 siblings, 1 reply; 34+ messages in thread From: joakim.zhang @ 2025-06-19 2:08 UTC (permalink / raw) To: perex, tiwai, linux-sound Cc: chris.chiu, kailang, geans_chen, cix-kernel-upstream, Joakim Zhang From: Joakim Zhang <joakim.zhang@cixtech.com> For current design, sync cancel jackpoll delayed work in hda_codec_runtime_suspend(), sync means it will cancel pending works, so jackpoll work would be called. hda_jackpoll_work()--> snd_hda_power_up_pm()--> if (!atomic_inc_not_zero(&codec->in_pm)) return snd_hdac_power_up(codec);--> pm_runtime_get_sync() The point where cancel_delayed_work_sync() called not in_pm, though it actually is. It will runtime resume codec device again, the power usage_count increase 1, but it should be 0 when codec is suspending, finally codec is in resume state, not suspended. HDA controller as the parent of codec device, also cannot enter suspend, this patch change to sync cancel jackpoll delayed work when codec in_pm is set, so it will not resume codec again. Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com> --- sound/pci/hda/hda_codec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index c018beeecd3d..12caa5b2e678 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -2912,7 +2912,9 @@ static int hda_codec_runtime_suspend(struct device *dev) if (!codec->card) return 0; + snd_hdac_enter_pm(&codec->core); cancel_delayed_work_sync(&codec->jackpoll_work); + snd_hdac_leave_pm(&codec->core); state = hda_call_codec_suspend(codec); if (codec->link_down_at_suspend || -- 2.49.0 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [PATCH V1 1/4] ALSA: hda: fix controller cannot suspend when codec using jackpoll 2025-06-19 2:08 ` [PATCH V1 1/4] ALSA: hda: fix controller cannot suspend when codec using jackpoll joakim.zhang @ 2025-06-20 12:00 ` Takashi Iwai 2025-06-21 6:12 ` 回复: " Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Takashi Iwai @ 2025-06-20 12:00 UTC (permalink / raw) To: joakim.zhang Cc: perex, tiwai, linux-sound, chris.chiu, kailang, geans_chen, cix-kernel-upstream On Thu, 19 Jun 2025 04:08:41 +0200, joakim.zhang@cixtech.com wrote: > > From: Joakim Zhang <joakim.zhang@cixtech.com> > > For current design, sync cancel jackpoll delayed work in > hda_codec_runtime_suspend(), sync means it will cancel pending > works, so jackpoll work would be called. > hda_jackpoll_work()--> > snd_hda_power_up_pm()--> > if (!atomic_inc_not_zero(&codec->in_pm)) > return snd_hdac_power_up(codec);--> > pm_runtime_get_sync() > > The point where cancel_delayed_work_sync() called not in_pm, > though it actually is. It will runtime resume codec device again, > the power usage_count increase 1, but it should be 0 when codec > is suspending, finally codec is in resume state, not suspended. > > HDA controller as the parent of codec device, also cannot enter > suspend, this patch change to sync cancel jackpoll delayed work when > codec in_pm is set, so it will not resume codec again. > > Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com> > --- > sound/pci/hda/hda_codec.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c > index c018beeecd3d..12caa5b2e678 100644 > --- a/sound/pci/hda/hda_codec.c > +++ b/sound/pci/hda/hda_codec.c > @@ -2912,7 +2912,9 @@ static int hda_codec_runtime_suspend(struct device *dev) > if (!codec->card) > return 0; > > + snd_hdac_enter_pm(&codec->core); > cancel_delayed_work_sync(&codec->jackpoll_work); > + snd_hdac_leave_pm(&codec->core); That's too awkward... I believe that, if the hda-codec doesn't set jackpoll_in_suspend flag, we should simply disable the runtime PM. Such a device is supposed to be polling frequently (e.g. VIA codec) that conflicts with the runtime PM. For that, we can simply define the runtime_idle callback. Another point is that hda_jackpoll_work() could simply use snd_hda_power_up() and *_down() instead of snd_hda_power_up_pm() and co. We used *_pm variant because the function was called directly in the init or the resume paths. But we can call this only from the work, then we can switch to the safer *_up/down() calls. Then this assures the runtime resume completion in the work without much races. With those transitions, basically the cancel_delayed_work_sync() call at hda_codec_runtime_suspend() can be dropped. Also, the conditional schedule_delayed_work() there, too; if we don't cancel, we don't need reschedule, either. So the (totally untested) PoC is something like below. It contains also the fix corresponding to your patch 3, too. thanks, Takashi --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index c018beeecd3d..5508381a1833 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -639,24 +639,16 @@ static void hda_jackpoll_work(struct work_struct *work) struct hda_codec *codec = container_of(work, struct hda_codec, jackpoll_work.work); - /* for non-polling trigger: we need nothing if already powered on */ - if (!codec->jackpoll_interval && snd_hdac_is_power_on(&codec->core)) - return; - - /* the power-up/down sequence triggers the runtime resume */ - snd_hda_power_up_pm(codec); - /* update jacks manually if polling is required, too */ - if (codec->jackpoll_interval) { - snd_hda_jack_set_dirty_all(codec); - snd_hda_jack_poll_all(codec); - } - snd_hda_power_down_pm(codec); - if (!codec->jackpoll_interval) return; - schedule_delayed_work(&codec->jackpoll_work, - codec->jackpoll_interval); + /* the power-up/down sequence triggers the runtime resume */ + snd_hda_power_up(codec); + /* update jacks manually if polling is required, too */ + snd_hda_jack_set_dirty_all(codec); + snd_hda_jack_poll_all(codec); + schedule_delayed_work(&codec->jackpoll_work, codec->jackpoll_interval); + snd_hda_power_down(codec); } /* release all pincfg lists */ @@ -2895,12 +2887,12 @@ static void hda_call_codec_resume(struct hda_codec *codec) snd_hda_regmap_sync(codec); } - if (codec->jackpoll_interval) - hda_jackpoll_work(&codec->jackpoll_work.work); - else - snd_hda_jack_report_sync(codec); + snd_hda_jack_report_sync(codec); codec->core.dev.power.power_state = PMSG_ON; snd_hdac_leave_pm(&codec->core); + if (codec->jackpoll_interval) + schedule_delayed_work(&codec->jackpoll_work, + codec->jackpoll_interval); } static int hda_codec_runtime_suspend(struct device *dev) @@ -2912,8 +2904,6 @@ static int hda_codec_runtime_suspend(struct device *dev) if (!codec->card) return 0; - cancel_delayed_work_sync(&codec->jackpoll_work); - state = hda_call_codec_suspend(codec); if (codec->link_down_at_suspend || (codec_has_clkstop(codec) && codec_has_epss(codec) && @@ -2921,10 +2911,6 @@ static int hda_codec_runtime_suspend(struct device *dev) snd_hdac_codec_link_down(&codec->core); snd_hda_codec_display_power(codec, false); - if (codec->bus->jackpoll_in_suspend && - (dev->power.power_state.event != PM_EVENT_SUSPEND)) - schedule_delayed_work(&codec->jackpoll_work, - codec->jackpoll_interval); return 0; } @@ -2943,6 +2929,15 @@ static int hda_codec_runtime_resume(struct device *dev) return 0; } +static int hda_codec_runtime_idle(struct device *dev) +{ + struct hda_codec *codec = dev_to_hda_codec(dev); + + if (codec->jackpoll_interval && !codec->bus->jackpoll_in_suspend) + return -EBUSY; + return 0; +} + static int hda_codec_pm_prepare(struct device *dev) { struct hda_codec *codec = dev_to_hda_codec(dev); @@ -3008,7 +3003,8 @@ const struct dev_pm_ops hda_codec_driver_pm = { .thaw = pm_sleep_ptr(hda_codec_pm_thaw), .poweroff = pm_sleep_ptr(hda_codec_pm_suspend), .restore = pm_sleep_ptr(hda_codec_pm_restore), - RUNTIME_PM_OPS(hda_codec_runtime_suspend, hda_codec_runtime_resume, NULL) + RUNTIME_PM_OPS(hda_codec_runtime_suspend, hda_codec_runtime_resume, + hda_codec_runtime_idle) }; /* suspend the codec at shutdown; called from driver's shutdown callback */ @@ -3020,6 +3016,7 @@ void snd_hda_codec_shutdown(struct hda_codec *codec) if (!codec->core.registered) return; + codec->jackpoll_interval = 0; /* don't poll any longer */ cancel_delayed_work_sync(&codec->jackpoll_work); list_for_each_entry(cpcm, &codec->pcm_list_head, list) snd_pcm_suspend_all(cpcm->pcm); @@ -3086,10 +3083,11 @@ int snd_hda_codec_build_controls(struct hda_codec *codec) if (err < 0) return err; + snd_hda_jack_report_sync(codec); /* call at the last init point */ if (codec->jackpoll_interval) - hda_jackpoll_work(&codec->jackpoll_work.work); - else - snd_hda_jack_report_sync(codec); /* call at the last init point */ + schedule_delayed_work(&codec->jackpoll_work, + codec->jackpoll_interval); + sync_power_up_states(codec); return 0; } ^ permalink raw reply related [flat|nested] 34+ messages in thread
* 回复: [PATCH V1 1/4] ALSA: hda: fix controller cannot suspend when codec using jackpoll 2025-06-20 12:00 ` Takashi Iwai @ 2025-06-21 6:12 ` Joakim Zhang 0 siblings, 0 replies; 34+ messages in thread From: Joakim Zhang @ 2025-06-21 6:12 UTC (permalink / raw) To: Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, kailang@realtek.com, geans_chen@realsil.com.cn, cix-kernel-upstream Hello Takashi, ________________________________________ 发件人: Takashi Iwai <tiwai@suse.de> 已发送: 2025 年 6 月 20 日 星期五 20:00 收件人: Joakim Zhang <joakim.zhang@cixtech.com> 抄送: perex@perex.cz <perex@perex.cz>; tiwai@suse.com <tiwai@suse.com>; linux-sound@vger.kernel.org <linux-sound@vger.kernel.org>; chris.chiu@canonical.com <chris.chiu@canonical.com>; kailang@realtek.com <kailang@realtek.com>; geans_chen@realsil.com.cn <geans_chen@realsil.com.cn>; cix-kernel-upstream <cix-kernel-upstream@cixtech.com> 主题: Re: [PATCH V1 1/4] ALSA: hda: fix controller cannot suspend when codec using jackpoll On Thu, 19 Jun 2025 04:08:41 +0200, joakim.zhang@cixtech.com wrote: > > From: Joakim Zhang <joakim.zhang@cixtech.com> > > For current design, sync cancel jackpoll delayed work in > hda_codec_runtime_suspend(), sync means it will cancel pending > works, so jackpoll work would be called. > hda_jackpoll_work()--> > snd_hda_power_up_pm()--> > if (!atomic_inc_not_zero(&codec->in_pm)) > return snd_hdac_power_up(codec);--> > pm_runtime_get_sync() > > The point where cancel_delayed_work_sync() called not in_pm, > though it actually is. It will runtime resume codec device again, > the power usage_count increase 1, but it should be 0 when codec > is suspending, finally codec is in resume state, not suspended. > > HDA controller as the parent of codec device, also cannot enter > suspend, this patch change to sync cancel jackpoll delayed work when > codec in_pm is set, so it will not resume codec again. > > Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com> > --- > sound/pci/hda/hda_codec.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c > index c018beeecd3d..12caa5b2e678 100644 > --- a/sound/pci/hda/hda_codec.c > +++ b/sound/pci/hda/hda_codec.c > @@ -2912,7 +2912,9 @@ static int hda_codec_runtime_suspend(struct device *dev) > if (!codec->card) > return 0; > > + snd_hdac_enter_pm(&codec->core); > cancel_delayed_work_sync(&codec->jackpoll_work); > + snd_hdac_leave_pm(&codec->core); That's too awkward... I believe that, if the hda-codec doesn't set jackpoll_in_suspend flag, we should simply disable the runtime PM. Such a device is supposed to be polling frequently (e.g. VIA codec) that conflicts with the runtime PM. For that, we can simply define the runtime_idle callback. Another point is that hda_jackpoll_work() could simply use snd_hda_power_up() and *_down() instead of snd_hda_power_up_pm() and co. We used *_pm variant because the function was called directly in the init or the resume paths. But we can call this only from the work, then we can switch to the safer *_up/down() calls. Then this assures the runtime resume completion in the work without much races. With those transitions, basically the cancel_delayed_work_sync() call at hda_codec_runtime_suspend() can be dropped. Also, the conditional schedule_delayed_work() there, too; if we don't cancel, we don't need reschedule, either. So the (totally untested) PoC is something like below. It contains also the fix corresponding to your patch 3, too. [Joakim] Thanks Takashi for your cleanup, actually it's better to switch to the *_up/down() calls, I will test then feedback to you soon. thanks, Takashi --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index c018beeecd3d..5508381a1833 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -639,24 +639,16 @@ static void hda_jackpoll_work(struct work_struct *work) struct hda_codec *codec = container_of(work, struct hda_codec, jackpoll_work.work); - /* for non-polling trigger: we need nothing if already powered on */ - if (!codec->jackpoll_interval && snd_hdac_is_power_on(&codec->core)) - return; - - /* the power-up/down sequence triggers the runtime resume */ - snd_hda_power_up_pm(codec); - /* update jacks manually if polling is required, too */ - if (codec->jackpoll_interval) { - snd_hda_jack_set_dirty_all(codec); - snd_hda_jack_poll_all(codec); - } - snd_hda_power_down_pm(codec); - if (!codec->jackpoll_interval) return; - schedule_delayed_work(&codec->jackpoll_work, - codec->jackpoll_interval); + /* the power-up/down sequence triggers the runtime resume */ + snd_hda_power_up(codec); + /* update jacks manually if polling is required, too */ + snd_hda_jack_set_dirty_all(codec); + snd_hda_jack_poll_all(codec); + schedule_delayed_work(&codec->jackpoll_work, codec->jackpoll_interval); + snd_hda_power_down(codec); } /* release all pincfg lists */ @@ -2895,12 +2887,12 @@ static void hda_call_codec_resume(struct hda_codec *codec) snd_hda_regmap_sync(codec); } - if (codec->jackpoll_interval) - hda_jackpoll_work(&codec->jackpoll_work.work); - else - snd_hda_jack_report_sync(codec); + snd_hda_jack_report_sync(codec); codec->core.dev.power.power_state = PMSG_ON; snd_hdac_leave_pm(&codec->core); + if (codec->jackpoll_interval) + schedule_delayed_work(&codec->jackpoll_work, + codec->jackpoll_interval); } static int hda_codec_runtime_suspend(struct device *dev) @@ -2912,8 +2904,6 @@ static int hda_codec_runtime_suspend(struct device *dev) if (!codec->card) return 0; - cancel_delayed_work_sync(&codec->jackpoll_work); - state = hda_call_codec_suspend(codec); if (codec->link_down_at_suspend || (codec_has_clkstop(codec) && codec_has_epss(codec) && @@ -2921,10 +2911,6 @@ static int hda_codec_runtime_suspend(struct device *dev) snd_hdac_codec_link_down(&codec->core); snd_hda_codec_display_power(codec, false); - if (codec->bus->jackpoll_in_suspend && - (dev->power.power_state.event != PM_EVENT_SUSPEND)) - schedule_delayed_work(&codec->jackpoll_work, - codec->jackpoll_interval); return 0; } @@ -2943,6 +2929,15 @@ static int hda_codec_runtime_resume(struct device *dev) return 0; } +static int hda_codec_runtime_idle(struct device *dev) +{ + struct hda_codec *codec = dev_to_hda_codec(dev); + + if (codec->jackpoll_interval && !codec->bus->jackpoll_in_suspend) + return -EBUSY; + return 0; +} + static int hda_codec_pm_prepare(struct device *dev) { struct hda_codec *codec = dev_to_hda_codec(dev); @@ -3008,7 +3003,8 @@ const struct dev_pm_ops hda_codec_driver_pm = { .thaw = pm_sleep_ptr(hda_codec_pm_thaw), .poweroff = pm_sleep_ptr(hda_codec_pm_suspend), .restore = pm_sleep_ptr(hda_codec_pm_restore), - RUNTIME_PM_OPS(hda_codec_runtime_suspend, hda_codec_runtime_resume, NULL) + RUNTIME_PM_OPS(hda_codec_runtime_suspend, hda_codec_runtime_resume, + hda_codec_runtime_idle) }; /* suspend the codec at shutdown; called from driver's shutdown callback */ @@ -3020,6 +3016,7 @@ void snd_hda_codec_shutdown(struct hda_codec *codec) if (!codec->core.registered) return; + codec->jackpoll_interval = 0; /* don't poll any longer */ cancel_delayed_work_sync(&codec->jackpoll_work); list_for_each_entry(cpcm, &codec->pcm_list_head, list) snd_pcm_suspend_all(cpcm->pcm); @@ -3086,10 +3083,11 @@ int snd_hda_codec_build_controls(struct hda_codec *codec) if (err < 0) return err; + snd_hda_jack_report_sync(codec); /* call at the last init point */ if (codec->jackpoll_interval) - hda_jackpoll_work(&codec->jackpoll_work.work); - else - snd_hda_jack_report_sync(codec); /* call at the last init point */ + schedule_delayed_work(&codec->jackpoll_work, + codec->jackpoll_interval); + sync_power_up_states(codec); return 0; } ^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack detection 2025-06-19 2:08 [PATCH V1 0/4] ALSA: hda: jack detect fixes joakim.zhang 2025-06-19 2:08 ` [PATCH V1 1/4] ALSA: hda: fix controller cannot suspend when codec using jackpoll joakim.zhang @ 2025-06-19 2:08 ` joakim.zhang 2025-06-20 12:11 ` Takashi Iwai 2025-06-19 2:08 ` [PATCH V1 3/4] ALSA: hda: disable jackpoll_in_suspend when system shutdown joakim.zhang ` (2 subsequent siblings) 4 siblings, 1 reply; 34+ messages in thread From: joakim.zhang @ 2025-06-19 2:08 UTC (permalink / raw) To: perex, tiwai, linux-sound Cc: chris.chiu, kailang, geans_chen, cix-kernel-upstream, Joakim Zhang From: Joakim Zhang <joakim.zhang@cixtech.com> snd_hda_jack_detect_* functions should be called when want to detect then report jack status immediately, however it now called from other points such as patch_ops.init which just want to judge if the device is attached and no report behaviour. Let take corner case into account: 1) device is de-attached before suspended, old pin sense is not present 2) attach the device when device in suspended 3) when codec resume back and the device is attached, it will update pin sense as present from codec init function (patch_ops.init), when it tries to read pin sense from jackpoll delayed work, the old pin sense would be present (but actaully it is not present), and the new pin sense also is present, so decides no changes, cause the device cannot be detected. Add no_pin_sense_update flag to control if we need update the pin sense when read the hardware pin sense. Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com> --- include/sound/hda_codec.h | 1 + sound/pci/hda/hda_generic.c | 11 +++++++++-- sound/pci/hda/hda_jack.c | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h index c1fe6290d04d..c850a4487e87 100644 --- a/include/sound/hda_codec.h +++ b/include/sound/hda_codec.h @@ -257,6 +257,7 @@ struct hda_codec { unsigned int forced_resume:1; /* forced resume for jack */ unsigned int no_stream_clean_at_suspend:1; /* do not clean streams at suspend */ unsigned int ctl_dev_id:1; /* old control element id build behaviour */ + unsigned int no_pin_sense_update:1; /* don't update pin sense when read pin sense */ unsigned long power_on_acct; unsigned long power_off_acct; diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index b34d84fedcc8..18c184a63dde 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -4378,8 +4378,11 @@ static bool detect_jacks(struct hda_codec *codec, int num_pins, const hda_nid_t /* don't detect pins retasked as inputs */ if (snd_hda_codec_get_pin_target(codec, nid) & AC_PINCTL_IN_EN) continue; + + codec->no_pin_sense_update = 1; if (snd_hda_jack_detect_state(codec, nid) == HDA_JACK_PRESENT) present = true; + codec->no_pin_sense_update = 0; } return present; } @@ -4569,7 +4572,7 @@ void snd_hda_gen_mic_autoswitch(struct hda_codec *codec, struct hda_jack_callback *jack) { struct hda_gen_spec *spec = codec->spec; - int i; + int present, i; if (!spec->auto_mic) return; @@ -4579,7 +4582,11 @@ void snd_hda_gen_mic_autoswitch(struct hda_codec *codec, /* don't detect pins retasked as outputs */ if (snd_hda_codec_get_pin_target(codec, pin) & AC_PINCTL_OUT_EN) continue; - if (snd_hda_jack_detect_state(codec, pin) == HDA_JACK_PRESENT) { + + codec->no_pin_sense_update = 1; + present = snd_hda_jack_detect_state(codec, pin); + codec->no_pin_sense_update = 0; + if (present == HDA_JACK_PRESENT) { mux_select(codec, 0, spec->am_entry[i].idx); return; } diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c index 7d7786df60ea..dc8b9c7f229b 100644 --- a/sound/pci/hda/hda_jack.c +++ b/sound/pci/hda/hda_jack.c @@ -254,7 +254,7 @@ u32 snd_hda_jack_pin_sense(struct hda_codec *codec, hda_nid_t nid, int dev_id) { struct hda_jack_tbl *jack = snd_hda_jack_tbl_get_mst(codec, nid, dev_id); - if (jack) { + if (jack && !codec->no_pin_sense_update) { jack_detect_update(codec, jack); return jack->pin_sense; } -- 2.49.0 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack detection 2025-06-19 2:08 ` [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack detection joakim.zhang @ 2025-06-20 12:11 ` Takashi Iwai 2025-06-21 6:14 ` 回复: " Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Takashi Iwai @ 2025-06-20 12:11 UTC (permalink / raw) To: joakim.zhang Cc: perex, tiwai, linux-sound, chris.chiu, kailang, geans_chen, cix-kernel-upstream On Thu, 19 Jun 2025 04:08:42 +0200, joakim.zhang@cixtech.com wrote: > > From: Joakim Zhang <joakim.zhang@cixtech.com> > > snd_hda_jack_detect_* functions should be called when want to > detect then report jack status immediately, however it now called > from other points such as patch_ops.init which just want to > judge if the device is attached and no report behaviour. > > Let take corner case into account: > 1) device is de-attached before suspended, old pin sense is not present > 2) attach the device when device in suspended > 3) when codec resume back and the device is attached, it will update > pin sense as present from codec init function (patch_ops.init), > when it tries to read pin sense from jackpoll delayed work, > the old pin sense would be present (but actaully it is not present), > and the new pin sense also is present, so decides no changes, cause > the device cannot be detected. > > Add no_pin_sense_update flag to control if we need update the pin > sense when read the hardware pin sense. I don't understand the situation well. Do you mean "device" in the steps 1/2/3 as a device to be connected to the jack, such as a headphone, not the HD-audio codec device, right? Even with that assumption, I still don't follow your logic fully... Basically, when snd_hda_jack_report_sync() is called, this should report the jack state changes. I believe we should simply call snd_hda_jack_report_sync() unconditionally, then schedule the jackpoll work, as done in my PoC patch. thanks, Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* 回复: [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack detection 2025-06-20 12:11 ` Takashi Iwai @ 2025-06-21 6:14 ` Joakim Zhang 2025-06-23 10:39 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-06-21 6:14 UTC (permalink / raw) To: Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, kailang@realtek.com, geans_chen@realsil.com.cn, cix-kernel-upstream Hello Takashi, ________________________________________ 发件人: Takashi Iwai <tiwai@suse.de> 已发送: 2025 年 6 月 20 日 星期五 20:11 收件人: Joakim Zhang <joakim.zhang@cixtech.com> 抄送: perex@perex.cz <perex@perex.cz>; tiwai@suse.com <tiwai@suse.com>; linux-sound@vger.kernel.org <linux-sound@vger.kernel.org>; chris.chiu@canonical.com <chris.chiu@canonical.com>; kailang@realtek.com <kailang@realtek.com>; geans_chen@realsil.com.cn <geans_chen@realsil.com.cn>; cix-kernel-upstream <cix-kernel-upstream@cixtech.com> 主题: Re: [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack detection On Thu, 19 Jun 2025 04:08:42 +0200, joakim.zhang@cixtech.com wrote: > > From: Joakim Zhang <joakim.zhang@cixtech.com> > > snd_hda_jack_detect_* functions should be called when want to > detect then report jack status immediately, however it now called > from other points such as patch_ops.init which just want to > judge if the device is attached and no report behaviour. > > Let take corner case into account: > 1) device is de-attached before suspended, old pin sense is not present > 2) attach the device when device in suspended > 3) when codec resume back and the device is attached, it will update > pin sense as present from codec init function (patch_ops.init), > when it tries to read pin sense from jackpoll delayed work, > the old pin sense would be present (but actaully it is not present), > and the new pin sense also is present, so decides no changes, cause > the device cannot be detected. > > Add no_pin_sense_update flag to control if we need update the pin > sense when read the hardware pin sense. I don't understand the situation well. Do you mean "device" in the steps 1/2/3 as a device to be connected to the jack, such as a headphone, not the HD-audio codec device, right? [Joakim] Yes, you are right, what I mean is the device to be connected to the jack, what I tested is a headset. Even with that assumption, I still don't follow your logic fully... Basically, when snd_hda_jack_report_sync() is called, this should report the jack state changes. I believe we should simply call snd_hda_jack_report_sync() unconditionally, then schedule the jackpoll work, as done in my PoC patch. [Joakim] Let me take realtek alc256 as an example, hda_call_codec_resume() 1)codec->patch_ops.resume(codec) // alc269_resume() codec->patch_ops.init(codec) // alc_init() spec->init_hook(codec) // alc256_init() snd_hda_jack_detect(codec, hp_pin) .... snd_hda_jack_pin_sense() jack_detect_update() jack->pin_sense = read_pin_sense(codec, jack->nid, jack->dev_id); // update jack->pin_sense here, but not report jack status 2)hda_jackpoll_work(&codec->jackpoll_work.work) snd_hda_jack_poll_all(codec) old_sense = get_jack_plug_state(jack->pin_sense); jack_detect_update(codec, jack); if (changes) snd_hda_jack_report_sync(codec); If the headset is not plugin before system suspending, so the jack->pin_sense = 0x0, plugin the headset when system in suspended state, system resume back, the jack->pin_sense update to 0x80000000 from codec patch_ops.init(), then jackpoll work get the old_sense = 0x80000000 (but actually it is not old sense before system suspending), and the current jack->pin_sense also 0x80000000 when calling jack_detect_update(), as a result there is no changes, finally not report the headset plugin event. Is it logical to report jack status immediately when updating the jack pin sense? If not, the old pin sense can still be trusted? Please correct me if anything misunderstanding, thanks, as a hda newer may not understood very deeply. thanks, Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack detection 2025-06-21 6:14 ` 回复: " Joakim Zhang @ 2025-06-23 10:39 ` Joakim Zhang 2025-06-23 13:11 ` Takashi Iwai 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-06-23 10:39 UTC (permalink / raw) To: Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, kailang@realtek.com, geans_chen@realsil.com.cn, cix-kernel-upstream Hello Takashi, > -----Original Message----- > From: Joakim Zhang <joakim.zhang@cixtech.com> > Sent: Saturday, June 21, 2025 2:15 PM > To: Takashi Iwai <tiwai@suse.de> > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; kailang@realtek.com; geans_chen@realsil.com.cn; > cix-kernel-upstream <cix-kernel-upstream@cixtech.com> > Subject: 回复: [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for > jack detection > > > Hello Takashi, > ________________________________________ > 发件人: Takashi Iwai <tiwai@suse.de> > 已发送: 2025 年 6 月 20 日 星期五 20:11 > 收件人: Joakim Zhang <joakim.zhang@cixtech.com> > 抄送: perex@perex.cz <perex@perex.cz>; tiwai@suse.com <tiwai@suse.com>; > linux-sound@vger.kernel.org <linux-sound@vger.kernel.org>; > chris.chiu@canonical.com <chris.chiu@canonical.com>; kailang@realtek.com > <kailang@realtek.com>; geans_chen@realsil.com.cn > <geans_chen@realsil.com.cn>; cix-kernel-upstream <cix-kernel- > upstream@cixtech.com> > 主题: Re: [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack > detection [......] > [Joakim] Let me take realtek alc256 as an example, > hda_call_codec_resume() > 1)codec->patch_ops.resume(codec) // alc269_resume() > codec->patch_ops.init(codec) // alc_init() > spec->init_hook(codec) // alc256_init() > snd_hda_jack_detect(codec, hp_pin) > .... > snd_hda_jack_pin_sense() > jack_detect_update() > jack->pin_sense = read_pin_sense(codec, jack->nid, jack- > >dev_id); // update jack->pin_sense here, but not report jack status > 2)hda_jackpoll_work(&codec->jackpoll_work.work) > snd_hda_jack_poll_all(codec) > old_sense = get_jack_plug_state(jack->pin_sense); > jack_detect_update(codec, jack); > if (changes) > snd_hda_jack_report_sync(codec); > > If the headset is not plugin before system suspending, so the jack->pin_sense > = 0x0, plugin the headset when system in suspended state, system resume > back, the jack->pin_sense update to 0x80000000 from codec > patch_ops.init(), then jackpoll work get the old_sense = 0x80000000 (but > actually it is not old sense before system suspending), and the current jack- > >pin_sense also 0x80000000 when calling jack_detect_update(), as a result > there is no changes, finally not report the headset plugin event. > > Is it logical to report jack status immediately when updating the jack pin > sense? If not, the old pin sense can still be trusted? > > Please correct me if anything misunderstanding, thanks, as a hda newer may > not understood very deeply. I confirm this issue exist in the original logic, but your PoC also fix this issue, I quite agree with your above point of view: "I believe we should simply call snd_hda_jack_report_sync() unconditionally, then schedule the jackpoll work, as done in my PoC patch." With your PoC patch, three issues(patch 1/2/3) have been solved simultaneously, please feel free to add my tested tag: Tested-by: Joakim Zhang <joakim.zhang@cixtech.com> Thanks Joakim ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack detection 2025-06-23 10:39 ` Joakim Zhang @ 2025-06-23 13:11 ` Takashi Iwai 0 siblings, 0 replies; 34+ messages in thread From: Takashi Iwai @ 2025-06-23 13:11 UTC (permalink / raw) To: Joakim Zhang Cc: Takashi Iwai, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, kailang@realtek.com, geans_chen@realsil.com.cn, cix-kernel-upstream On Mon, 23 Jun 2025 12:39:48 +0200, Joakim Zhang wrote: > > Hello Takashi, > > > -----Original Message----- > > From: Joakim Zhang <joakim.zhang@cixtech.com> > > Sent: Saturday, June 21, 2025 2:15 PM > > To: Takashi Iwai <tiwai@suse.de> > > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > chris.chiu@canonical.com; kailang@realtek.com; geans_chen@realsil.com.cn; > > cix-kernel-upstream <cix-kernel-upstream@cixtech.com> > > Subject: 回复: [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for > > jack detection > > > > > > Hello Takashi, > > ________________________________________ > > 发件人: Takashi Iwai <tiwai@suse.de> > > 已发送: 2025 年 6 月 20 日 星期五 20:11 > > 收件人: Joakim Zhang <joakim.zhang@cixtech.com> > > 抄送: perex@perex.cz <perex@perex.cz>; tiwai@suse.com <tiwai@suse.com>; > > linux-sound@vger.kernel.org <linux-sound@vger.kernel.org>; > > chris.chiu@canonical.com <chris.chiu@canonical.com>; kailang@realtek.com > > <kailang@realtek.com>; geans_chen@realsil.com.cn > > <geans_chen@realsil.com.cn>; cix-kernel-upstream <cix-kernel- > > upstream@cixtech.com> > > 主题: Re: [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack > > detection > > [......] > > > [Joakim] Let me take realtek alc256 as an example, > > hda_call_codec_resume() > > 1)codec->patch_ops.resume(codec) // alc269_resume() > > codec->patch_ops.init(codec) // alc_init() > > spec->init_hook(codec) // alc256_init() > > snd_hda_jack_detect(codec, hp_pin) > > .... > > snd_hda_jack_pin_sense() > > jack_detect_update() > > jack->pin_sense = read_pin_sense(codec, jack->nid, jack- > > >dev_id); // update jack->pin_sense here, but not report jack status > > 2)hda_jackpoll_work(&codec->jackpoll_work.work) > > snd_hda_jack_poll_all(codec) > > old_sense = get_jack_plug_state(jack->pin_sense); > > jack_detect_update(codec, jack); > > if (changes) > > snd_hda_jack_report_sync(codec); > > > > If the headset is not plugin before system suspending, so the jack->pin_sense > > = 0x0, plugin the headset when system in suspended state, system resume > > back, the jack->pin_sense update to 0x80000000 from codec > > patch_ops.init(), then jackpoll work get the old_sense = 0x80000000 (but > > actually it is not old sense before system suspending), and the current jack- > > >pin_sense also 0x80000000 when calling jack_detect_update(), as a result > > there is no changes, finally not report the headset plugin event. > > > > Is it logical to report jack status immediately when updating the jack pin > > sense? If not, the old pin sense can still be trusted? > > > > Please correct me if anything misunderstanding, thanks, as a hda newer may > > not understood very deeply. > > I confirm this issue exist in the original logic, but your PoC also fix this issue, I quite agree with your above point of view: > "I believe we should simply call snd_hda_jack_report_sync() unconditionally, then schedule the jackpoll work, as done in my PoC patch." > > With your PoC patch, three issues(patch 1/2/3) have been solved simultaneously, please feel free to add my tested tag: > Tested-by: Joakim Zhang <joakim.zhang@cixtech.com> Good to hear! I'm going to submit the proper patch set. thanks, Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* [PATCH V1 3/4] ALSA: hda: disable jackpoll_in_suspend when system shutdown 2025-06-19 2:08 [PATCH V1 0/4] ALSA: hda: jack detect fixes joakim.zhang 2025-06-19 2:08 ` [PATCH V1 1/4] ALSA: hda: fix controller cannot suspend when codec using jackpoll joakim.zhang 2025-06-19 2:08 ` [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack detection joakim.zhang @ 2025-06-19 2:08 ` joakim.zhang 2025-06-20 12:12 ` Takashi Iwai 2025-06-19 2:08 ` [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 joakim.zhang 2025-06-20 11:51 ` [PATCH V1 0/4] ALSA: hda: jack detect fixes Takashi Iwai 4 siblings, 1 reply; 34+ messages in thread From: joakim.zhang @ 2025-06-19 2:08 UTC (permalink / raw) To: perex, tiwai, linux-sound Cc: chris.chiu, kailang, geans_chen, cix-kernel-upstream, Joakim Zhang From: Joakim Zhang <joakim.zhang@cixtech.com> When do reboot test, kernel panic when system shutdown since jackpoll delayed work tries to read registers via hda bus but the drivers are all shut down. The root cause is that when system shutdown but codec may in runtime resume state, call runtime force suspend would trigger jackpoll delayed work active again, finally cause the kernel panic since it access registers with clocks/reset/power off. Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com> --- sound/pci/hda/hda_codec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 12caa5b2e678..e3424ac7b5a7 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -3026,6 +3026,7 @@ void snd_hda_codec_shutdown(struct hda_codec *codec) list_for_each_entry(cpcm, &codec->pcm_list_head, list) snd_pcm_suspend_all(cpcm->pcm); + codec->bus->jackpoll_in_suspend = 0; pm_runtime_force_suspend(hda_codec_dev(codec)); pm_runtime_disable(hda_codec_dev(codec)); } -- 2.49.0 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [PATCH V1 3/4] ALSA: hda: disable jackpoll_in_suspend when system shutdown 2025-06-19 2:08 ` [PATCH V1 3/4] ALSA: hda: disable jackpoll_in_suspend when system shutdown joakim.zhang @ 2025-06-20 12:12 ` Takashi Iwai 0 siblings, 0 replies; 34+ messages in thread From: Takashi Iwai @ 2025-06-20 12:12 UTC (permalink / raw) To: joakim.zhang Cc: perex, tiwai, linux-sound, chris.chiu, kailang, geans_chen, cix-kernel-upstream On Thu, 19 Jun 2025 04:08:43 +0200, joakim.zhang@cixtech.com wrote: > > From: Joakim Zhang <joakim.zhang@cixtech.com> > > When do reboot test, kernel panic when system shutdown since > jackpoll delayed work tries to read registers via hda bus > but the drivers are all shut down. > > The root cause is that when system shutdown but codec may in > runtime resume state, call runtime force suspend would trigger > jackpoll delayed work active again, finally cause the kernel > panic since it access registers with clocks/reset/power off. > > Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com> > --- > sound/pci/hda/hda_codec.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c > index 12caa5b2e678..e3424ac7b5a7 100644 > --- a/sound/pci/hda/hda_codec.c > +++ b/sound/pci/hda/hda_codec.c > @@ -3026,6 +3026,7 @@ void snd_hda_codec_shutdown(struct hda_codec *codec) > list_for_each_entry(cpcm, &codec->pcm_list_head, list) > snd_pcm_suspend_all(cpcm->pcm); > > + codec->bus->jackpoll_in_suspend = 0; > pm_runtime_force_suspend(hda_codec_dev(codec)); This one should be better with codec->jackpoll_interval = 0, set before cancel_work_sync(). Then it'll guarantee that the jackpoll work won't be called any more. thanks, Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-06-19 2:08 [PATCH V1 0/4] ALSA: hda: jack detect fixes joakim.zhang ` (2 preceding siblings ...) 2025-06-19 2:08 ` [PATCH V1 3/4] ALSA: hda: disable jackpoll_in_suspend when system shutdown joakim.zhang @ 2025-06-19 2:08 ` joakim.zhang 2025-06-20 12:13 ` Takashi Iwai 2025-06-20 11:51 ` [PATCH V1 0/4] ALSA: hda: jack detect fixes Takashi Iwai 4 siblings, 1 reply; 34+ messages in thread From: joakim.zhang @ 2025-06-19 2:08 UTC (permalink / raw) To: perex, tiwai, linux-sound Cc: chris.chiu, kailang, geans_chen, cix-kernel-upstream, Joakim Zhang From: Joakim Zhang <joakim.zhang@cixtech.com> - fix mic jack detect failed on alc256, similar issue as below commit commit 3f7424905782 ("ALSA: hda/realtek - Couldn't detect Mic if booting with headset plugged") - confirm with realtek engineer, alc256 also has such issue Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com> --- sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index bca725bb8281..a79b542e2a01 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -12193,6 +12193,8 @@ static int patch_alc269(struct hda_codec *codec) if (codec->core.vendor_id == 0x10ec0236 && codec->bus->pci->vendor != PCI_VENDOR_ID_AMD) spec->en_3kpull_low = false; + if (codec->core.vendor_id == 0x10ec0256) + spec->en_3kpull_low = false; break; case 0x10ec0257: spec->codec_variant = ALC269_TYPE_ALC257; -- 2.49.0 ^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-06-19 2:08 ` [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 joakim.zhang @ 2025-06-20 12:13 ` Takashi Iwai 2025-06-24 2:31 ` Kailang 0 siblings, 1 reply; 34+ messages in thread From: Takashi Iwai @ 2025-06-20 12:13 UTC (permalink / raw) To: joakim.zhang Cc: perex, tiwai, linux-sound, chris.chiu, kailang, geans_chen, cix-kernel-upstream On Thu, 19 Jun 2025 04:08:44 +0200, joakim.zhang@cixtech.com wrote: > > From: Joakim Zhang <joakim.zhang@cixtech.com> > > - fix mic jack detect failed on alc256, similar issue as below commit > commit 3f7424905782 ("ALSA: hda/realtek - Couldn't detect Mic if booting with headset plugged") > - confirm with realtek engineer, alc256 also has such issue > > Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com> > --- > sound/pci/hda/patch_realtek.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > index bca725bb8281..a79b542e2a01 100644 > --- a/sound/pci/hda/patch_realtek.c > +++ b/sound/pci/hda/patch_realtek.c > @@ -12193,6 +12193,8 @@ static int patch_alc269(struct hda_codec *codec) > if (codec->core.vendor_id == 0x10ec0236 && > codec->bus->pci->vendor != PCI_VENDOR_ID_AMD) > spec->en_3kpull_low = false; > + if (codec->core.vendor_id == 0x10ec0256) > + spec->en_3kpull_low = false; This needs a confirmation from Realtek. Kailang, could you verify it? thanks, Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-06-20 12:13 ` Takashi Iwai @ 2025-06-24 2:31 ` Kailang 2025-06-24 3:32 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Kailang @ 2025-06-24 2:31 UTC (permalink / raw) To: Takashi Iwai, joakim.zhang@cixtech.com Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen, cix-kernel-upstream@cixtech.com [-- Attachment #1: Type: text/plain, Size: 2039 bytes --] Hi Joakim, Could you use alsa-info.sh to dump codec info to us? Your platform was ARM Architecture. So, it's no PCI device. Right? > -----Original Message----- > From: Takashi Iwai <tiwai@suse.de> > Sent: Friday, June 20, 2025 8:13 PM > To: joakim.zhang@cixtech.com > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; Kailang <kailang@realtek.com>; Geans_chen > <geans_chen@realsil.com.cn>; cix-kernel-upstream@cixtech.com > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > alc256 > > > External mail : This email originated from outside the organization. Do not > reply, click links, or open attachments unless you recognize the sender and > know the content is safe. > > > > On Thu, 19 Jun 2025 04:08:44 +0200, > joakim.zhang@cixtech.com wrote: > > > > From: Joakim Zhang <joakim.zhang@cixtech.com> > > > > - fix mic jack detect failed on alc256, similar issue as below commit > > commit 3f7424905782 ("ALSA: hda/realtek - Couldn't detect Mic if > > booting with headset plugged") > > - confirm with realtek engineer, alc256 also has such issue > > > > Signed-off-by: Joakim Zhang <joakim.zhang@cixtech.com> > > --- > > sound/pci/hda/patch_realtek.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/sound/pci/hda/patch_realtek.c > > b/sound/pci/hda/patch_realtek.c index bca725bb8281..a79b542e2a01 > > 100644 > > --- a/sound/pci/hda/patch_realtek.c > > +++ b/sound/pci/hda/patch_realtek.c > > @@ -12193,6 +12193,8 @@ static int patch_alc269(struct hda_codec > *codec) > > if (codec->core.vendor_id == 0x10ec0236 && > > codec->bus->pci->vendor != PCI_VENDOR_ID_AMD) > > spec->en_3kpull_low = false; > > + if (codec->core.vendor_id == 0x10ec0256) > > + spec->en_3kpull_low = false; > > This needs a confirmation from Realtek. > > Kailang, could you verify it? > > > thanks, > > Takashi [-- Attachment #2: alsa-info.sh --] [-- Type: application/octet-stream, Size: 27734 bytes --] #!/bin/bash echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef SCRIPT_VERSION=0.4.63 CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog" ################################################################################# #Copyright (C) 2007 Free Software Foundation. #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ################################################################################## #The script was written for 2 main reasons: # 1. Remove the need for the devs/helpers to ask several questions before we can easily help the user. # 2. Allow newer/inexperienced ALSA users to give us all the info we need to help them. #Set the locale (this may or may not be a good idea.. let me know) export LC_ALL=C #Change the PATH variable, so we can run lspci (needed for some distros) PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin BGTITLE="ALSA-Info v $SCRIPT_VERSION" PASTEBINKEY="C9cRIO8m/9y8Cs0nVs0FraRx7U0pHsuc" #Define some simple functions pbcheck(){ [[ $UPLOAD = "no" ]] && return if [[ -z $PASTEBIN ]]; then [[ $(ping -c1 www.alsa-project.org) ]] || KEEP_FILES="yes" UPLOAD="no" PBERROR="yes" else [[ $(ping -c1 www.pastebin.ca) ]] || KEEP_FILES="yes" UPLOAD="no" PBERROR="yes" fi } update() { SHFILE=`mktemp -t alsa-info.XXXXXXXXXX` || exit 1 wget -O $SHFILE "http://www.alsa-project.org/alsa-info.sh" >/dev/null 2>&1 REMOTE_VERSION=`grep SCRIPT_VERSION $SHFILE |head -n1 |sed 's/.*=//'` if [ "$REMOTE_VERSION" != "$SCRIPT_VERSION" ]; then if [[ -n $DIALOG ]] then OVERWRITE= if [ -w $0 ]; then dialog --yesno "Newer version of ALSA-Info has been found\n\nDo you wish to install it?\nNOTICE: The original file $0 will be overwritten!" 0 0 DIALOG_EXIT_CODE=$? if [[ $DIALOG_EXIT_CODE = 0 ]]; then OVERWRITE=yes fi fi if [ -z "$OVERWRITE" ]; then dialog --yesno "Newer version of ALSA-Info has been found\n\nDo you wish to download it?" 0 0 DIALOG_EXIT_CODE=$? fi if [[ $DIALOG_EXIT_CODE = 0 ]] then echo "Newer version detected: $REMOTE_VERSION" echo "To view the ChangeLog, please visit $CHANGELOG" if [ "$OVERWRITE" = "yes" ]; then cp $SHFILE $0 echo "ALSA-Info script has been updated to v $REMOTE_VERSION" echo "Please re-run the script" rm $SHFILE 2>/dev/null else echo "ALSA-Info script has been downloaded as $SHFILE." echo "Please re-run the script from new location." fi exit else rm $SHFILE 2>/dev/null fi else echo "Newer version detected: $REMOTE_VERSION" echo "To view the ChangeLog, please visit $CHANGELOG" if [ -w $0 ]; then echo "The original file $0 will be overwritten!" echo -n "If you do not like to proceed, press Ctrl-C now.." ; read inp cp $SHFILE $0 echo "ALSA-Info script has been updated. Please re-run it." rm $SHFILE 2>/dev/null else echo "ALSA-Info script has been downloaded $SHFILE." echo "Please, re-run it from new location." fi exit fi else rm $SHFILE 2>/dev/null fi } cleanup() { if [ -n "$TEMPDIR" -a "$KEEP_FILES" != "yes" ]; then rm -rf "$TEMPDIR" 2>/dev/null fi test -n "$KEEP_OUTPUT" || rm -f "$NFILE" } withaplay() { echo "!!Aplay/Arecord output" >> $FILE echo "!!--------------------" >> $FILE echo "" >> $FILE echo "APLAY" >> $FILE echo "" >> $FILE aplay -l >> $FILE 2>&1 echo "" >> $FILE echo "ARECORD" >> $FILE echo "" >> $FILE arecord -l >> $FILE 2>&1 echo "" >> $FILE } withlsmod() { echo "!!All Loaded Modules" >> $FILE echo "!!------------------" >> $FILE echo "" >> $FILE lsmod |awk {'print $1'} >> $FILE echo "" >> $FILE echo "" >> $FILE } withamixer() { echo "!!Amixer output" >> $FILE echo "!!-------------" >> $FILE echo "" >> $FILE for i in `grep "]: " /proc/asound/cards | awk -F ' ' '{ print $1} '` ; do CARD_NAME=`grep "^ *$i " $TEMPDIR/alsacards.tmp|awk {'print $2'}` echo "!!-------Mixer controls for card $i $CARD_NAME]" >> $FILE echo "" >>$FILE amixer -c$i info>> $FILE 2>&1 amixer -c$i>> $FILE 2>&1 echo "" >> $FILE done echo "" >> $FILE } withalsactl() { echo "!!Alsactl output" >> $FILE echo "!!--------------" >> $FILE echo "" >> $FILE exe="" if [ -x /usr/sbin/alsactl ]; then exe="/usr/sbin/alsactl" fi if [ -x /usr/local/sbin/alsactl ]; then exe="/usr/local/sbin/alsactl" fi if [ -z "$exe" ]; then exe=`whereis alsactl | cut -d ' ' -f 2` fi $exe -f $TEMPDIR/alsactl.tmp store echo "--startcollapse--" >> $FILE cat $TEMPDIR/alsactl.tmp >> $FILE echo "--endcollapse--" >> $FILE echo "" >> $FILE echo "" >> $FILE } withdevices() { echo "!!ALSA Device nodes" >> $FILE echo "!!-----------------" >> $FILE echo "" >> $FILE ls -la /dev/snd/* >> $FILE echo "" >> $FILE echo "" >> $FILE } withconfigs() { if [[ -e $HOME/.asoundrc ]] || [[ -e /etc/asound.conf ]] || [[ -e $HOME/.asoundrc.asoundconf ]] then echo "!!ALSA configuration files" >> $FILE echo "!!------------------------" >> $FILE echo "" >> $FILE #Check for ~/.asoundrc if [[ -e $HOME/.asoundrc ]] then echo "!!User specific config file (~/.asoundrc)" >> $FILE echo "" >> $FILE cat $HOME/.asoundrc >> $FILE echo "" >> $FILE echo "" >> $FILE fi #Check for .asoundrc.asoundconf (seems to be Ubuntu specific) if [[ -e $HOME/.asoundrc.asoundconf ]] then echo "!!asoundconf-generated config file" >> $FILE echo "" >> $FILE cat $HOME/.asoundrc.asoundconf >> $FILE echo "" >> $FILE echo "" >> $FILE fi #Check for /etc/asound.conf if [[ -e /etc/asound.conf ]] then echo "!!System wide config file (/etc/asound.conf)" >> $FILE echo "" >> $FILE cat /etc/asound.conf >> $FILE echo "" >> $FILE echo "" >> $FILE fi fi } withsysfs() { local i f local printed="" for i in /sys/class/sound/*; do case "$i" in */hwC?D?) if [ -f $i/init_pin_configs ]; then if [ -z "$printed" ]; then echo "!!Sysfs Files" >> $FILE echo "!!-----------" >> $FILE echo "" >> $FILE fi for f in init_pin_configs driver_pin_configs user_pin_configs init_verbs hints; do echo "$i/$f:" >> $FILE cat $i/$f >> $FILE echo >> $FILE done printed=yes fi ;; esac done if [ -n "$printed" ]; then echo "" >> $FILE fi } withdmesg() { echo "!!ALSA/HDA dmesg" >> $FILE echo "!!--------------" >> $FILE echo "" >> $FILE dmesg | grep -C1 -E 'ALSA|HDA|HDMI|snd[_-]|sound|hda.codec|hda.intel' >> $FILE echo "" >> $FILE echo "" >> $FILE } withall() { withdevices withconfigs withaplay withamixer withalsactl withlsmod withsysfs withdmesg } get_alsa_library_version() { ALSA_LIB_VERSION=`grep VERSION_STR /usr/include/alsa/version.h 2>/dev/null|awk {'print $3'}|sed 's/"//g'` if [ -z "$ALSA_LIB_VERSION" ]; then if [ -f /etc/lsb-release ]; then . /etc/lsb-release case "$DISTRIB_ID" in Ubuntu) if which dpkg > /dev/null ; then ALSA_LIB_VERSION=`dpkg -l libasound2 | tail -1 | awk '{print $3}' | cut -f 1 -d -` fi if [ "$ALSA_LIB_VERSION" = "<none>" ]; then ALSA_LIB_VERSION="" fi return ;; *) return ;; esac elif [ -f /etc/debian_version ]; then if which dpkg > /dev/null ; then ALSA_LIB_VERSION=`dpkg -l libasound2 | tail -1 | awk '{print $3}' | cut -f 1 -d -` fi if [ "$ALSA_LIB_VERSION" = "<none>" ]; then ALSA_LIB_VERSION="" fi return fi fi } #Run checks to make sure the programs we need are installed. LSPCI=$(which lspci 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null); TPUT=$(which tput 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null); DIALOG=$(which dialog 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null); #Check to see if sysfs is enabled in the kernel. We'll need this later on SYSFS=$(mount |grep sysfs|awk {'print $3'}); #Check modprobe config files for sound related options SNDOPTIONS=$(modprobe -c|sed -n 's/^options \(snd[-_][^ ]*\)/\1:/p') KEEP_OUTPUT= NFILE="" PASTEBIN="" WWWSERVICE="www.alsa-project.org" WELCOME="yes" PROCEED="yes" UPLOAD="ask" REPEAT="" while [ -z "$REPEAT" ]; do REPEAT="no" case "$1" in --update|--help|--about) WELCOME="no" PROCEED="no" ;; --upload) UPLOAD="yes" WELCOME="no" ;; --no-upload) UPLOAD="no" WELCOME="no" ;; --pastebin) PASTEBIN="yes" WWWSERVICE="pastebin" ;; --no-dialog) DIALOG="" REPEAT="" shift ;; --stdout) DIALOG="" UPLOAD="no" WELCOME="no" TOSTDOUT="yes" ;; esac done #Script header output. if [ "$WELCOME" = "yes" ]; then greeting_message="\ This script visits the following commands/files to collect diagnostic information about your ALSA installation and sound related hardware. dmesg lspci lsmod aplay amixer alsactl /proc/asound/ /sys/class/sound/ ~/.asoundrc (etc.) See '$0 --help' for command line options. " if [ -n "$DIALOG" ]; then dialog --backtitle "$BGTITLE" \ --title "ALSA-Info script v $SCRIPT_VERSION" \ --msgbox "$greeting_message" 20 80 else echo "ALSA Information Script v $SCRIPT_VERSION" echo "--------------------------------" echo "$greeting_message" fi # dialog fi # WELCOME #Set the output file TEMPDIR=`mktemp -t -d alsa-info.XXXXXXXXXX` || exit 1 FILE="$TEMPDIR/alsa-info.txt" if [ -z "$NFILE" ]; then NFILE=`mktemp -t alsa-info.txt.XXXXXXXXXX` || exit 1 fi trap cleanup 0 if [ "$PROCEED" = "yes" ]; then if [ -z "$LSPCI" ]; then if [ -d /sys/bus/pci ]; then echo "This script requires lspci. Please install it, and re-run this script." exit 0 fi fi #Fetch the info and store in temp files/variables DISTRO=`grep -ihs "buntu\|SUSE\|Fedora\|PCLinuxOS\|MEPIS\|Mandriva\|Debian\|Damn\|Sabayon\|Slackware\|KNOPPIX\|Gentoo\|Zenwalk\|Mint\|Kubuntu\|FreeBSD\|Puppy\|Freespire\|Vector\|Dreamlinux\|CentOS\|Arch\|Xandros\|Elive\|SLAX\|Red\|BSD\|KANOTIX\|Nexenta\|Foresight\|GeeXboX\|Frugalware\|64\|SystemRescue\|Novell\|Solaris\|BackTrack\|KateOS\|Pardus" /etc/{issue,*release,*version}` KERNEL_VERSION=`uname -r` KERNEL_PROCESSOR=`uname -p` KERNEL_MACHINE=`uname -m` KERNEL_OS=`uname -o` [[ `uname -v | grep SMP` ]] && KERNEL_SMP="Yes" || KERNEL_SMP="No" ALSA_DRIVER_VERSION=`cat /proc/asound/version |head -n1|awk {'print $7'} |sed 's/\.$//'` get_alsa_library_version ALSA_UTILS_VERSION=`amixer -v |awk {'print $3'}` LAST_CARD=$((`grep "]: " /proc/asound/cards | wc -l` - 1 )) ESDINST=$(which esd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) PAINST=$(which pulseaudio 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) ARTSINST=$(which artsd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) JACKINST=$(which jackd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) ROARINST=$(which roard 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) DMIDECODE=$(which dmidecode 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) #Check for DMI data if [ -d /sys/class/dmi/id ]; then # No root privileges are required when using sysfs method DMI_SYSTEM_MANUFACTURER=$(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) DMI_SYSTEM_PRODUCT_NAME=$(cat /sys/class/dmi/id/product_name 2>/dev/null) DMI_SYSTEM_PRODUCT_VERSION=$(cat /sys/class/dmi/id/product_version 2>/dev/null) DMI_SYSTEM_FIRMWARE_VERSION=$(cat /sys/class/dmi/id/bios_version 2>/dev/null) elif [ -x $DMIDECODE ]; then DMI_SYSTEM_MANUFACTURER=$($DMIDECODE -s system-manufacturer 2>/dev/null) DMI_SYSTEM_PRODUCT_NAME=$($DMIDECODE -s system-product-name 2>/dev/null) DMI_SYSTEM_PRODUCT_VERSION=$($DMIDECODE -s system-version 2>/dev/null) DMI_SYSTEM_FIRMWARE_VERSION=$($DMIDECODE -s bios-version 2>/dev/null) fi cat /proc/asound/modules 2>/dev/null|awk {'print $2'}>$TEMPDIR/alsamodules.tmp cat /proc/asound/cards >$TEMPDIR/alsacards.tmp if [[ ! -z "$LSPCI" ]]; then lspci |grep -i "multi\|audio">$TEMPDIR/lspci.tmp fi #Check for HDA-Intel cards codec#* cat /proc/asound/card*/codec\#* > $TEMPDIR/alsa-hda-intel.tmp 2> /dev/null #Check for AC97 cards codec cat /proc/asound/card*/codec97\#0/ac97\#0-0 > $TEMPDIR/alsa-ac97.tmp 2> /dev/null cat /proc/asound/card*/codec97\#0/ac97\#0-0+regs > $TEMPDIR/alsa-ac97-regs.tmp 2> /dev/null #Check for USB mixer setup cat /proc/asound/card*/usbmixer > $TEMPDIR/alsa-usbmixer.tmp 2> /dev/null #Fetch the info, and put it in $FILE in a nice readable format. if [[ -z $PASTEBIN ]]; then echo "upload=true&script=true&cardinfo=" > $FILE else echo "name=$USER&type=33&description=/tmp/alsa-info.txt&expiry=&s=Submit+Post&content=" > $FILE fi echo "!!################################" >> $FILE echo "!!ALSA Information Script v $SCRIPT_VERSION" >> $FILE echo "!!################################" >> $FILE echo "" >> $FILE echo "!!Script ran on: `LANG=C TZ=UTC date`" >> $FILE echo "" >> $FILE echo "" >> $FILE echo "!!Linux Distribution" >> $FILE echo "!!------------------" >> $FILE echo "" >> $FILE echo $DISTRO >> $FILE echo "" >> $FILE echo "" >> $FILE echo "!!DMI Information" >> $FILE echo "!!---------------" >> $FILE echo "" >> $FILE echo "Manufacturer: $DMI_SYSTEM_MANUFACTURER" >> $FILE echo "Product Name: $DMI_SYSTEM_PRODUCT_NAME" >> $FILE echo "Product Version: $DMI_SYSTEM_PRODUCT_VERSION" >> $FILE echo "Firmware Version: $DMI_SYSTEM_FIRMWARE_VERSION" >> $FILE echo "" >> $FILE echo "" >> $FILE echo "!!Kernel Information" >> $FILE echo "!!------------------" >> $FILE echo "" >> $FILE echo "Kernel release: $KERNEL_VERSION" >> $FILE echo "Operating System: $KERNEL_OS" >> $FILE echo "Architecture: $KERNEL_MACHINE" >> $FILE echo "Processor: $KERNEL_PROCESSOR" >> $FILE echo "SMP Enabled: $KERNEL_SMP" >> $FILE echo "" >> $FILE echo "" >> $FILE echo "!!ALSA Version" >> $FILE echo "!!------------" >> $FILE echo "" >> $FILE echo "Driver version: $ALSA_DRIVER_VERSION" >> $FILE echo "Library version: $ALSA_LIB_VERSION" >> $FILE echo "Utilities version: $ALSA_UTILS_VERSION" >> $FILE echo "" >> $FILE echo "" >> $FILE echo "!!Loaded ALSA modules" >> $FILE echo "!!-------------------" >> $FILE echo "" >> $FILE cat $TEMPDIR/alsamodules.tmp >> $FILE echo "" >> $FILE echo "" >> $FILE echo "!!Sound Servers on this system" >> $FILE echo "!!----------------------------" >> $FILE echo "" >> $FILE if [[ -n $PAINST ]];then [[ `pgrep '^(.*/)?pulseaudio$'` ]] && PARUNNING="Yes" || PARUNNING="No" echo "Pulseaudio:" >> $FILE echo " Installed - Yes ($PAINST)" >> $FILE echo " Running - $PARUNNING" >> $FILE echo "" >> $FILE fi if [[ -n $ESDINST ]];then [[ `pgrep '^(.*/)?esd$'` ]] && ESDRUNNING="Yes" || ESDRUNNING="No" echo "ESound Daemon:" >> $FILE echo " Installed - Yes ($ESDINST)" >> $FILE echo " Running - $ESDRUNNING" >> $FILE echo "" >> $FILE fi if [[ -n $ARTSINST ]];then [[ `pgrep '^(.*/)?artsd$'` ]] && ARTSRUNNING="Yes" || ARTSRUNNING="No" echo "aRts:" >> $FILE echo " Installed - Yes ($ARTSINST)" >> $FILE echo " Running - $ARTSRUNNING" >> $FILE echo "" >> $FILE fi if [[ -n $JACKINST ]];then [[ `pgrep '^(.*/)?jackd$'` ]] && JACKRUNNING="Yes" || JACKRUNNING="No" echo "Jack:" >> $FILE echo " Installed - Yes ($JACKINST)" >> $FILE echo " Running - $JACKRUNNING" >> $FILE echo "" >> $FILE fi if [[ -n $ROARINST ]];then [[ `pgrep '^(.*/)?roard$'` ]] && ROARRUNNING="Yes" || ROARRUNNING="No" echo "RoarAudio:" >> $FILE echo " Installed - Yes ($ROARINST)" >> $FILE echo " Running - $ROARRUNNING" >> $FILE echo "" >> $FILE fi if [[ -z "$PAINST" && -z "$ESDINST" && -z "$ARTSINST" && -z "$JACKINST" && -z "$ROARINST" ]];then echo "No sound servers found." >> $FILE echo "" >> $FILE fi echo "" >> $FILE echo "!!Soundcards recognised by ALSA" >> $FILE echo "!!-----------------------------" >> $FILE echo "" >> $FILE cat $TEMPDIR/alsacards.tmp >> $FILE echo "" >> $FILE echo "" >> $FILE if [[ ! -z "$LSPCI" ]]; then echo "!!PCI Soundcards installed in the system" >> $FILE echo "!!--------------------------------------" >> $FILE echo "" >> $FILE cat $TEMPDIR/lspci.tmp >> $FILE echo "" >> $FILE echo "" >> $FILE echo "!!Advanced information - PCI Vendor/Device/Subsystem ID's" >> $FILE echo "!!-------------------------------------------------------" >> $FILE echo "" >> $FILE lspci -vvn |grep -A1 040[1-3] >> $FILE echo "" >> $FILE echo "" >> $FILE fi if [ "$SNDOPTIONS" ] then echo "!!Modprobe options (Sound related)" >> $FILE echo "!!--------------------------------" >> $FILE echo "" >> $FILE modprobe -c|sed -n 's/^options \(snd[-_][^ ]*\)/\1:/p' >> $FILE echo "" >> $FILE echo "" >> $FILE fi if [ -d "$SYSFS" ] then echo "!!Loaded sound module options" >> $FILE echo "!!---------------------------" >> $FILE echo "" >> $FILE for mod in `cat /proc/asound/modules|awk {'print $2'}`;do echo "!!Module: $mod" >> $FILE for params in `echo $SYSFS/module/$mod/parameters/*`; do echo -ne "\t"; echo "$params : `cat $params`" | sed 's:.*/::'; done >> $FILE echo "" >> $FILE done echo "" >> $FILE fi if [ -s "$TEMPDIR/alsa-hda-intel.tmp" ]; then echo "!!HDA-Intel Codec information" >> $FILE echo "!!---------------------------" >> $FILE echo "--startcollapse--" >> $FILE echo "" >> $FILE cat $TEMPDIR/alsa-hda-intel.tmp >> $FILE echo "--endcollapse--" >> $FILE echo "" >> $FILE echo "" >> $FILE fi if [ -s "$TEMPDIR/alsa-ac97.tmp" ]; then echo "!!AC97 Codec information" >> $FILE echo "!!----------------------" >> $FILE echo "--startcollapse--" >> $FILE echo "" >> $FILE cat $TEMPDIR/alsa-ac97.tmp >> $FILE echo "" >> $FILE cat $TEMPDIR/alsa-ac97-regs.tmp >> $FILE echo "--endcollapse--" >> $FILE echo "" >> $FILE echo "" >> $FILE fi if [ -s "$TEMPDIR/alsa-usbmixer.tmp" ]; then echo "!!USB Mixer information" >> $FILE echo "!!---------------------" >> $FILE echo "--startcollapse--" >> $FILE echo "" >> $FILE cat $TEMPDIR/alsa-usbmixer.tmp >> $FILE echo "--endcollapse--" >> $FILE echo "" >> $FILE echo "" >> $FILE fi #If no command line options are specified, then run as though --with-all was specified if [ -z "$1" ]; then update withall pbcheck fi fi # proceed #loop through command line arguments, until none are left. if [ -n "$1" ]; then until [ -z "$1" ] do case "$1" in --pastebin) update withall pbcheck ;; --update) update exit ;; --upload) UPLOAD="yes" withall ;; --no-upload) UPLOAD="no" withall ;; --output) shift NFILE="$1" KEEP_OUTPUT="yes" ;; --debug) echo "Debugging enabled. $FILE and $TEMPDIR will not be deleted" KEEP_FILES="yes" echo "" withall ;; --with-all) withall ;; --with-aplay) withaplay ;; --with-amixer) withamixer ;; --with-alsactl) withalsactl ;; --with-devices) withdevices ;; --with-dmesg) withdmesg ;; --with-configs) if [[ -e $HOME/.asoundrc ]] || [[ -e /etc/asound.conf ]] then echo "!!ALSA configuration files" >> $FILE echo "!!------------------------" >> $FILE echo "" >> $FILE #Check for ~/.asoundrc if [[ -e $HOME/.asoundrc ]] then echo "!!User specific config file ($HOME/.asoundrc)" >> $FILE echo "" >> $FILE cat $HOME/.asoundrc >> $FILE echo "" >> $FILE echo "" >> $FILE fi #Check for /etc/asound.conf if [[ -e /etc/asound.conf ]] then echo "!!System wide config file (/etc/asound.conf)" >> $FILE echo "" >> $FILE cat /etc/asound.conf >> $FILE echo "" >> $FILE echo "" >> $FILE fi fi ;; --stdout) UPLOAD="no" withall cat $FILE rm $FILE ;; --about) echo "Written/Tested by the following users of #alsa on irc.freenode.net:" echo "" echo " wishie - Script author and developer / Testing" echo " crimsun - Various script ideas / Testing" echo " gnubien - Various script ideas / Testing" echo " GrueMaster - HDA Intel specific items / Testing" echo " olegfink - Script update function" echo " TheMuso - display to stdout functionality" exit 0 ;; *) echo "alsa-info.sh version $SCRIPT_VERSION" echo "" echo "Available options:" echo " --with-aplay (includes the output of aplay -l)" echo " --with-amixer (includes the output of amixer)" echo " --with-alsactl (includes the output of alsactl)" echo " --with-configs (includes the output of ~/.asoundrc and" echo " /etc/asound.conf if they exist)" echo " --with-devices (shows the device nodes in /dev/snd/)" echo " --with-dmesg (shows the ALSA/HDA kernel messages)" echo "" echo " --output FILE (specify the file to output for no-upload mode)" echo " --update (check server for script updates)" echo " --upload (upload contents to remote server)" echo " --no-upload (do not upload contents to remote server)" echo " --pastebin (use http://pastebin.ca) as remote server" echo " instead www.alsa-project.org" echo " --stdout (print alsa information to standard output" echo " instead of a file)" echo " --about (show some information about the script)" echo " --debug (will run the script as normal, but will not" echo " delete $FILE)" exit 0 ;; esac shift 1 done fi if [ "$PROCEED" = "no" ]; then exit 1 fi if [ "$UPLOAD" = "ask" ]; then if [ -n "$DIALOG" ]; then dialog --backtitle "$BGTITLE" --title "Information collected" --yes-label " UPLOAD / SHARE " --no-label " SAVE LOCALLY " --defaultno --yesno "\n\nAutomatically upload ALSA information to $WWWSERVICE?" 10 80 DIALOG_EXIT_CODE=$? if [ $DIALOG_EXIT_CODE != 0 ]; then UPLOAD="no" else UPLOAD="yes" fi else echo -n "Automatically upload ALSA information to $WWWSERVICE? [y/N] : " read -e CONFIRM if [ "$CONFIRM" != "y" ]; then UPLOAD="no" else UPLOAD="yes" fi fi fi if [ "$UPLOAD" = "no" ]; then if [ -z "$TOSTDOUT" ]; then mv -f $FILE $NFILE || exit 1 KEEP_OUTPUT="yes" fi if [[ -n $DIALOG ]] then if [[ -n $PBERROR ]]; then dialog --backtitle "$BGTITLE" --title "Information collected" --msgbox "An error occurred while contacting the $WWWSERVICE.\n Your information was NOT automatically uploaded.\n\nYour ALSA information is in $NFILE" 10 100 else dialog --backtitle "$BGTITLE" --title "Information collected" --msgbox "\n\nYour ALSA information is in $NFILE" 10 60 fi else echo if [[ -n $PBERROR ]]; then echo "An error occurred while contacting the $WWWSERVICE." echo "Your information was NOT automatically uploaded." echo "" echo "Your ALSA information is in $NFILE" echo "" else if [ -z "$TOSTDOUT" ]; then echo "" echo "Your ALSA information is in $NFILE" echo "" fi fi fi exit fi # UPLOAD #Test that wget is installed, and supports --post-file. Upload $FILE if it does, and prompt user to upload file if it doesnt. if WGET=$(which wget 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null); [[ -n "${WGET}" ]] && [[ -x "${WGET}" ]] && [[ `wget --help |grep post-file` ]] then if [[ -n $DIALOG ]] then if [[ -z $PASTEBIN ]]; then wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://www.alsa-project.org/cardinfo-db/" &>$TEMPDIR/wget.tmp || echo "Upload failed; exit" { for i in 10 20 30 40 50 60 70 80 90; do echo $i sleep 0.2 done echo; } |dialog --backtitle "$BGTITLE" --guage "Uploading information to www.alsa-project.org ..." 6 70 0 else wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY&encrypt=t&encryptpw=blahblah" &>$TEMPDIR/wget.tmp || echo "Upload failed; exit" { for i in 10 20 30 40 50 60 70 80 90; do echo $i sleep 0.2 done echo; } |dialog --backtitle "$BGTITLE" --guage "Uploading information to www.pastebin.ca ..." 6 70 0 fi dialog --backtitle "$BGTITLE" --title "Information uploaded" --yesno "Would you like to see the uploaded information?" 5 100 DIALOG_EXIT_CODE=$? if [ $DIALOG_EXIT_CODE = 0 ]; then grep -v "alsa-info.txt" $FILE >$TEMPDIR/uploaded.txt dialog --backtitle "$BGTITLE" --textbox $TEMPDIR/uploaded.txt 0 0 fi clear # no dialog else if [[ -z $PASTEBIN ]]; then echo -n "Uploading information to www.alsa-project.org ... " wget -O - --tries=5 --timeout=60 --post-file=$FILE http://www.alsa-project.org/cardinfo-db/ &>$TEMPDIR/wget.tmp & else echo -n "Uploading information to www.pastebin.ca ... " wget -O - --tries=5 --timeout=60 --post-file=$FILE http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY &>$TEMPDIR/wget.tmp & fi #Progess spinner for wget transfer. i=1 sp="/-\|" echo -n ' ' while pgrep wget &>/dev/null do echo -en "\b${sp:i++%${#sp}:1}" done echo -e "\b Done!" echo "" fi #dialog #See if tput is available, and use it if it is. if [ -n "$TPUT" ]; then if [[ -z $PASTEBIN ]]; then FINAL_URL=`tput setaf 1; grep "SUCCESS:" $TEMPDIR/wget.tmp | cut -d ' ' -f 2 ; tput sgr0` else FINAL_URL=`tput setaf 1; grep "SUCCESS:" $TEMPDIR/wget.tmp | sed -n 's/.*\:\([0-9]\+\).*/http:\/\/pastebin.ca\/\1/p';tput sgr0` fi else if [[ -z $PASTEBIN ]]; then FINAL_URL=`grep "SUCCESS:" $TEMPDIR/wget.tmp | cut -d ' ' -f 2` else FINAL_URL=`grep "SUCCESS:" $TEMPDIR/wget.tmp | sed -n 's/.*\:\([0-9]\+\).*/http:\/\/pastebin.ca\/\1/p'` fi fi # Output the URL of the uploaded file. echo "Your ALSA information is located at $FINAL_URL" echo "Please inform the person helping you." echo "" # We couldnt find a suitable wget, so tell the user to upload manually. else mv -f $FILE $NFILE || exit 1 KEEP_OUTPUT="yes" if [[ -z $DIALOG ]] then if [[ -z $PASTEBIN ]]; then echo "" echo "Could not automatically upload output to http://www.alsa-project.org" echo "Possible reasons are:" echo " 1. Couldnt find 'wget' in your PATH" echo " 2. Your version of wget is less than 1.8.2" echo "" echo "Please manually upload $NFILE to http://www.alsa-project.org/cardinfo-db/ and submit your post." echo "" else echo "" echo "Could not automatically upload output to http://www.pastebin.ca" echo "Possible reasons are:" echo " 1. Couldnt find 'wget' in your PATH" echo " 2. Your version of wget is less than 1.8.2" echo "" echo "Please manually upload $NFILE to http://www.pastebin.ca/upload.php and submit your post." echo "" fi else if [[ -z $PASTEBIN ]]; then dialog --backtitle "$BGTITLE" --msgbox "Could not automatically upload output to http://www.alsa-project.org.\nPossible reasons are:\n\n 1. Couldn't find 'wget' in your PATH\n 2. Your version of wget is less than 1.8.2\n\nPlease manually upload $NFILE to http://www.alsa-project,org/cardinfo-db/ and submit your post." 25 100 else dialog --backtitle "$BGTITLE" --msgbox "Could not automatically upload output to http://www.pastebin.ca.\nPossible reasons are:\n\n 1. Couldn't find 'wget' in your PATH\n 2. Your version of wget is less than 1.8.2\n\nPlease manually upload $NFILE to http://www.pastebin.ca/upload.php and submit your post." 25 100 fi fi fi ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-06-24 2:31 ` Kailang @ 2025-06-24 3:32 ` Joakim Zhang 2025-06-24 6:17 ` Kailang 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-06-24 3:32 UTC (permalink / raw) To: Kailang, Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen, cix-kernel-upstream [-- Attachment #1: Type: text/plain, Size: 1329 bytes --] Hello Kailang > -----Original Message----- > From: Kailang <kailang@realtek.com> > Sent: Tuesday, June 24, 2025 10:31 AM > To: Takashi Iwai <tiwai@suse.de>; Joakim Zhang <joakim.zhang@cixtech.com> > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; cix- > kernel-upstream <cix-kernel-upstream@cixtech.com> > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > alc256 > > EXTERNAL EMAIL > > Hi Joakim, > > Could you use alsa-info.sh to dump codec info to us? > Your platform was ARM Architecture. So, it's no PCI device. Right? Yes, our HDA controller under AXI bus based on ARM arch, so I'm a little worried whether some known fixup for pci not applied. Attached log is dumped after the system boot with headset plugin, but the mic cannot be detected. numid=14,iface=CARD,name='Headphone Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=12,iface=CARD,name='Internal Mic Phantom Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=13,iface=CARD,name='Mic Jack' ; type=BOOLEAN,access=r-------,values=1 : values=off numid=15,iface=CARD,name='Speaker Phantom Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on thanks, Joakim [-- Attachment #2: alsa_debug.log --] [-- Type: application/octet-stream, Size: 49551 bytes --] upload=true&script=true&cardinfo= !!################################ !!ALSA Information Script v 0.5.3 !!################################ !!Script ran on: Tue Jun 24 03:23:31 UTC 2025 !!Linux Distribution !!------------------ Debian GNU/Linux 12 \n \l PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" !!DMI Information !!--------------- Manufacturer: Cix Technology Group Co., Ltd. Product Name: CIX Phecda Board Product Version: 1.0 Firmware Version: 1.0 System SKU: Default Board Vendor: Cix Technology Group Co., Ltd. Board Name: CIX Phecda Board !!ACPI Device Status Information !!--------------- !!ACPI SoundWire Device Status Information !!--------------- !!Kernel Information !!------------------ Kernel release: #2 SMP PREEMPT Mon Jun 23 11:13:30 CST 2025 Operating System: GNU/Linux Architecture: aarch64 Processor: unknown SMP Enabled: Yes !!ALSA Version !!------------ Driver version: k6.6.89-cix-build-generic Library version: 1.2.8 Utilities version: 1.2.8 !!Loaded ALSA modules !!------------------- !!Sound Servers on this system !!---------------------------- PipeWire: Installed - Yes (/usr/bin/pipewire) Running - Yes Pulseaudio: Installed - Yes (/usr/bin/pulseaudio) Running - Yes !!Soundcards recognised by ALSA !!----------------------------- 0 [HDA ]: cix-ipbloq-hda - CIX EVB HDA CIX EVB HDA at 0x70c0000 irq 167 1 [cixsky1 ]: cix_sky1 - cix,sky1 CixTechnologyGroupCo.Ltd.-CIXPhecdaBoard-1.0 !!PCI Soundcards installed in the system !!-------------------------------------- !!Modprobe options (Sound related) !!-------------------------------- snd_pcsp: index=-2 snd_atiixp_modem: index=-2 snd_intel8x0m: index=-2 snd_via82xx_modem: index=-2 !!Loaded sound module options !!--------------------------- !!Sysfs card info !!--------------- !!Card: /sys/class/sound/card0 Driver: /sys/bus/platform/drivers/cix-ipbloq-hda Tree: !!Card: /sys/class/sound/card1 Driver: /sys/bus/platform/drivers/sky1-asoc-card Tree: !!HDA-Intel Codec information !!--------------------------- --startcollapse-- Codec: Realtek ALC256 Address: 0 AFG Function Id: 0x1 (unsol 1) Vendor Id: 0x10ec0256 Subsystem Id: 0x10ec0256 Revision Id: 0x100002 No Modem Function Group found Default PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Default Amp-In caps: N/A Default Amp-Out caps: N/A State of AFG node 0x01: Power states: D0 D1 D2 D3 D3cold CLKSTOP EPSS Power: setting=D0, actual=D0 GPIO: io=3, o=0, i=0, unsolicited=1, wake=0 IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0 IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0 IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0 Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out Control: name="Speaker Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0 Amp-Out vals: [0x00 0x00] Converter: stream=0, channel=0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out Control: name="Headphone Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Device: name="ALC256 Analog", type="Audio", device=0 Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0 Amp-Out vals: [0x3c 0x3c] Converter: stream=0, channel=0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Node 0x04 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x05 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x06 [Audio Output] wcaps 0x611: Stereo Digital Converter: stream=0, channel=0 Digital: Digital category: 0x0 IEC Coding Type: 0x0 PCM: rates [0x5e0]: 44100 48000 88200 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Node 0x07 [Audio Input] wcaps 0x10051b: Stereo Amp-In Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1 Amp-In vals: [0x97 0x97] Converter: stream=0, channel=0 SDI-Select: 0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 1 0x24 Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In Control: name="Capture Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name="Capture Switch", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Device: name="ALC256 Analog", type="Audio", device=0 Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1 Amp-In vals: [0x27 0x27] Converter: stream=0, channel=0 SDI-Select: 0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 1 0x23 Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1 Amp-In vals: [0x97 0x97] Converter: stream=0, channel=0 SDI-Select: 0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 1 0x22 Node 0x0a [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x0b [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x0c [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x0d [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x0e [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x0f [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x12 [Pin Complex] wcaps 0x40040b: Stereo Amp-In Control: name="Internal Mic Boost Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Pincap 0x00000020: IN Pin Default 0x90a60130: [Fixed] Mic at Int N/A Conn = Digital, Color = Unknown DefAssociation = 0x3, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x20: IN Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Node 0x13 [Pin Complex] wcaps 0x40040b: Stereo Amp-In Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Pincap 0x00000020: IN Pin Default 0x40000000: [N/A] Line Out at Ext N/A Conn = Unknown, Color = Unknown DefAssociation = 0x0, Sequence = 0x0 Pin-ctls: 0x00: Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out Control: name="Speaker Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x00010014: OUT EAPD Detect EAPD 0x2: EAPD Pin Default 0x90170110: [Fixed] Speaker at Int N/A Conn = Analog, Color = Unknown DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x40: OUT Unsolicited: tag=00, enabled=0 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 1 0x02 Node 0x15 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x16 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x17 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x18 [Pin Complex] wcaps 0x40048b: Stereo Amp-In Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Pincap 0x00003724: IN Detect Vref caps: HIZ 50 GRD 80 100 Pin Default 0x411111f0: [N/A] Speaker at Ext Rear Conn = 1/8, Color = Black DefAssociation = 0xf, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x20: IN VREF_HIZ Unsolicited: tag=00, enabled=0 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Node 0x19 [Pin Complex] wcaps 0x40048b: Stereo Amp-In Control: name="Mic Boost Volume", index=0, device=0 ControlAmp: chs=3, dir=In, idx=0, ofs=0 Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Pincap 0x00003724: IN Detect Vref caps: HIZ 50 GRD 80 100 Pin Default 0x04a11040: [Jack] Mic at Ext Right Conn = 1/8, Color = Black DefAssociation = 0x4, Sequence = 0x0 Pin-ctls: 0x24: IN VREF_80 Unsolicited: tag=00, enabled=0 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Node 0x1a [Pin Complex] wcaps 0x40048b: Stereo Amp-In Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Pincap 0x00003724: IN Detect Vref caps: HIZ 50 GRD 80 100 Pin Default 0x411111f0: [N/A] Speaker at Ext Rear Conn = 1/8, Color = Black DefAssociation = 0xf, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x00: VREF_HIZ Unsolicited: tag=00, enabled=0 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x00013734: IN OUT EAPD Detect Vref caps: HIZ 50 GRD 80 100 EAPD 0x2: EAPD Pin Default 0x411111f0: [N/A] Speaker at Ext Rear Conn = 1/8, Color = Black DefAssociation = 0xf, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x20: IN VREF_HIZ Unsolicited: tag=00, enabled=0 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 2 0x02* 0x03 Node 0x1c [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x1d [Pin Complex] wcaps 0x400400: Mono Pincap 0x00000020: IN Pin Default 0x4068996d: [N/A] Modem Line at Ext N/A Conn = DIN, Color = Pink DefAssociation = 0x6, Sequence = 0xd Misc = NO_PRESENCE Pin-ctls: 0x20: IN Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Node 0x1e [Pin Complex] wcaps 0x400781: Stereo Digital Pincap 0x00000014: OUT Detect Pin Default 0x411111f0: [N/A] Speaker at Ext Rear Conn = 1/8, Color = Black DefAssociation = 0xf, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x40: OUT Unsolicited: tag=00, enabled=0 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 1 0x06 Node 0x1f [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono Processing caps: benign=0, ncoeff=91 Coeff 0x00: 0x0002 Coeff 0x01: 0xaaaa Coeff 0x02: 0x8aaa Coeff 0x03: 0x0002 Coeff 0x04: 0xaa09 Coeff 0x05: 0x0700 Coeff 0x06: 0x6114 Coeff 0x07: 0x0200 Coeff 0x08: 0x6a6c Coeff 0x09: 0xe003 Coeff 0x0a: 0x7770 Coeff 0x0b: 0x7770 Coeff 0x0c: 0x01ef Coeff 0x0d: 0xa020 Coeff 0x0e: 0x65c0 Coeff 0x0f: 0x7778 Coeff 0x10: 0x0020 Coeff 0x11: 0x7418 Coeff 0x12: 0xebc4 Coeff 0x13: 0x422f Coeff 0x14: 0x0400 Coeff 0x15: 0x8ccc Coeff 0x16: 0x4c50 Coeff 0x17: 0xff00 Coeff 0x18: 0x0003 Coeff 0x19: 0x0e12 Coeff 0x1a: 0x800b Coeff 0x1b: 0x0a4b Coeff 0x1c: 0x0000 Coeff 0x1d: 0x0000 Coeff 0x1e: 0x0000 Coeff 0x1f: 0x0000 Coeff 0x20: 0x51ff Coeff 0x21: 0x8000 Coeff 0x22: 0x8f00 Coeff 0x23: 0x88f4 Coeff 0x24: 0x0000 Coeff 0x25: 0x0000 Coeff 0x26: 0x0000 Coeff 0x27: 0x0000 Coeff 0x28: 0x0000 Coeff 0x29: 0x3000 Coeff 0x2a: 0x0000 Coeff 0x2b: 0x0000 Coeff 0x2c: 0x0f00 Coeff 0x2d: 0x1f4f Coeff 0x2e: 0x2902 Coeff 0x2f: 0xf777 Coeff 0x30: 0x1000 Coeff 0x31: 0xe200 Coeff 0x32: 0x54a8 Coeff 0x33: 0x8400 Coeff 0x34: 0xa20c Coeff 0x35: 0x8d6a Coeff 0x36: 0x5757 Coeff 0x37: 0xfe05 Coeff 0x38: 0x6981 Coeff 0x39: 0x110a Coeff 0x3a: 0x0010 Coeff 0x3b: 0x60d9 Coeff 0x3c: 0x0314 Coeff 0x3d: 0xc2ba Coeff 0x3e: 0xa928 Coeff 0x3f: 0x0001 Coeff 0x40: 0x9800 Coeff 0x41: 0x0000 Coeff 0x42: 0x2000 Coeff 0x43: 0x3d90 Coeff 0x44: 0x2000 Coeff 0x45: 0x5089 Coeff 0x46: 0x0c04 Coeff 0x47: 0xa47a Coeff 0x48: 0xd049 Coeff 0x49: 0x0049 Coeff 0x4a: 0x0000 Coeff 0x4b: 0x5555 Coeff 0x4c: 0x065c Coeff 0x4d: 0x7fff Coeff 0x4e: 0x7fff Coeff 0x4f: 0x0000 Coeff 0x50: 0x0000 Coeff 0x51: 0x2f2f Coeff 0x52: 0x0100 Coeff 0x53: 0x3320 Coeff 0x54: 0xcc00 Coeff 0x55: 0x0000 Coeff 0x56: 0x3f00 Coeff 0x57: 0x0000 Coeff 0x58: 0x0000 Coeff 0x59: 0x0000 Coeff 0x5a: 0x1300 Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out Control: name="Headphone Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x0001001c: OUT HP EAPD Detect EAPD 0x2: EAPD Pin Default 0x04211020: [Jack] HP Out at Ext Right Conn = 1/8, Color = Black DefAssociation = 0x2, Sequence = 0x0 Pin-ctls: 0xc0: OUT HP Unsolicited: tag=00, enabled=0 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 2 0x02 0x03* Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] Connection: 5 0x18 0x19 0x1a 0x1b 0x1d Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x00 0x00] Connection: 6 0x18 0x19 0x1a 0x1b 0x1d 0x12 Node 0x24 [Audio Selector] wcaps 0x300101: Stereo Connection: 2 0x12* 0x13 --endcollapse-- !!ALSA Device nodes !!----------------- crw-rw-rw-+ 1 root audio 116, 11 Jun 24 11:22 /dev/snd/controlC0 crw-rw-rw-+ 1 root audio 116, 7 Jun 24 11:22 /dev/snd/controlC1 crw-rw-rw-+ 1 root audio 116, 10 Jun 24 11:22 /dev/snd/hwC0D0 crw-rw-rw-+ 1 root audio 116, 9 Jun 24 11:22 /dev/snd/pcmC0D0c crw-rw-rw-+ 1 root audio 116, 8 Jun 24 11:22 /dev/snd/pcmC0D0p crw-rw-rw-+ 1 root audio 116, 2 Jun 24 11:22 /dev/snd/pcmC1D0p crw-rw-rw-+ 1 root audio 116, 3 Jun 24 11:22 /dev/snd/pcmC1D1p crw-rw-rw-+ 1 root audio 116, 4 Jun 24 11:22 /dev/snd/pcmC1D2p crw-rw-rw-+ 1 root audio 116, 5 Jun 24 11:22 /dev/snd/pcmC1D3p crw-rw-rw-+ 1 root audio 116, 6 Jun 24 11:22 /dev/snd/pcmC1D4p crw-rw-rw-+ 1 root audio 116, 33 Jun 24 11:22 /dev/snd/timer /dev/snd/by-path: total 0 drwxr-xr-x 2 root root 80 Jun 24 11:22 . drwxr-xr-x 3 root root 280 Jun 24 11:22 .. lrwxrwxrwx 1 root root 12 Jun 24 11:22 platform-70c0000.ipb-hda -> ../controlC0 lrwxrwxrwx 1 root root 12 Jun 24 11:22 platform-sound -> ../controlC1 !!Aplay/Arecord output !!-------------------- APLAY **** List of PLAYBACK Hardware Devices **** card 0: HDA [CIX EVB HDA], device 0: ALC256 Analog [ALC256 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: cixsky1 [cix,sky1], device 0: dptx0_audio i2s-hifi-0 [dptx0_audio i2s-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: cixsky1 [cix,sky1], device 1: dptx1_audio i2s-hifi-1 [dptx1_audio i2s-hifi-1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: cixsky1 [cix,sky1], device 2: dptx2_audio i2s-hifi-2 [dptx2_audio i2s-hifi-2] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: cixsky1 [cix,sky1], device 3: dptx3_audio i2s-hifi-3 [dptx3_audio i2s-hifi-3] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: cixsky1 [cix,sky1], device 4: dptx4_audio i2s-hifi-4 [dptx4_audio i2s-hifi-4] Subdevices: 1/1 Subdevice #0: subdevice #0 ARECORD **** List of CAPTURE Hardware Devices **** card 0: HDA [CIX EVB HDA], device 0: ALC256 Analog [ALC256 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 !!Amixer output !!------------- !!-------Mixer controls for card HDA Card sysdefault:0 'HDA'/'CIX EVB HDA at 0x70c0000 irq 167' Mixer name : 'Realtek ALC256' Components : 'HDA:10ec0256,10ec0256,00100002' Controls : 17 Simple ctrls : 7 Simple mixer control 'Master',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono Limits: Playback 0 - 87 Mono: Playback 60 [69%] [-20.25dB] [on] Simple mixer control 'Headphone',0 Capabilities: pvolume pswitch Playback channels: Front Left - Front Right Limits: Playback 0 - 87 Mono: Front Left: Playback 87 [100%] [0.00dB] [on] Front Right: Playback 87 [100%] [0.00dB] [on] Simple mixer control 'Speaker',0 Capabilities: pvolume pswitch Playback channels: Front Left - Front Right Limits: Playback 0 - 87 Mono: Front Left: Playback 0 [0%] [-65.25dB] [off] Front Right: Playback 0 [0%] [-65.25dB] [off] Simple mixer control 'Mic Boost',0 Capabilities: volume Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 3 Front Left: 0 [0%] [0.00dB] Front Right: 0 [0%] [0.00dB] Simple mixer control 'Capture',0 Capabilities: cvolume cswitch Capture channels: Front Left - Front Right Limits: Capture 0 - 63 Front Left: Capture 39 [62%] [12.00dB] [on] Front Right: Capture 39 [62%] [12.00dB] [on] Simple mixer control 'Auto-Mute Mode',0 Capabilities: enum Items: 'Disabled' 'Enabled' Item0: 'Disabled' Simple mixer control 'Internal Mic Boost',0 Capabilities: volume Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 3 Front Left: 0 [0%] [0.00dB] Front Right: 0 [0%] [0.00dB] !!-------Mixer controls for card cixsky1 Card sysdefault:1 'cixsky1'/'CixTechnologyGroupCo.Ltd.-CIXPhecdaBoard-1.0' Mixer name : '' Components : '' Controls : 25 Simple ctrls : 0 !!Alsactl output !!-------------- --startcollapse-- state.HDA { control.1 { iface MIXER name 'Headphone Playback Volume' value.0 87 value.1 87 comment { access 'read write' type INTEGER count 2 range '0 - 87' dbmin -6525 dbmax 0 dbvalue.0 0 dbvalue.1 0 } } control.2 { iface MIXER name 'Headphone Playback Switch' value.0 true value.1 true comment { access 'read write' type BOOLEAN count 2 } } control.3 { iface MIXER name 'Speaker Playback Volume' value.0 0 value.1 0 comment { access 'read write' type INTEGER count 2 range '0 - 87' dbmin -6525 dbmax 0 dbvalue.0 -6525 dbvalue.1 -6525 } } control.4 { iface MIXER name 'Speaker Playback Switch' value.0 false value.1 false comment { access 'read write' type BOOLEAN count 2 } } control.5 { iface MIXER name 'Auto-Mute Mode' value Disabled comment { access 'read write' type ENUMERATED count 1 item.0 Disabled item.1 Enabled } } control.6 { iface MIXER name 'Capture Volume' value.0 39 value.1 39 comment { access 'read write' type INTEGER count 2 range '0 - 63' dbmin -1725 dbmax 3000 dbvalue.0 1200 dbvalue.1 1200 } } control.7 { iface MIXER name 'Capture Switch' value.0 true value.1 true comment { access 'read write' type BOOLEAN count 2 } } control.8 { iface MIXER name 'Internal Mic Boost Volume' value.0 0 value.1 0 comment { access 'read write' type INTEGER count 2 range '0 - 3' dbmin 0 dbmax 3000 dbvalue.0 0 dbvalue.1 0 } } control.9 { iface MIXER name 'Mic Boost Volume' value.0 0 value.1 0 comment { access 'read write' type INTEGER count 2 range '0 - 3' dbmin 0 dbmax 3000 dbvalue.0 0 dbvalue.1 0 } } control.10 { iface MIXER name 'Master Playback Volume' value 60 comment { access 'read write' type INTEGER count 1 range '0 - 87' dbmin -6525 dbmax 0 dbvalue.0 -2025 } } control.11 { iface MIXER name 'Master Playback Switch' value true comment { access 'read write' type BOOLEAN count 1 } } control.12 { iface CARD name 'Internal Mic Phantom Jack' value true comment { access read type BOOLEAN count 1 } } control.13 { iface CARD name 'Mic Jack' value false comment { access read type BOOLEAN count 1 } } control.14 { iface CARD name 'Headphone Jack' value true comment { access read type BOOLEAN count 1 } } control.15 { iface CARD name 'Speaker Phantom Jack' value true comment { access read type BOOLEAN count 1 } } control.16 { iface PCM name 'Playback Channel Map' value.0 0 value.1 0 comment { access read type INTEGER count 2 range '0 - 36' } } control.17 { iface PCM name 'Capture Channel Map' value.0 0 value.1 0 comment { access read type INTEGER count 2 range '0 - 36' } } } state.cixsky1 { control.1 { iface CARD name 'HDMI/DP,pcm=0 Jack' value false comment { access read type BOOLEAN count 1 } } control.2 { iface PCM name 'Playback Channel Map' value.0 0 value.1 0 value.2 0 value.3 0 value.4 0 value.5 0 value.6 0 value.7 0 comment { access read type INTEGER count 8 range '0 - 36' } } control.3 { iface PCM name 'IEC958 Playback Mask' value ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 comment { access read type IEC958 count 1 } } control.4 { iface PCM name 'IEC958 Playback Default' value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' comment { access 'read write' type IEC958 count 1 } } control.5 { iface PCM name ELD value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' comment { access 'read volatile' type BYTES count 128 } } control.6 { iface CARD name 'HDMI/DP,pcm=1 Jack' value true comment { access read type BOOLEAN count 1 } } control.7 { iface PCM device 1 name 'Playback Channel Map' value.0 0 value.1 0 value.2 0 value.3 0 value.4 0 value.5 0 value.6 0 value.7 0 comment { access read type INTEGER count 8 range '0 - 36' } } control.8 { iface PCM device 1 name 'IEC958 Playback Mask' value ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 comment { access read type IEC958 count 1 } } control.9 { iface PCM device 1 name 'IEC958 Playback Default' value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' comment { access 'read write' type IEC958 count 1 } } control.10 { iface PCM device 1 name ELD value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' comment { access 'read volatile' type BYTES count 128 } } control.11 { iface CARD name 'HDMI/DP,pcm=2 Jack' value false comment { access read type BOOLEAN count 1 } } control.12 { iface PCM device 2 name 'Playback Channel Map' value.0 0 value.1 0 value.2 0 value.3 0 value.4 0 value.5 0 value.6 0 value.7 0 comment { access read type INTEGER count 8 range '0 - 36' } } control.13 { iface PCM device 2 name 'IEC958 Playback Mask' value ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 comment { access read type IEC958 count 1 } } control.14 { iface PCM device 2 name 'IEC958 Playback Default' value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' comment { access 'read write' type IEC958 count 1 } } control.15 { iface PCM device 2 name ELD value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' comment { access 'read volatile' type BYTES count 128 } } control.16 { iface CARD name 'HDMI/DP,pcm=3 Jack' value false comment { access read type BOOLEAN count 1 } } control.17 { iface PCM device 3 name 'Playback Channel Map' value.0 0 value.1 0 value.2 0 value.3 0 value.4 0 value.5 0 value.6 0 value.7 0 comment { access read type INTEGER count 8 range '0 - 36' } } control.18 { iface PCM device 3 name 'IEC958 Playback Mask' value ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 comment { access read type IEC958 count 1 } } control.19 { iface PCM device 3 name 'IEC958 Playback Default' value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' comment { access 'read write' type IEC958 count 1 } } control.20 { iface PCM device 3 name ELD value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' comment { access 'read volatile' type BYTES count 128 } } control.21 { iface CARD name 'HDMI/DP,pcm=4 Jack' value false comment { access read type BOOLEAN count 1 } } control.22 { iface PCM device 4 name 'Playback Channel Map' value.0 0 value.1 0 value.2 0 value.3 0 value.4 0 value.5 0 value.6 0 value.7 0 comment { access read type INTEGER count 8 range '0 - 36' } } control.23 { iface PCM device 4 name 'IEC958 Playback Mask' value ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 comment { access read type IEC958 count 1 } } control.24 { iface PCM device 4 name 'IEC958 Playback Default' value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' comment { access 'read write' type IEC958 count 1 } } control.25 { iface PCM device 4 name ELD value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' comment { access 'read volatile' type BYTES count 128 } } } --endcollapse-- !!All Loaded Modules !!------------------ aipu amvx arm_dma350 armcb_isp_v4l2 cfg80211 cix_dsp_rproc clk_sky1_audss drm_display_helper i2c_hid_of ip_tables iptable_nat ipv6 ledtrig_audio libcrc32c linlon_dp mali_kbase memory_group_manager nf_conntrack nf_defrag_ipv4 nf_defrag_ipv6 nf_nat pgdrv protected_memory_allocator pwm_bl r8125 reset_sky1_audss rtl_btusb rtl_wlan snd_hda_cix_ipbloq snd_hda_codec snd_hda_codec_generic snd_hda_codec_realtek snd_hda_core snd_soc_cdns_i2s_mc snd_soc_hdmi_codec snd_soc_sky1_sound_card trilin_dpsub uhid x_tables xt_MASQUERADE !!Sysfs Files !!----------- /sys/class/sound/hwC0D0/init_pin_configs: 0x12 0x90a60130 0x13 0x40000000 0x14 0x90170110 0x18 0x411111f0 0x19 0x04a11040 0x1a 0x411111f0 0x1b 0x411111f0 0x1d 0x4068996d 0x1e 0x411111f0 0x21 0x04211020 /sys/class/sound/hwC0D0/driver_pin_configs: /sys/class/sound/hwC0D0/user_pin_configs: /sys/class/sound/hwC0D0/init_verbs: /sys/class/sound/hwC0D0/hints: !!ALSA/HDA dmesg !!-------------- [ 0.000000] [pid:0,cpu0,swapper]Reserved memory: created DMA memory pool at 0x00000000d0000000, size 14 MiB [ 0.000000] [pid:0,cpu0,swapper]OF: reserved mem: initialized node audio_alsa@d0000000, compatible id shared-dma-pool [ 0.000000] [pid:0,cpu0,swapper]OF: reserved mem: 0x00000000d0000000..0x00000000d0dfffff (14336 KiB) nomap non-reusable audio_alsa@d0000000 [ 0.000000] [pid:0,cpu0,swapper]OF: reserved mem: 0x0000001ca0000000..0x0000001ca007ffff (512 KiB) nomap non-reusable ram0@1ca0000000 -- [ 0.796183] [pid:1,cpu9,swapper/0]optee: initialized driver [ 0.796792] [pid:1,cpu9,swapper/0]usbcore: registered new interface driver snd-usb-audio [ 0.797362] [pid:1,cpu9,swapper/0]NET: Registered PF_PACKET protocol family -- [ 0.900709] [pid:1,cpu8,swapper/0]clk: Disabling unused clocks [ 0.901323] [pid:1,cpu11,swapper/0]ALSA device list: [ 0.901336] [pid:1,cpu11,swapper/0] No soundcards found. [ 0.901702] [pid:1,cpu6,swapper/0]uart-pl011 40d0000.uart: no DMA platform data -- [ 1.155679] [pid:1,cpu5,systemd]systemd[1]: Configuration file /etc/systemd/system/isp-daemon.service is marked executable. Please remove executable permission bits. Proceeding anyway. [ 1.157146] [pid:1,cpu5,systemd]systemd[1]: Configuration file /lib/systemd/system/cix-audio-switch.service is marked executable. Please remove executable permission bits. Proceeding anyway. [ 1.157443] [pid:1,cpu5,systemd]systemd[1]: cix-audio-switch.service: Service has no ExecStart=, ExecStop=, or SuccessAction=. Refusing. [ 1.171069] [pid:1,cpu9,systemd]systemd[1]: Configuration file /etc/systemd/system/S30tee-supplicant.service is marked executable. Please remove executable permission bits. Proceeding anyway. -- [ 1.200207] [pid:1,cpu6,systemd]systemd[1]: Configuration file /lib/systemd/system/cix_resume.service is marked executable. Please remove executable permission bits. Proceeding anyway. [ 1.206749] [pid:1,cpu6,systemd]systemd[1]: cix-audio-switch.service: Cannot add dependency job, ignoring: Unit cix-audio-switch.service has a bad unit file setting. [ 1.207310] [pid:1,cpu6,systemd]systemd[1]: Queued start job for default target graphical.target. -- [ 3.096630] [pid:334,cpu8,(udev-worker)]linlondp 14010000.disp-controller: bound 14064000.dp (ops trilin_dptx_cix_ops [trilin_dpsub]) [ 3.098934] [pid:332,cpu6,(udev-worker)]sky1-audss-clk 7110000.system-controller:clock-controller: audio_clk0: set rate = 294912000, get rate = 294911999 [ 3.099166] [pid:332,cpu6,(udev-worker)]sky1-audss-clk 7110000.system-controller:clock-controller: audio_clk1: set rate = 344064000, get rate = 344063999 [ 3.099209] [pid:332,cpu6,(udev-worker)]sky1-audss-clk 7110000.system-controller:clock-controller: audio_clk2: set rate = 270950400, get rate = 270950399 [ 3.099251] [pid:332,cpu6,(udev-worker)]sky1-audss-clk 7110000.system-controller:clock-controller: audio_clk3: set rate = 316108800, get rate = 316108799 [ 3.099287] [pid:332,cpu6,(udev-worker)]sky1-audss-clk 7110000.system-controller:clock-controller: audio_clk4: set rate = 800000000, get rate = 800000000 [ 3.099323] [pid:332,cpu6,(udev-worker)]sky1-audss-clk 7110000.system-controller:clock-controller: audio_clk5: set rate = 48000000, get rate = 48000000 [ 3.101892] [pid:103,cpu7,kworker/u24:3]arm-dma350 7010000.dma-controller: assigned reserved memory node audio_alsa@d0000000 [ 3.114874] [pid:334,cpu9,(udev-worker)][drm] Initialized linlondp 0.0.0 20230426 for 14010000.disp-controller on minor 0 -- [ 3.126557] [pid:334,cpu9,(udev-worker)]linlondp 14010000.disp-controller: Failed to create device link (0x180) with 14064000.dp [ 3.144520] [pid:341,cpu5,(udev-worker)]sky1-asoc-card sound: dai-link name:dptx0_audio [ 3.144528] [pid:341,cpu5,(udev-worker)]sky1-asoc-card sound: error parsing for dai-link name: dptx0_audio, ret:-517 [ 3.145322] [pid:311,cpu9,(udev-worker)]linlondp 14160000.disp-controller: Adding to iommu group 3 [ 3.157223] [pid:341,cpu5,(udev-worker)]sky1-asoc-card sound: cix_card_parse_of failed (-517) [ 3.158138] [pid:345,cpu7,(udev-worker)]r8125 Ethernet controller driver 9.012.04-NAPI loaded -- [ 3.255429] [pid:226,cpu7,kworker/u24:8]input: hid-over-i2c 048D:8987 Keyboard as /devices/platform/soc@0/4060000.i2c/i2c-5/5-003a/0018:048D:8987.0002/input/input3 [ 3.258896] [pid:103,cpu5,kworker/u24:3]cix-dsp-rproc 7000000.audio-dsp: wdg irq registered [ 3.264669] [pid:334,cpu9,(udev-worker)]trilin-dptx-cix 14144000.dp: [drm:trilin_dp_host_init][info]no dp_phy filed -- [ 3.265842] [pid:103,cpu6,kworker/u24:3]remoteproc remoteproc0: cix-dsp-rproc is available [ 3.267891] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai-link name:dptx0_audio [ 3.267899] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.267911] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: cix_card_parse_of failed (-517) [ 3.274854] [pid:0,cpu1,swapper/1]random: crng init done -- [ 3.352392] [pid:345,cpu8,(udev-worker)]<dst::do_boottime_initcall:99> initcall rtl8125_init_module+0x0/0x1000 [r8125] returned 0 after 196461 usecs [ 3.352998] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai-link name:dptx0_audio [ 3.353008] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.353016] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: cix_card_parse_of failed (-517) [ 3.375162] [pid:226,cpu6,kworker/u24:8]input: hid-over-i2c 048D:8987 Wireless Radio Control as /devices/platform/soc@0/4060000.i2c/i2c-5/5-003a/0018:048D:8987.0002/input/input4 [ 3.375313] [pid:226,cpu6,kworker/u24:8]hid-generic 0018:048D:8987.0002: input: I2C HID v1.00 Keyboard [hid-over-i2c 048D:8987] on 5-003a [ 3.375790] [pid:226,cpu6,kworker/u24:8]sky1-asoc-card sound: dai-link name:dptx0_audio [ 3.375798] [pid:226,cpu6,kworker/u24:8]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.375805] [pid:226,cpu6,kworker/u24:8]sky1-asoc-card sound: cix_card_parse_of failed (-517) [ 3.390833] [pid:334,cpu9,(udev-worker)]cix-edp-panel panel_edp0: cix_edp_panel_prepare, end [ 3.397934] [pid:347,cpu6,(udev-worker)]cix-ipbloq-hda 70c0000.ipb-hda: assigned reserved memory node audio_alsa@d0000000 [ 3.422836] [pid:347,cpu6,(udev-worker)]cix_ec_set offset = 22 val=1 [ 3.427307] [pid:226,cpu6,kworker/u24:8]sky1-asoc-card sound: dai-link name:dptx0_audio [ 3.427315] [pid:226,cpu6,kworker/u24:8]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.427350] [pid:226,cpu6,kworker/u24:8]sky1-asoc-card sound: cix_card_parse_of failed (-517) [ 3.439292] [pid:46,cpu6,kworker/6:0]cix-ipbloq-hda 70c0000.ipb-hda: chipset global capabilities = 0x4403 -- [ 3.482218] [pid:334,cpu5,(udev-worker)][drm] Found ARMCHINA Linlon-D60 version r0p0 [ 3.482290] [pid:103,cpu10,kworker/u24:3]sky1-asoc-card sound: dai-link name:dptx0_audio [ 3.482303] [pid:103,cpu10,kworker/u24:3]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.482294] [pid:311,cpu9,(udev-worker)]<dst::do_boottime_initcall:99> initcall linlondp_platform_driver_init+0x0/0x1000 [linlon_dp] returned 0 after 462386 usecs [ 3.482312] [pid:103,cpu10,kworker/u24:3]sky1-asoc-card sound: cix_card_parse_of failed (-517) [ 3.482368] [pid:334,cpu5,(udev-worker)][drm] Pipeline-0: n_layers: 4, n_scalers: 2, output: single-link 1 PPC [ 3.482523] [pid:103,cpu10,kworker/u24:3]sky1-asoc-card sound: dai-link name:dptx0_audio [ 3.482527] [pid:103,cpu10,kworker/u24:3]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.482531] [pid:103,cpu10,kworker/u24:3]sky1-asoc-card sound: cix_card_parse_of failed (-517) [ 3.483176] [pid:342,cpu10,(udev-worker)]snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC256: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker [ 3.483183] [pid:342,cpu10,(udev-worker)]snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 3.483186] [pid:342,cpu10,(udev-worker)]snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0) [ 3.483190] [pid:342,cpu10,(udev-worker)]snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0 [ 3.483192] [pid:342,cpu10,(udev-worker)]snd_hda_codec_realtek hdaudioC0D0: inputs: [ 3.483194] [pid:342,cpu10,(udev-worker)]snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x12 [ 3.483197] [pid:342,cpu10,(udev-worker)]snd_hda_codec_realtek hdaudioC0D0: Mic=0x19 [ 3.499576] [pid:334,cpu5,(udev-worker)][drm] output_link[0]: dp@141b0000. -- [ 3.525097] [pid:334,cpu5,(udev-worker)][drm] output_link[0]: dp@14220000. [ 3.525095] [pid:120,cpu6,kworker/u24:4]sky1-asoc-card sound: dai-link name:dptx0_audio [ 3.525099] [pid:334,cpu5,(udev-worker)][drm] output_link[1]: none. [ 3.525104] [pid:120,cpu6,kworker/u24:4]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.525112] [pid:120,cpu6,kworker/u24:4]sky1-asoc-card sound: cix_card_parse_of failed (-517) [ 3.525188] [pid:334,cpu5,(udev-worker)][drm] CRTC-0: master(pipe-0) slave(pipe-1) sbs(Off). -- [ 3.568180] [pid:334,cpu5,(udev-worker)]<dst::do_boottime_initcall:99> initcall trilin_dp_driver_init+0x0/0x1000 [trilin_dpsub] returned 0 after 538731 usecs [ 3.568305] [pid:103,cpu8,kworker/u24:3]sky1-asoc-card sound: dai-link name:dptx0_audio [ 3.568313] [pid:103,cpu8,kworker/u24:3]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.568320] [pid:103,cpu8,kworker/u24:3]sky1-asoc-card sound: cix_card_parse_of failed (-517) [ 3.579151] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai-link name:dptx0_audio [ 3.579160] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.579164] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: codec dai name:i2s-hifi [ 3.579171] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai_fmt:0x4301 [ 3.579173] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: mclk_fs:0 [ 3.579175] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: tdm tx mask:0x0, rx mask:0x0, slots:0, slot width:0 [ 3.579177] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: jack_det_mask:0x2 [ 3.579188] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai-link name:dptx1_audio [ 3.579191] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.579211] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: codec dai name:i2s-hifi [ 3.579214] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai_fmt:0x4301 [ 3.579216] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: mclk_fs:0 [ 3.579218] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: tdm tx mask:0x0, rx mask:0x0, slots:0, slot width:0 [ 3.579220] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: jack_det_mask:0x2 [ 3.579225] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai-link name:dptx2_audio [ 3.579227] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.579233] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: codec dai name:i2s-hifi [ 3.579236] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai_fmt:0x4301 [ 3.579237] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: mclk_fs:0 [ 3.579239] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: tdm tx mask:0x0, rx mask:0x0, slots:0, slot width:0 [ 3.579241] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: jack_det_mask:0x2 [ 3.579244] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai-link name:dptx3_audio [ 3.579246] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.579252] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: codec dai name:i2s-hifi [ 3.579254] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai_fmt:0x4301 [ 3.579256] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: mclk_fs:0 [ 3.579257] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: tdm tx mask:0x0, rx mask:0x0, slots:0, slot width:0 [ 3.579259] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: jack_det_mask:0x2 [ 3.579263] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai-link name:dptx4_audio [ 3.579266] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: cpu dai name:i2s-mc-aif1 [ 3.579270] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: codec dai name:i2s-hifi [ 3.579273] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: dai_fmt:0x4301 [ 3.579274] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: mclk_fs:0 [ 3.579276] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: tdm tx mask:0x0, rx mask:0x0, slots:0, slot width:0 [ 3.579278] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: jack_det_mask:0x2 [ 3.579462] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.14.auto: ASoC: sink widget TX overwritten [ 3.579468] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.14.auto: ASoC: source widget RX overwritten [ 3.579472] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.15.auto: ASoC: sink widget TX overwritten [ 3.579474] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.15.auto: ASoC: source widget I2S Playback overwritten [ 3.579476] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.15.auto: ASoC: sink widget TX overwritten [ 3.579478] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.15.auto: ASoC: source widget RX overwritten [ 3.579480] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.15.auto: ASoC: sink widget Capture overwritten [ 3.579482] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.15.auto: ASoC: source widget RX overwritten [ 3.579485] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.16.auto: ASoC: sink widget TX overwritten [ 3.579486] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.16.auto: ASoC: source widget I2S Playback overwritten [ 3.579488] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.16.auto: ASoC: sink widget TX overwritten [ 3.579490] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.16.auto: ASoC: source widget I2S Playback overwritten [ 3.579491] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.16.auto: ASoC: sink widget TX overwritten [ 3.579493] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.16.auto: ASoC: source widget RX overwritten [ 3.579495] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.16.auto: ASoC: sink widget Capture overwritten [ 3.579497] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.16.auto: ASoC: source widget RX overwritten [ 3.579498] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.16.auto: ASoC: sink widget Capture overwritten [ 3.579500] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.16.auto: ASoC: source widget RX overwritten [ 3.579503] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: sink widget TX overwritten [ 3.579505] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: source widget I2S Playback overwritten [ 3.579506] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: sink widget TX overwritten [ 3.579508] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: source widget I2S Playback overwritten [ 3.579510] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: sink widget TX overwritten [ 3.579511] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: source widget I2S Playback overwritten [ 3.579513] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: sink widget TX overwritten [ 3.579515] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: source widget RX overwritten [ 3.579517] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: sink widget Capture overwritten [ 3.579518] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: source widget RX overwritten [ 3.579520] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: sink widget Capture overwritten [ 3.579522] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: source widget RX overwritten [ 3.579523] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: sink widget Capture overwritten [ 3.579525] [pid:103,cpu6,kworker/u24:3]hdmi-audio-codec hdmi-audio-codec.17.auto: ASoC: source widget RX overwritten [ 3.579542] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: codec component hdmi-audio-codec.13.auto [ 3.579586] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: codec component hdmi-audio-codec.14.auto [ 3.579621] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: codec component hdmi-audio-codec.15.auto [ 3.579650] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: codec component hdmi-audio-codec.16.auto [ 3.579679] [pid:103,cpu6,kworker/u24:3]sky1-asoc-card sound: codec component hdmi-audio-codec.17.auto [ 3.580160] [pid:103,cpu6,kworker/u24:3]input: cix,sky1 HDMI/DP,pcm=0 as /devices/platform/sound/sound/card1/input5 [ 3.580228] [pid:103,cpu6,kworker/u24:3]input: cix,sky1 HDMI/DP,pcm=1 as /devices/platform/sound/sound/card1/input6 [ 3.580284] [pid:103,cpu6,kworker/u24:3]input: cix,sky1 HDMI/DP,pcm=2 as /devices/platform/sound/sound/card1/input7 [ 3.580342] [pid:103,cpu6,kworker/u24:3]input: cix,sky1 HDMI/DP,pcm=3 as /devices/platform/sound/sound/card1/input8 [ 3.580394] [pid:103,cpu6,kworker/u24:3]input: cix,sky1 HDMI/DP,pcm=4 as /devices/platform/sound/sound/card1/input9 [ 3.611193] [pid:484,cpu11,alsactl]alsactl[484]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set [ 3.706393] [pid:342,cpu11,(udev-worker)]<dst::do_boottime_initcall:99> initcall realtek_driver_init+0x0/0x1000 [snd_hda_codec_realtek] returned 0 after 238988 usecs [ 3.709366] [pid:46,cpu6,kworker/6:0]input: CIX EVB HDA Mic as /devices/platform/soc@0/70c0000.ipb-hda/sound/card0/input10 [ 3.709510] [pid:46,cpu6,kworker/6:0]input: CIX EVB HDA Headphone as /devices/platform/soc@0/70c0000.ipb-hda/sound/card0/input11 [ 3.709772] [pid:46,cpu6,kworker/6:0]cix-ipbloq-hda 70c0000.ipb-hda: cix ipbloq hda probed !!Packages installed !!-------------------- ii alsa-ucm-conf 1.2.8-1 all ALSA Use Case Manager configuration files ii alsa-utils 1.2.8-1 arm64 Utilities for configuring and using ALSA ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-06-24 3:32 ` Joakim Zhang @ 2025-06-24 6:17 ` Kailang 2025-06-25 1:32 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Kailang @ 2025-06-24 6:17 UTC (permalink / raw) To: Joakim Zhang, Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen, cix-kernel-upstream > > + if (codec->core.vendor_id == 0x10ec0256) > > + spec->en_3kpull_low = false; This usage will affect all ALC256. Codec: Realtek ALC256 Address: 0 AFG Function Id: 0x1 (unsol 1) Vendor Id: 0x10ec0256 Subsystem Id: 0x10ec0256 ==> Could you assign this to 0x10EC129E ? This codec SSID was provide from our AE. It's verb table. Revision Id: 0x100002 No Modem Function Group found Default PCM: We can check Subsystem Id to let spec->en_3kpull_low = false. > -----Original Message----- > From: Joakim Zhang <joakim.zhang@cixtech.com> > Sent: Tuesday, June 24, 2025 11:32 AM > To: Kailang <kailang@realtek.com>; Takashi Iwai <tiwai@suse.de> > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; > cix-kernel-upstream <cix-kernel-upstream@cixtech.com> > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > alc256 > > > External mail : This email originated from outside the organization. Do not > reply, click links, or open attachments unless you recognize the sender and > know the content is safe. > > > > Hello Kailang > > > -----Original Message----- > > From: Kailang <kailang@realtek.com> > > Sent: Tuesday, June 24, 2025 10:31 AM > > To: Takashi Iwai <tiwai@suse.de>; Joakim Zhang > > <joakim.zhang@cixtech.com> > > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; cix- > > kernel-upstream <cix-kernel-upstream@cixtech.com> > > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect > > failed on > > alc256 > > > > EXTERNAL EMAIL > > > > Hi Joakim, > > > > Could you use alsa-info.sh to dump codec info to us? > > Your platform was ARM Architecture. So, it's no PCI device. Right? > > Yes, our HDA controller under AXI bus based on ARM arch, so I'm a little > worried whether some known fixup for pci not applied. > > Attached log is dumped after the system boot with headset plugin, but the mic > cannot be detected. > > numid=14,iface=CARD,name='Headphone Jack' > ; type=BOOLEAN,access=r-------,values=1 > : values=on > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > ; type=BOOLEAN,access=r-------,values=1 > : values=on > numid=13,iface=CARD,name='Mic Jack' > ; type=BOOLEAN,access=r-------,values=1 > : values=off > numid=15,iface=CARD,name='Speaker Phantom Jack' > ; type=BOOLEAN,access=r-------,values=1 > : values=on > > thanks, > > Joakim > > > This email (including its attachments) is intended only for the person or entity > to which it is addressed and may contain information that is privileged, > confidential or otherwise protected from disclosure. Unauthorized use, > dissemination, distribution or copying of this email or the information herein > or taking any action in reliance on the contents of this email or the > information herein, by anyone other than the intended recipient, or an > employee or agent responsible for delivering the message to the intended > recipient, is strictly prohibited. If you are not the intended recipient, please do > not read, copy, use or disclose any part of this e-mail to others. Please notify > the sender immediately and permanently delete this e-mail and any > attachments if you received it in error. Internet communications cannot be > guaranteed to be timely, secure, error-free or virus-free. The sender does not > accept liability for any errors or omissions. ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-06-24 6:17 ` Kailang @ 2025-06-25 1:32 ` Joakim Zhang 2025-06-25 3:05 ` Kailang 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-06-25 1:32 UTC (permalink / raw) To: Kailang, Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen, cix-kernel-upstream Hello Kailang > -----Original Message----- > From: Kailang <kailang@realtek.com> > Sent: Tuesday, June 24, 2025 2:18 PM > To: Joakim Zhang <joakim.zhang@cixtech.com>; Takashi Iwai <tiwai@suse.de> > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; cix- > kernel-upstream <cix-kernel-upstream@cixtech.com> > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > alc256 > > > > > + if (codec->core.vendor_id == 0x10ec0256) > > > + spec->en_3kpull_low = false; > > This usage will affect all ALC256. > > Codec: Realtek ALC256 > Address: 0 > AFG Function Id: 0x1 (unsol 1) > Vendor Id: 0x10ec0256 > Subsystem Id: 0x10ec0256 ==> Could you assign this to 0x10EC129E ? This > codec SSID was provide from our AE. It's verb table. > Revision Id: 0x100002 > No Modem Function Group found > Default PCM: > > We can check Subsystem Id to let spec->en_3kpull_low = false. Did you find anything from the log? Is it a potential issue? You mean re-generate the verb table with SSID equal 0x10EC129E? But from the patch_realtek.c have not found any hook to fixup this SSID. ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-06-25 1:32 ` Joakim Zhang @ 2025-06-25 3:05 ` Kailang 2025-06-26 3:44 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Kailang @ 2025-06-25 3:05 UTC (permalink / raw) To: Joakim Zhang, Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen, cix-kernel-upstream [-- Attachment #1: Type: text/plain, Size: 3225 bytes --] Maybe your platform need to set spec->en_3kpull_low to false. If spec->en_3kpull_low = false will help you to get MIC JD. > -----Original Message----- > From: Joakim Zhang <joakim.zhang@cixtech.com> > Sent: Wednesday, June 25, 2025 9:32 AM > To: Kailang <kailang@realtek.com>; Takashi Iwai <tiwai@suse.de> > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; > cix-kernel-upstream <cix-kernel-upstream@cixtech.com> > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > alc256 > > > External mail : This email originated from outside the organization. Do not > reply, click links, or open attachments unless you recognize the sender and > know the content is safe. > > > > Hello Kailang > > > -----Original Message----- > > From: Kailang <kailang@realtek.com> > > Sent: Tuesday, June 24, 2025 2:18 PM > > To: Joakim Zhang <joakim.zhang@cixtech.com>; Takashi Iwai > > <tiwai@suse.de> > > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; cix- > > kernel-upstream <cix-kernel-upstream@cixtech.com> > > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect > > failed on > > alc256 > > > > > > > > + if (codec->core.vendor_id == 0x10ec0256) > > > > + spec->en_3kpull_low = false; > > > > This usage will affect all ALC256. > > > > Codec: Realtek ALC256 > > Address: 0 > > AFG Function Id: 0x1 (unsol 1) > > Vendor Id: 0x10ec0256 > > Subsystem Id: 0x10ec0256 ==> Could you assign this to 0x10EC129E ? > This > > codec SSID was provide from our AE. It's verb table. > > Revision Id: 0x100002 > > No Modem Function Group found > > Default PCM: > > > > We can check Subsystem Id to let spec->en_3kpull_low = false. > > Did you find anything from the log? Is it a potential issue? No, there were many platform need this setting. > > You mean re-generate the verb table with SSID equal 0x10EC129E? But from > the patch_realtek.c have not found any hook to fixup this SSID. This SSID need add menually. Like attach patch. > > > This email (including its attachments) is intended only for the person or entity > to which it is addressed and may contain information that is privileged, > confidential or otherwise protected from disclosure. Unauthorized use, > dissemination, distribution or copying of this email or the information herein > or taking any action in reliance on the contents of this email or the > information herein, by anyone other than the intended recipient, or an > employee or agent responsible for delivering the message to the intended > recipient, is strictly prohibited. If you are not the intended recipient, please do > not read, copy, use or disclose any part of this e-mail to others. Please notify > the sender immediately and permanently delete this e-mail and any > attachments if you received it in error. Internet communications cannot be > guaranteed to be timely, secure, error-free or virus-free. The sender does not > accept liability for any errors or omissions. [-- Attachment #2: 0000-dis-3kpull-low.patch --] [-- Type: application/octet-stream, Size: 1838 bytes --] diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9108c712db03..066703838380 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7734,6 +7734,15 @@ static void alc283_fixup_dell_hp_resume(struct hda_codec *codec, alc_write_coef_idx(codec, 0xd, 0x2800); } +static void alc_fixup_3kpull_low(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + struct alc_spec *spec = codec->spec; + + if (action == HDA_FIXUP_ACT_PRE_PROBE) + spec->en_3kpull_low = false; +} + enum { ALC269_FIXUP_GPIO2, ALC269_FIXUP_SONY_VAIO, @@ -8049,6 +8058,7 @@ enum { ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC, ALC285_FIXUP_ASUS_GA605K_I2C_SPEAKER2_TO_DAC1, ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC, + ALC256_FIXUP_DIS_3KPULL_LOW, }; /* A special fixup for Lenovo C940 and Yoga Duet 7; @@ -10463,6 +10473,10 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE, }, + [ALC256_FIXUP_DIS_3KPULL_LOW] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_3kpull_low, + }, }; static const struct hda_quirk alc269_fixup_tbl[] = { @@ -11128,6 +11142,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), + SND_PCI_QUIRK(0x10ec, 0x129e, "CIX Phecda Board", ALC256_FIXUP_DIS_3KPULL_LOW), SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), SND_PCI_QUIRK(0x10ec, 0x12f6, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC), ^ permalink raw reply related [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-06-25 3:05 ` Kailang @ 2025-06-26 3:44 ` Joakim Zhang 2025-06-26 5:51 ` Kailang 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-06-26 3:44 UTC (permalink / raw) To: Kailang, Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen, cix-kernel-upstream Hello Kailang, > -----Original Message----- > From: Kailang <kailang@realtek.com> > Sent: Wednesday, June 25, 2025 11:06 AM > To: Joakim Zhang <joakim.zhang@cixtech.com>; Takashi Iwai <tiwai@suse.de> > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; cix- > kernel-upstream <cix-kernel-upstream@cixtech.com> > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > alc256 > > > Maybe your platform need to set spec->en_3kpull_low to false. > If spec->en_3kpull_low = false will help you to get MIC JD. Yes, but don't know what exact hardware design makes this difference, do you know it? Indeed, it's better to add a board fixup, please ignore this patch, will upstream later after hda controller upstreamed. Joakim ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-06-26 3:44 ` Joakim Zhang @ 2025-06-26 5:51 ` Kailang 2025-07-01 3:28 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Kailang @ 2025-06-26 5:51 UTC (permalink / raw) To: Joakim Zhang, Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen, cix-kernel-upstream > -----Original Message----- > From: Joakim Zhang <joakim.zhang@cixtech.com> > Sent: Thursday, June 26, 2025 11:45 AM > To: Kailang <kailang@realtek.com>; Takashi Iwai <tiwai@suse.de> > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; > cix-kernel-upstream <cix-kernel-upstream@cixtech.com> > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > alc256 > > > External mail : This email originated from outside the organization. Do not > reply, click links, or open attachments unless you recognize the sender and > know the content is safe. > > > > Hello Kailang, > > > -----Original Message----- > > From: Kailang <kailang@realtek.com> > > Sent: Wednesday, June 25, 2025 11:06 AM > > To: Joakim Zhang <joakim.zhang@cixtech.com>; Takashi Iwai > > <tiwai@suse.de> > > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; cix- > > kernel-upstream <cix-kernel-upstream@cixtech.com> > > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect > > failed on > > alc256 > > > > > > Maybe your platform need to set spec->en_3kpull_low to false. > > If spec->en_3kpull_low = false will help you to get MIC JD. > > Yes, but don't know what exact hardware design makes this difference, do you > know it? I don't know. But FT(Phytium) platform was disable runtime suspend, it doesn't have this issue. FT has not upstream his patch until now. > > Indeed, it's better to add a board fixup, please ignore this patch, will upstream > later after hda controller upstreamed. > > Joakim > > > This email (including its attachments) is intended only for the person or entity > to which it is addressed and may contain information that is privileged, > confidential or otherwise protected from disclosure. Unauthorized use, > dissemination, distribution or copying of this email or the information herein > or taking any action in reliance on the contents of this email or the > information herein, by anyone other than the intended recipient, or an > employee or agent responsible for delivering the message to the intended > recipient, is strictly prohibited. If you are not the intended recipient, please do > not read, copy, use or disclose any part of this e-mail to others. Please notify > the sender immediately and permanently delete this e-mail and any > attachments if you received it in error. Internet communications cannot be > guaranteed to be timely, secure, error-free or virus-free. The sender does not > accept liability for any errors or omissions. ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-06-26 5:51 ` Kailang @ 2025-07-01 3:28 ` Joakim Zhang 2025-07-01 5:51 ` Takashi Iwai 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-07-01 3:28 UTC (permalink / raw) To: Kailang, Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen Hello Kailang, I'd like to insert another question through this. That would be appreciated if you could have a look. After system boot, we can see the default mixer status as below: root@cix-localhost:~# amixer -c 0 contents numid=14,iface=CARD,name='Headphone Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=12,iface=CARD,name='Internal Mic Phantom Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=13,iface=CARD,name='Mic Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=15,iface=CARD,name='Speaker Phantom Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=11,iface=MIXER,name='Master Playback Switch' ; type=BOOLEAN,access=rw------,values=1 : values=on numid=10,iface=MIXER,name='Master Playback Volume' ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 : values=60 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=2,iface=MIXER,name='Headphone Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=1,iface=MIXER,name='Headphone Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 : values=87,87 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=9,iface=MIXER,name='Mic Boost Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=0,0 | dBscale-min=0.00dB,step=10.00dB,mute=0 numid=7,iface=MIXER,name='Capture Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=6,iface=MIXER,name='Capture Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 : values=39,39 | dBscale-min=-17.25dB,step=0.75dB,mute=0 numid=5,iface=MIXER,name='Auto-Mute Mode' ; type=ENUMERATED,access=rw------,values=1,items=2 ; Item #0 'Disabled' ; Item #1 'Enabled' : values=1 numid=8,iface=MIXER,name='Internal Mic Boost Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=0,0 | dBscale-min=0.00dB,step=10.00dB,mute=0 numid=4,iface=MIXER,name='Speaker Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=off,off numid=3,iface=MIXER,name='Speaker Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 : values=0,0 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=17,iface=PCM,name='Capture Channel Map' ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 : values=0,0 | container | chmap-fixed=FL,FR numid=16,iface=PCM,name='Playback Channel Map' ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 : values=0,0 | container | chmap-fixed=FL,FR It can auto switch 'Headphone Playback Switch'/'Headphone Playback Volume' and 'Speaker Playback Switch'/'Speaker Playback Volume', when I plugin the headset or not, but I have not found the related logic, could you please help clarify a bit? Joakim > -----Original Message----- > From: Kailang <kailang@realtek.com> > Sent: Thursday, June 26, 2025 1:52 PM > To: Joakim Zhang <joakim.zhang@cixtech.com>; Takashi Iwai <tiwai@suse.de> > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; cix- > kernel-upstream <cix-kernel-upstream@cixtech.com> > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > alc256 > > EXTERNAL EMAIL > > > -----Original Message----- > > From: Joakim Zhang <joakim.zhang@cixtech.com> > > Sent: Thursday, June 26, 2025 11:45 AM > > To: Kailang <kailang@realtek.com>; Takashi Iwai <tiwai@suse.de> > > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; > > cix-kernel-upstream <cix-kernel-upstream@cixtech.com> > > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect > > failed on > > alc256 > > > > > > External mail : This email originated from outside the organization. > > Do not reply, click links, or open attachments unless you recognize > > the sender and know the content is safe. > > > > > > > > Hello Kailang, > > > > > -----Original Message----- > > > From: Kailang <kailang@realtek.com> > > > Sent: Wednesday, June 25, 2025 11:06 AM > > > To: Joakim Zhang <joakim.zhang@cixtech.com>; Takashi Iwai > > > <tiwai@suse.de> > > > Cc: perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn>; > > > cix- kernel-upstream <cix-kernel-upstream@cixtech.com> > > > Subject: RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect > > > failed on > > > alc256 > > > > > > > > > Maybe your platform need to set spec->en_3kpull_low to false. > > > If spec->en_3kpull_low = false will help you to get MIC JD. > > > > Yes, but don't know what exact hardware design makes this difference, > > do you know it? > > I don't know. But FT(Phytium) platform was disable runtime suspend, it > doesn't have this issue. > FT has not upstream his patch until now. > > > > > Indeed, it's better to add a board fixup, please ignore this patch, > > will upstream later after hda controller upstreamed. > > > > Joakim > > > > > > This email (including its attachments) is intended only for the person > > or entity to which it is addressed and may contain information that is > > privileged, confidential or otherwise protected from disclosure. > > Unauthorized use, dissemination, distribution or copying of this email > > or the information herein or taking any action in reliance on the > > contents of this email or the information herein, by anyone other than > > the intended recipient, or an employee or agent responsible for > > delivering the message to the intended recipient, is strictly > > prohibited. If you are not the intended recipient, please do not read, > > copy, use or disclose any part of this e-mail to others. Please notify > > the sender immediately and permanently delete this e-mail and any > > attachments if you received it in error. Internet communications > > cannot be guaranteed to be timely, secure, error-free or virus-free. The > sender does not accept liability for any errors or omissions. ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-01 3:28 ` Joakim Zhang @ 2025-07-01 5:51 ` Takashi Iwai 2025-07-01 6:35 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Takashi Iwai @ 2025-07-01 5:51 UTC (permalink / raw) To: Joakim Zhang Cc: Kailang, Takashi Iwai, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen On Tue, 01 Jul 2025 05:28:39 +0200, Joakim Zhang wrote: > > > Hello Kailang, > > I'd like to insert another question through this. That would be appreciated if you could have a look. > > After system boot, we can see the default mixer status as below: > > root@cix-localhost:~# amixer -c 0 contents > numid=14,iface=CARD,name='Headphone Jack' > ; type=BOOLEAN,access=r-------,values=1 > : values=on > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > ; type=BOOLEAN,access=r-------,values=1 > : values=on > numid=13,iface=CARD,name='Mic Jack' > ; type=BOOLEAN,access=r-------,values=1 > : values=on > numid=15,iface=CARD,name='Speaker Phantom Jack' > ; type=BOOLEAN,access=r-------,values=1 > : values=on > numid=11,iface=MIXER,name='Master Playback Switch' > ; type=BOOLEAN,access=rw------,values=1 > : values=on > numid=10,iface=MIXER,name='Master Playback Volume' > ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 > : values=60 > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > numid=2,iface=MIXER,name='Headphone Playback Switch' > ; type=BOOLEAN,access=rw------,values=2 > : values=on,on > numid=1,iface=MIXER,name='Headphone Playback Volume' > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > : values=87,87 > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > numid=9,iface=MIXER,name='Mic Boost Volume' > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > : values=0,0 > | dBscale-min=0.00dB,step=10.00dB,mute=0 > numid=7,iface=MIXER,name='Capture Switch' > ; type=BOOLEAN,access=rw------,values=2 > : values=on,on > numid=6,iface=MIXER,name='Capture Volume' > ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 > : values=39,39 > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > numid=5,iface=MIXER,name='Auto-Mute Mode' > ; type=ENUMERATED,access=rw------,values=1,items=2 > ; Item #0 'Disabled' > ; Item #1 'Enabled' > : values=1 > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > : values=0,0 > | dBscale-min=0.00dB,step=10.00dB,mute=0 > numid=4,iface=MIXER,name='Speaker Playback Switch' > ; type=BOOLEAN,access=rw------,values=2 > : values=off,off > numid=3,iface=MIXER,name='Speaker Playback Volume' > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > : values=0,0 > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > numid=17,iface=PCM,name='Capture Channel Map' > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > : values=0,0 > | container > | chmap-fixed=FL,FR > numid=16,iface=PCM,name='Playback Channel Map' > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > : values=0,0 > | container > | chmap-fixed=FL,FR > > It can auto switch 'Headphone Playback Switch'/'Headphone Playback Volume' and > 'Speaker Playback Switch'/'Speaker Playback Volume', when I plugin the headset or not, > but I have not found the related logic, could you please help clarify a bit? Isn't it "Auto-Mute Mode"? If it's set, the speaker is muted automatically when the headphone/headset jack is plugged by the kernel driver itself. Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-01 5:51 ` Takashi Iwai @ 2025-07-01 6:35 ` Joakim Zhang 2025-07-01 6:42 ` Takashi Iwai 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-07-01 6:35 UTC (permalink / raw) To: Takashi Iwai Cc: Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen Hello Takashi, Thanks a lot for your help. > > Hello Kailang, > > > > I'd like to insert another question through this. That would be appreciated if > you could have a look. > > > > After system boot, we can see the default mixer status as below: > > > > root@cix-localhost:~# amixer -c 0 contents > > numid=14,iface=CARD,name='Headphone Jack' > > ; type=BOOLEAN,access=r-------,values=1 > > : values=on > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > ; type=BOOLEAN,access=r-------,values=1 > > : values=on > > numid=13,iface=CARD,name='Mic Jack' > > ; type=BOOLEAN,access=r-------,values=1 > > : values=on > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > ; type=BOOLEAN,access=r-------,values=1 > > : values=on > > numid=11,iface=MIXER,name='Master Playback Switch' > > ; type=BOOLEAN,access=rw------,values=1 > > : values=on > > numid=10,iface=MIXER,name='Master Playback Volume' > > ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 > > : values=60 > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > ; type=BOOLEAN,access=rw------,values=2 > > : values=on,on > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > : values=87,87 > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > numid=9,iface=MIXER,name='Mic Boost Volume' > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > : values=0,0 > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > numid=7,iface=MIXER,name='Capture Switch' > > ; type=BOOLEAN,access=rw------,values=2 > > : values=on,on > > numid=6,iface=MIXER,name='Capture Volume' > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 > > : values=39,39 > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > ; Item #0 'Disabled' > > ; Item #1 'Enabled' > > : values=1 > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > : values=0,0 > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > ; type=BOOLEAN,access=rw------,values=2 > > : values=off,off > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > : values=0,0 > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > numid=17,iface=PCM,name='Capture Channel Map' > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > : values=0,0 > > | container > > | chmap-fixed=FL,FR > > numid=16,iface=PCM,name='Playback Channel Map' > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > : values=0,0 > > | container > > | chmap-fixed=FL,FR > > > > It can auto switch 'Headphone Playback Switch'/'Headphone Playback > > Volume' and 'Speaker Playback Switch'/'Speaker Playback Volume', when > > I plugin the headset or not, but I have not found the related logic, could you > please help clarify a bit? > > Isn't it "Auto-Mute Mode"? If it's set, the speaker is muted automatically > when the headphone/headset jack is plugged by the kernel driver itself. What strange is 'Auto-Mute Mode' would be disabled after headset plugin/out several times, don' t know the reason.... However, it seems that speaker and headphone/headset still can auto switch. Please see below mixer status. root@cix-localhost:~# amixer -c 0 contents numid=14,iface=CARD,name='Headphone Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=12,iface=CARD,name='Internal Mic Phantom Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=13,iface=CARD,name='Mic Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=15,iface=CARD,name='Speaker Phantom Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=11,iface=MIXER,name='Master Playback Switch' ; type=BOOLEAN,access=rw------,values=1 : values=on numid=10,iface=MIXER,name='Master Playback Volume' ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 : values=60 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=2,iface=MIXER,name='Headphone Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=1,iface=MIXER,name='Headphone Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 : values=87,87 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=9,iface=MIXER,name='Mic Boost Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=0,0 | dBscale-min=0.00dB,step=10.00dB,mute=0 numid=7,iface=MIXER,name='Capture Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=6,iface=MIXER,name='Capture Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 : values=39,39 | dBscale-min=-17.25dB,step=0.75dB,mute=0 numid=5,iface=MIXER,name='Auto-Mute Mode' ; type=ENUMERATED,access=rw------,values=1,items=2 ; Item #0 'Disabled' ; Item #1 'Enabled' : values=0 // disabled numid=8,iface=MIXER,name='Internal Mic Boost Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=0,0 | dBscale-min=0.00dB,step=10.00dB,mute=0 numid=4,iface=MIXER,name='Speaker Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=off,off numid=3,iface=MIXER,name='Speaker Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 : values=0,0 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=17,iface=PCM,name='Capture Channel Map' ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 : values=0,0 | container | chmap-fixed=FL,FR numid=16,iface=PCM,name='Playback Channel Map' ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 : values=0,0 | container | chmap-fixed=FL,FR root@cix-localhost:~# amixer -c 0 contents numid=14,iface=CARD,name='Headphone Jack' ; type=BOOLEAN,access=r-------,values=1 : values=off numid=12,iface=CARD,name='Internal Mic Phantom Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=13,iface=CARD,name='Mic Jack' ; type=BOOLEAN,access=r-------,values=1 : values=off numid=15,iface=CARD,name='Speaker Phantom Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=11,iface=MIXER,name='Master Playback Switch' ; type=BOOLEAN,access=rw------,values=1 : values=on numid=10,iface=MIXER,name='Master Playback Volume' ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 : values=60 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=2,iface=MIXER,name='Headphone Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=off,off numid=1,iface=MIXER,name='Headphone Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 : values=0,0 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=9,iface=MIXER,name='Mic Boost Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=0,0 | dBscale-min=0.00dB,step=10.00dB,mute=0 numid=7,iface=MIXER,name='Capture Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=6,iface=MIXER,name='Capture Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 : values=39,39 | dBscale-min=-17.25dB,step=0.75dB,mute=0 numid=5,iface=MIXER,name='Auto-Mute Mode' ; type=ENUMERATED,access=rw------,values=1,items=2 ; Item #0 'Disabled' ; Item #1 'Enabled' : values=0 // disabled numid=8,iface=MIXER,name='Internal Mic Boost Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=0,0 | dBscale-min=0.00dB,step=10.00dB,mute=0 numid=4,iface=MIXER,name='Speaker Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=3,iface=MIXER,name='Speaker Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 : values=87,87 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=17,iface=PCM,name='Capture Channel Map' ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 : values=0,0 | container | chmap-fixed=FL,FR numid=16,iface=PCM,name='Playback Channel Map' ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 : values=0,0 | container | chmap-fixed=FL,FR ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-01 6:35 ` Joakim Zhang @ 2025-07-01 6:42 ` Takashi Iwai 2025-07-01 6:48 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Takashi Iwai @ 2025-07-01 6:42 UTC (permalink / raw) To: Joakim Zhang Cc: Takashi Iwai, Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen On Tue, 01 Jul 2025 08:35:05 +0200, Joakim Zhang wrote: > > > Hello Takashi, > > Thanks a lot for your help. > > > > Hello Kailang, > > > > > > I'd like to insert another question through this. That would be appreciated if > > you could have a look. > > > > > > After system boot, we can see the default mixer status as below: > > > > > > root@cix-localhost:~# amixer -c 0 contents > > > numid=14,iface=CARD,name='Headphone Jack' > > > ; type=BOOLEAN,access=r-------,values=1 > > > : values=on > > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > > ; type=BOOLEAN,access=r-------,values=1 > > > : values=on > > > numid=13,iface=CARD,name='Mic Jack' > > > ; type=BOOLEAN,access=r-------,values=1 > > > : values=on > > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > > ; type=BOOLEAN,access=r-------,values=1 > > > : values=on > > > numid=11,iface=MIXER,name='Master Playback Switch' > > > ; type=BOOLEAN,access=rw------,values=1 > > > : values=on > > > numid=10,iface=MIXER,name='Master Playback Volume' > > > ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 > > > : values=60 > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > > ; type=BOOLEAN,access=rw------,values=2 > > > : values=on,on > > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > : values=87,87 > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > numid=9,iface=MIXER,name='Mic Boost Volume' > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > : values=0,0 > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > numid=7,iface=MIXER,name='Capture Switch' > > > ; type=BOOLEAN,access=rw------,values=2 > > > : values=on,on > > > numid=6,iface=MIXER,name='Capture Volume' > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 > > > : values=39,39 > > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > > ; Item #0 'Disabled' > > > ; Item #1 'Enabled' > > > : values=1 > > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > : values=0,0 > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > > ; type=BOOLEAN,access=rw------,values=2 > > > : values=off,off > > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > : values=0,0 > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > numid=17,iface=PCM,name='Capture Channel Map' > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > : values=0,0 > > > | container > > > | chmap-fixed=FL,FR > > > numid=16,iface=PCM,name='Playback Channel Map' > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > : values=0,0 > > > | container > > > | chmap-fixed=FL,FR > > > > > > It can auto switch 'Headphone Playback Switch'/'Headphone Playback > > > Volume' and 'Speaker Playback Switch'/'Speaker Playback Volume', when > > > I plugin the headset or not, but I have not found the related logic, could you > > please help clarify a bit? > > > > Isn't it "Auto-Mute Mode"? If it's set, the speaker is muted automatically > > when the headphone/headset jack is plugged by the kernel driver itself. > > What strange is 'Auto-Mute Mode' would be disabled after headset plugin/out several times, don' t know the reason.... "Auto-Mute Mode" is a software switch, and it means some program must have turned it off explicitly. e.g. the sound server like pulseaudio or pipewire disables it. > However, it seems that speaker and headphone/headset still can auto switch. Please see below mixer status. Usually pulseaudio/pipewire takes over and does the switching. Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-01 6:42 ` Takashi Iwai @ 2025-07-01 6:48 ` Joakim Zhang 2025-07-01 6:50 ` Takashi Iwai 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-07-01 6:48 UTC (permalink / raw) To: Takashi Iwai Cc: Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen Thanks, > -----Original Message----- > From: Takashi Iwai <tiwai@suse.de> > Sent: Tuesday, July 1, 2025 2:43 PM > To: Joakim Zhang <joakim.zhang@cixtech.com> > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > alc256 > > EXTERNAL EMAIL > > CAUTION: Suspicious Email from unusual domain. > > On Tue, 01 Jul 2025 08:35:05 +0200, > Joakim Zhang wrote: > > > > > > Hello Takashi, > > > > Thanks a lot for your help. > > > > > > Hello Kailang, > > > > > > > > I'd like to insert another question through this. That would be > > > > appreciated if > > > you could have a look. > > > > > > > > After system boot, we can see the default mixer status as below: > > > > > > > > root@cix-localhost:~# amixer -c 0 contents > > > > numid=14,iface=CARD,name='Headphone Jack' > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > : values=on > > > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > : values=on > > > > numid=13,iface=CARD,name='Mic Jack' > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > : values=on > > > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > : values=on > > > > numid=11,iface=MIXER,name='Master Playback Switch' > > > > ; type=BOOLEAN,access=rw------,values=1 > > > > : values=on > > > > numid=10,iface=MIXER,name='Master Playback Volume' > > > > ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 > > > > : values=60 > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > : values=on,on > > > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > : values=87,87 > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > numid=9,iface=MIXER,name='Mic Boost Volume' > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > : values=0,0 > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > numid=7,iface=MIXER,name='Capture Switch' > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > : values=on,on > > > > numid=6,iface=MIXER,name='Capture Volume' > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 > > > > : values=39,39 > > > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > > > ; Item #0 'Disabled' > > > > ; Item #1 'Enabled' > > > > : values=1 > > > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > : values=0,0 > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > : values=off,off > > > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > : values=0,0 > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > numid=17,iface=PCM,name='Capture Channel Map' > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > : values=0,0 > > > > | container > > > > | chmap-fixed=FL,FR > > > > numid=16,iface=PCM,name='Playback Channel Map' > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > : values=0,0 > > > > | container > > > > | chmap-fixed=FL,FR > > > > > > > > It can auto switch 'Headphone Playback Switch'/'Headphone Playback > > > > Volume' and 'Speaker Playback Switch'/'Speaker Playback Volume', > > > > when I plugin the headset or not, but I have not found the related > > > > logic, could you > > > please help clarify a bit? > > > > > > Isn't it "Auto-Mute Mode"? If it's set, the speaker is muted > > > automatically when the headphone/headset jack is plugged by the kernel > driver itself. > > > > What strange is 'Auto-Mute Mode' would be disabled after headset > plugin/out several times, don' t know the reason.... > > "Auto-Mute Mode" is a software switch, and it means some program must > have turned it off explicitly. e.g. the sound server like pulseaudio or pipewire > disables it. > > > However, it seems that speaker and headphone/headset still can auto > switch. Please see below mixer status. > > Usually pulseaudio/pipewire takes over and does the switching. OK, I see, I will dig into it, could you please tell me is there any other software switches in the mixers? Joakim ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-01 6:48 ` Joakim Zhang @ 2025-07-01 6:50 ` Takashi Iwai 2025-07-01 8:40 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Takashi Iwai @ 2025-07-01 6:50 UTC (permalink / raw) To: Joakim Zhang Cc: Takashi Iwai, Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen On Tue, 01 Jul 2025 08:48:56 +0200, Joakim Zhang wrote: > > Thanks, > > > -----Original Message----- > > From: Takashi Iwai <tiwai@suse.de> > > Sent: Tuesday, July 1, 2025 2:43 PM > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > > alc256 > > > > EXTERNAL EMAIL > > > > CAUTION: Suspicious Email from unusual domain. > > > > On Tue, 01 Jul 2025 08:35:05 +0200, > > Joakim Zhang wrote: > > > > > > > > > Hello Takashi, > > > > > > Thanks a lot for your help. > > > > > > > > Hello Kailang, > > > > > > > > > > I'd like to insert another question through this. That would be > > > > > appreciated if > > > > you could have a look. > > > > > > > > > > After system boot, we can see the default mixer status as below: > > > > > > > > > > root@cix-localhost:~# amixer -c 0 contents > > > > > numid=14,iface=CARD,name='Headphone Jack' > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > : values=on > > > > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > : values=on > > > > > numid=13,iface=CARD,name='Mic Jack' > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > : values=on > > > > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > : values=on > > > > > numid=11,iface=MIXER,name='Master Playback Switch' > > > > > ; type=BOOLEAN,access=rw------,values=1 > > > > > : values=on > > > > > numid=10,iface=MIXER,name='Master Playback Volume' > > > > > ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 > > > > > : values=60 > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > : values=on,on > > > > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > > : values=87,87 > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > numid=9,iface=MIXER,name='Mic Boost Volume' > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > > : values=0,0 > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > numid=7,iface=MIXER,name='Capture Switch' > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > : values=on,on > > > > > numid=6,iface=MIXER,name='Capture Volume' > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 > > > > > : values=39,39 > > > > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > > > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > > > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > > > > ; Item #0 'Disabled' > > > > > ; Item #1 'Enabled' > > > > > : values=1 > > > > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > > : values=0,0 > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > : values=off,off > > > > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > > : values=0,0 > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > numid=17,iface=PCM,name='Capture Channel Map' > > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > > : values=0,0 > > > > > | container > > > > > | chmap-fixed=FL,FR > > > > > numid=16,iface=PCM,name='Playback Channel Map' > > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > > : values=0,0 > > > > > | container > > > > > | chmap-fixed=FL,FR > > > > > > > > > > It can auto switch 'Headphone Playback Switch'/'Headphone Playback > > > > > Volume' and 'Speaker Playback Switch'/'Speaker Playback Volume', > > > > > when I plugin the headset or not, but I have not found the related > > > > > logic, could you > > > > please help clarify a bit? > > > > > > > > Isn't it "Auto-Mute Mode"? If it's set, the speaker is muted > > > > automatically when the headphone/headset jack is plugged by the kernel > > driver itself. > > > > > > What strange is 'Auto-Mute Mode' would be disabled after headset > > plugin/out several times, don' t know the reason.... > > > > "Auto-Mute Mode" is a software switch, and it means some program must > > have turned it off explicitly. e.g. the sound server like pulseaudio or pipewire > > disables it. > > > > > However, it seems that speaker and headphone/headset still can auto > > switch. Please see below mixer status. > > > > Usually pulseaudio/pipewire takes over and does the switching. > > OK, I see, I will dig into it, could you please tell me is there any other software switches in the mixers? Any mixer program can change... But basically the auto-mute is a task of the sound daemon. Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-01 6:50 ` Takashi Iwai @ 2025-07-01 8:40 ` Joakim Zhang 2025-07-01 9:14 ` Takashi Iwai 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-07-01 8:40 UTC (permalink / raw) To: Takashi Iwai Cc: Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen Hello, > > > -----Original Message----- > > > From: Takashi Iwai <tiwai@suse.de> > > > Sent: Tuesday, July 1, 2025 2:43 PM > > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > > > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect > > > failed on > > > alc256 > > > > > > EXTERNAL EMAIL > > > > > > CAUTION: Suspicious Email from unusual domain. > > > > > > On Tue, 01 Jul 2025 08:35:05 +0200, > > > Joakim Zhang wrote: > > > > > > > > > > > > Hello Takashi, > > > > > > > > Thanks a lot for your help. > > > > > > > > > > Hello Kailang, > > > > > > > > > > > > I'd like to insert another question through this. That would > > > > > > be appreciated if > > > > > you could have a look. > > > > > > > > > > > > After system boot, we can see the default mixer status as below: > > > > > > > > > > > > root@cix-localhost:~# amixer -c 0 contents > > > > > > numid=14,iface=CARD,name='Headphone Jack' > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > : values=on > > > > > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > : values=on > > > > > > numid=13,iface=CARD,name='Mic Jack' > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > : values=on > > > > > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > : values=on > > > > > > numid=11,iface=MIXER,name='Master Playback Switch' > > > > > > ; type=BOOLEAN,access=rw------,values=1 > > > > > > : values=on > > > > > > numid=10,iface=MIXER,name='Master Playback Volume' > > > > > > ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 > > > > > > : values=60 > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > : values=on,on > > > > > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > > > : values=87,87 > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > numid=9,iface=MIXER,name='Mic Boost Volume' > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > > > : values=0,0 > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > numid=7,iface=MIXER,name='Capture Switch' > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > : values=on,on > > > > > > numid=6,iface=MIXER,name='Capture Volume' > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 > > > > > > : values=39,39 > > > > > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > > > > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > > > > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > > > > > ; Item #0 'Disabled' > > > > > > ; Item #1 'Enabled' > > > > > > : values=1 > > > > > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > > > : values=0,0 > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > : values=off,off > > > > > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > > > : values=0,0 > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > numid=17,iface=PCM,name='Capture Channel Map' > > > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > > > : values=0,0 > > > > > > | container > > > > > > | chmap-fixed=FL,FR > > > > > > numid=16,iface=PCM,name='Playback Channel Map' > > > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > > > : values=0,0 > > > > > > | container > > > > > > | chmap-fixed=FL,FR > > > > > > > > > > > > It can auto switch 'Headphone Playback Switch'/'Headphone > > > > > > Playback Volume' and 'Speaker Playback Switch'/'Speaker > > > > > > Playback Volume', when I plugin the headset or not, but I have > > > > > > not found the related logic, could you > > > > > please help clarify a bit? > > > > > > > > > > Isn't it "Auto-Mute Mode"? If it's set, the speaker is muted > > > > > automatically when the headphone/headset jack is plugged by the > > > > > kernel > > > driver itself. > > > > > > > > What strange is 'Auto-Mute Mode' would be disabled after headset > > > plugin/out several times, don' t know the reason.... > > > > > > "Auto-Mute Mode" is a software switch, and it means some program > > > must have turned it off explicitly. e.g. the sound server like > > > pulseaudio or pipewire disables it. > > > > > > > However, it seems that speaker and headphone/headset still can > > > > auto > > > switch. Please see below mixer status. > > > > > > Usually pulseaudio/pipewire takes over and does the switching. > > > > OK, I see, I will dig into it, could you please tell me is there any other software > switches in the mixers? > > Any mixer program can change... But basically the auto-mute is a task of the > sound daemon. I disable both pulseaudio and pipewire from the Debian, and enable the auto-mute, when the headset plugin but the switch not set correctly. 'Headphone Playback Switch'/'Headphone Playback Volume' not set, but 'Speaker Playback Switch'/'Speaker Playback Volume' enabled. Are there any other possible reasons? root@cix-localhost:~# amixer -c 0 contents numid=14,iface=CARD,name='Headphone Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=12,iface=CARD,name='Internal Mic Phantom Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=13,iface=CARD,name='Mic Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=15,iface=CARD,name='Speaker Phantom Jack' ; type=BOOLEAN,access=r-------,values=1 : values=on numid=11,iface=MIXER,name='Master Playback Switch' ; type=BOOLEAN,access=rw------,values=1 : values=on numid=10,iface=MIXER,name='Master Playback Volume' ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 : values=60 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=2,iface=MIXER,name='Headphone Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=off,off numid=1,iface=MIXER,name='Headphone Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 : values=0,0 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=9,iface=MIXER,name='Mic Boost Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=0,0 | dBscale-min=0.00dB,step=10.00dB,mute=0 numid=7,iface=MIXER,name='Capture Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=6,iface=MIXER,name='Capture Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 : values=39,39 | dBscale-min=-17.25dB,step=0.75dB,mute=0 numid=5,iface=MIXER,name='Auto-Mute Mode' ; type=ENUMERATED,access=rw------,values=1,items=2 ; Item #0 'Disabled' ; Item #1 'Enabled' : values=1 numid=8,iface=MIXER,name='Internal Mic Boost Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=0,0 | dBscale-min=0.00dB,step=10.00dB,mute=0 numid=4,iface=MIXER,name='Speaker Playback Switch' ; type=BOOLEAN,access=rw------,values=2 : values=on,on numid=3,iface=MIXER,name='Speaker Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 : values=87,87 | dBscale-min=-65.25dB,step=0.75dB,mute=0 numid=17,iface=PCM,name='Capture Channel Map' ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 : values=0,0 | container | chmap-fixed=FL,FR numid=16,iface=PCM,name='Playback Channel Map' ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 : values=0,0 | container | chmap-fixed=FL,FR ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-01 8:40 ` Joakim Zhang @ 2025-07-01 9:14 ` Takashi Iwai 2025-07-01 10:27 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Takashi Iwai @ 2025-07-01 9:14 UTC (permalink / raw) To: Joakim Zhang Cc: Takashi Iwai, Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen On Tue, 01 Jul 2025 10:40:51 +0200, Joakim Zhang wrote: > > > Hello, > > > > > -----Original Message----- > > > > From: Takashi Iwai <tiwai@suse.de> > > > > Sent: Tuesday, July 1, 2025 2:43 PM > > > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > > > > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > > > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect > > > > failed on > > > > alc256 > > > > > > > > EXTERNAL EMAIL > > > > > > > > CAUTION: Suspicious Email from unusual domain. > > > > > > > > On Tue, 01 Jul 2025 08:35:05 +0200, > > > > Joakim Zhang wrote: > > > > > > > > > > > > > > > Hello Takashi, > > > > > > > > > > Thanks a lot for your help. > > > > > > > > > > > > Hello Kailang, > > > > > > > > > > > > > > I'd like to insert another question through this. That would > > > > > > > be appreciated if > > > > > > you could have a look. > > > > > > > > > > > > > > After system boot, we can see the default mixer status as below: > > > > > > > > > > > > > > root@cix-localhost:~# amixer -c 0 contents > > > > > > > numid=14,iface=CARD,name='Headphone Jack' > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > : values=on > > > > > > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > : values=on > > > > > > > numid=13,iface=CARD,name='Mic Jack' > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > : values=on > > > > > > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > : values=on > > > > > > > numid=11,iface=MIXER,name='Master Playback Switch' > > > > > > > ; type=BOOLEAN,access=rw------,values=1 > > > > > > > : values=on > > > > > > > numid=10,iface=MIXER,name='Master Playback Volume' > > > > > > > ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 > > > > > > > : values=60 > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > : values=on,on > > > > > > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > > > > : values=87,87 > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > numid=9,iface=MIXER,name='Mic Boost Volume' > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > > > > : values=0,0 > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > numid=7,iface=MIXER,name='Capture Switch' > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > : values=on,on > > > > > > > numid=6,iface=MIXER,name='Capture Volume' > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 > > > > > > > : values=39,39 > > > > > > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > > > > > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > > > > > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > > > > > > ; Item #0 'Disabled' > > > > > > > ; Item #1 'Enabled' > > > > > > > : values=1 > > > > > > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > > > > : values=0,0 > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > : values=off,off > > > > > > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > > > > : values=0,0 > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > numid=17,iface=PCM,name='Capture Channel Map' > > > > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > > > > : values=0,0 > > > > > > > | container > > > > > > > | chmap-fixed=FL,FR > > > > > > > numid=16,iface=PCM,name='Playback Channel Map' > > > > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > > > > : values=0,0 > > > > > > > | container > > > > > > > | chmap-fixed=FL,FR > > > > > > > > > > > > > > It can auto switch 'Headphone Playback Switch'/'Headphone > > > > > > > Playback Volume' and 'Speaker Playback Switch'/'Speaker > > > > > > > Playback Volume', when I plugin the headset or not, but I have > > > > > > > not found the related logic, could you > > > > > > please help clarify a bit? > > > > > > > > > > > > Isn't it "Auto-Mute Mode"? If it's set, the speaker is muted > > > > > > automatically when the headphone/headset jack is plugged by the > > > > > > kernel > > > > driver itself. > > > > > > > > > > What strange is 'Auto-Mute Mode' would be disabled after headset > > > > plugin/out several times, don' t know the reason.... > > > > > > > > "Auto-Mute Mode" is a software switch, and it means some program > > > > must have turned it off explicitly. e.g. the sound server like > > > > pulseaudio or pipewire disables it. > > > > > > > > > However, it seems that speaker and headphone/headset still can > > > > > auto > > > > switch. Please see below mixer status. > > > > > > > > Usually pulseaudio/pipewire takes over and does the switching. > > > > > > OK, I see, I will dig into it, could you please tell me is there any other software > > switches in the mixers? > > > > Any mixer program can change... But basically the auto-mute is a task of the > > sound daemon. > > I disable both pulseaudio and pipewire from the Debian, and enable the auto-mute, when the headset plugin but the switch not set correctly. > 'Headphone Playback Switch'/'Headphone Playback Volume' not set, but 'Speaker Playback Switch'/'Speaker Playback Volume' enabled. > Are there any other possible reasons? The auto-mute doesn't change the mixer state. It switches internally, either by adjusting the pin control or the amp. Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-01 9:14 ` Takashi Iwai @ 2025-07-01 10:27 ` Joakim Zhang 2025-07-01 11:42 ` Takashi Iwai 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-07-01 10:27 UTC (permalink / raw) To: Takashi Iwai Cc: Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen > -----Original Message----- > From: Takashi Iwai <tiwai@suse.de> > Sent: Tuesday, July 1, 2025 5:15 PM > To: Joakim Zhang <joakim.zhang@cixtech.com> > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > alc256 > > EXTERNAL EMAIL > > CAUTION: Suspicious Email from unusual domain. > > On Tue, 01 Jul 2025 10:40:51 +0200, > Joakim Zhang wrote: > > > > > > Hello, > > > > > > > -----Original Message----- > > > > > From: Takashi Iwai <tiwai@suse.de> > > > > > Sent: Tuesday, July 1, 2025 2:43 PM > > > > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > > > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > > > > > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > > > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > > > > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack > > > > > detect failed on > > > > > alc256 > > > > > > > > > > EXTERNAL EMAIL > > > > > > > > > > CAUTION: Suspicious Email from unusual domain. > > > > > > > > > > On Tue, 01 Jul 2025 08:35:05 +0200, Joakim Zhang wrote: > > > > > > > > > > > > > > > > > > Hello Takashi, > > > > > > > > > > > > Thanks a lot for your help. > > > > > > > > > > > > > > Hello Kailang, > > > > > > > > > > > > > > > > I'd like to insert another question through this. That > > > > > > > > would be appreciated if > > > > > > > you could have a look. > > > > > > > > > > > > > > > > After system boot, we can see the default mixer status as below: > > > > > > > > > > > > > > > > root@cix-localhost:~# amixer -c 0 contents > > > > > > > > numid=14,iface=CARD,name='Headphone Jack' > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > : values=on > > > > > > > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > : values=on > > > > > > > > numid=13,iface=CARD,name='Mic Jack' > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > : values=on > > > > > > > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > : values=on > > > > > > > > numid=11,iface=MIXER,name='Master Playback Switch' > > > > > > > > ; type=BOOLEAN,access=rw------,values=1 > > > > > > > > : values=on > > > > > > > > numid=10,iface=MIXER,name='Master Playback Volume' > > > > > > > > ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 > > > > > > > > : values=60 > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > : values=on,on > > > > > > > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > > > > > : values=87,87 > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > numid=9,iface=MIXER,name='Mic Boost Volume' > > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > > > > > : values=0,0 > > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > > numid=7,iface=MIXER,name='Capture Switch' > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > : values=on,on > > > > > > > > numid=6,iface=MIXER,name='Capture Volume' > > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 > > > > > > > > : values=39,39 > > > > > > > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > > > > > > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > > > > > > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > > > > > > > ; Item #0 'Disabled' > > > > > > > > ; Item #1 'Enabled' > > > > > > > > : values=1 > > > > > > > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > > > > > : values=0,0 > > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > : values=off,off > > > > > > > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > > > > > : values=0,0 > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > numid=17,iface=PCM,name='Capture Channel Map' > > > > > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > > > > > : values=0,0 > > > > > > > > | container > > > > > > > > | chmap-fixed=FL,FR > > > > > > > > numid=16,iface=PCM,name='Playback Channel Map' > > > > > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > > > > > : values=0,0 > > > > > > > > | container > > > > > > > > | chmap-fixed=FL,FR > > > > > > > > > > > > > > > > It can auto switch 'Headphone Playback Switch'/'Headphone > > > > > > > > Playback Volume' and 'Speaker Playback Switch'/'Speaker > > > > > > > > Playback Volume', when I plugin the headset or not, but I > > > > > > > > have not found the related logic, could you > > > > > > > please help clarify a bit? > > > > > > > > > > > > > > Isn't it "Auto-Mute Mode"? If it's set, the speaker is > > > > > > > muted automatically when the headphone/headset jack is > > > > > > > plugged by the kernel > > > > > driver itself. > > > > > > > > > > > > What strange is 'Auto-Mute Mode' would be disabled after > > > > > > headset > > > > > plugin/out several times, don' t know the reason.... > > > > > > > > > > "Auto-Mute Mode" is a software switch, and it means some program > > > > > must have turned it off explicitly. e.g. the sound server like > > > > > pulseaudio or pipewire disables it. > > > > > > > > > > > However, it seems that speaker and headphone/headset still can > > > > > > auto > > > > > switch. Please see below mixer status. > > > > > > > > > > Usually pulseaudio/pipewire takes over and does the switching. > > > > > > > > OK, I see, I will dig into it, could you please tell me is there > > > > any other software > > > switches in the mixers? > > > > > > Any mixer program can change... But basically the auto-mute is a > > > task of the sound daemon. > > > > I disable both pulseaudio and pipewire from the Debian, and enable the > auto-mute, when the headset plugin but the switch not set correctly. > > 'Headphone Playback Switch'/'Headphone Playback Volume' not set, but > 'Speaker Playback Switch'/'Speaker Playback Volume' enabled. > > Are there any other possible reasons? > > The auto-mute doesn't change the mixer state. It switches internally, either by > adjusting the pin control or the amp. OK, is that means all mixers setting should done by users based on Jack status? Joakim ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-01 10:27 ` Joakim Zhang @ 2025-07-01 11:42 ` Takashi Iwai 2025-07-02 1:59 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Takashi Iwai @ 2025-07-01 11:42 UTC (permalink / raw) To: Joakim Zhang Cc: Takashi Iwai, Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen On Tue, 01 Jul 2025 12:27:52 +0200, Joakim Zhang wrote: > > > > > -----Original Message----- > > From: Takashi Iwai <tiwai@suse.de> > > Sent: Tuesday, July 1, 2025 5:15 PM > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on > > alc256 > > > > EXTERNAL EMAIL > > > > CAUTION: Suspicious Email from unusual domain. > > > > On Tue, 01 Jul 2025 10:40:51 +0200, > > Joakim Zhang wrote: > > > > > > > > > Hello, > > > > > > > > > -----Original Message----- > > > > > > From: Takashi Iwai <tiwai@suse.de> > > > > > > Sent: Tuesday, July 1, 2025 2:43 PM > > > > > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > > > > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > > > > > > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > > > > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > > > > > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack > > > > > > detect failed on > > > > > > alc256 > > > > > > > > > > > > EXTERNAL EMAIL > > > > > > > > > > > > CAUTION: Suspicious Email from unusual domain. > > > > > > > > > > > > On Tue, 01 Jul 2025 08:35:05 +0200, Joakim Zhang wrote: > > > > > > > > > > > > > > > > > > > > > Hello Takashi, > > > > > > > > > > > > > > Thanks a lot for your help. > > > > > > > > > > > > > > > > Hello Kailang, > > > > > > > > > > > > > > > > > > I'd like to insert another question through this. That > > > > > > > > > would be appreciated if > > > > > > > > you could have a look. > > > > > > > > > > > > > > > > > > After system boot, we can see the default mixer status as below: > > > > > > > > > > > > > > > > > > root@cix-localhost:~# amixer -c 0 contents > > > > > > > > > numid=14,iface=CARD,name='Headphone Jack' > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > : values=on > > > > > > > > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > : values=on > > > > > > > > > numid=13,iface=CARD,name='Mic Jack' > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > : values=on > > > > > > > > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > : values=on > > > > > > > > > numid=11,iface=MIXER,name='Master Playback Switch' > > > > > > > > > ; type=BOOLEAN,access=rw------,values=1 > > > > > > > > > : values=on > > > > > > > > > numid=10,iface=MIXER,name='Master Playback Volume' > > > > > > > > > ; type=INTEGER,access=rw---R--,values=1,min=0,max=87,step=0 > > > > > > > > > : values=60 > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > : values=on,on > > > > > > > > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > > > > > > : values=87,87 > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > numid=9,iface=MIXER,name='Mic Boost Volume' > > > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > > > > > > : values=0,0 > > > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > > > numid=7,iface=MIXER,name='Capture Switch' > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > : values=on,on > > > > > > > > > numid=6,iface=MIXER,name='Capture Volume' > > > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0 > > > > > > > > > : values=39,39 > > > > > > > > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > > > > > > > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > > > > > > > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > > > > > > > > ; Item #0 'Disabled' > > > > > > > > > ; Item #1 'Enabled' > > > > > > > > > : values=1 > > > > > > > > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 > > > > > > > > > : values=0,0 > > > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > : values=off,off > > > > > > > > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > > > > > > > > ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0 > > > > > > > > > : values=0,0 > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > numid=17,iface=PCM,name='Capture Channel Map' > > > > > > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > > > > > > : values=0,0 > > > > > > > > > | container > > > > > > > > > | chmap-fixed=FL,FR > > > > > > > > > numid=16,iface=PCM,name='Playback Channel Map' > > > > > > > > > ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0 > > > > > > > > > : values=0,0 > > > > > > > > > | container > > > > > > > > > | chmap-fixed=FL,FR > > > > > > > > > > > > > > > > > > It can auto switch 'Headphone Playback Switch'/'Headphone > > > > > > > > > Playback Volume' and 'Speaker Playback Switch'/'Speaker > > > > > > > > > Playback Volume', when I plugin the headset or not, but I > > > > > > > > > have not found the related logic, could you > > > > > > > > please help clarify a bit? > > > > > > > > > > > > > > > > Isn't it "Auto-Mute Mode"? If it's set, the speaker is > > > > > > > > muted automatically when the headphone/headset jack is > > > > > > > > plugged by the kernel > > > > > > driver itself. > > > > > > > > > > > > > > What strange is 'Auto-Mute Mode' would be disabled after > > > > > > > headset > > > > > > plugin/out several times, don' t know the reason.... > > > > > > > > > > > > "Auto-Mute Mode" is a software switch, and it means some program > > > > > > must have turned it off explicitly. e.g. the sound server like > > > > > > pulseaudio or pipewire disables it. > > > > > > > > > > > > > However, it seems that speaker and headphone/headset still can > > > > > > > auto > > > > > > switch. Please see below mixer status. > > > > > > > > > > > > Usually pulseaudio/pipewire takes over and does the switching. > > > > > > > > > > OK, I see, I will dig into it, could you please tell me is there > > > > > any other software > > > > switches in the mixers? > > > > > > > > Any mixer program can change... But basically the auto-mute is a > > > > task of the sound daemon. > > > > > > I disable both pulseaudio and pipewire from the Debian, and enable the > > auto-mute, when the headset plugin but the switch not set correctly. > > > 'Headphone Playback Switch'/'Headphone Playback Volume' not set, but > > 'Speaker Playback Switch'/'Speaker Playback Volume' enabled. > > > Are there any other possible reasons? > > > > The auto-mute doesn't change the mixer state. It switches internally, either by > > adjusting the pin control or the amp. > > OK, is that means all mixers setting should done by users based on Jack status? The mixer settings are exposed to user-space and user-space programs can read or change them, sure. But it's not clear what is your exact purpose or goal, so I can't answer much better than that. The auto-mute feature is implemented in the kernel driver level, so that the automatic muting via jack plug can work without the sound daemon. The auto-muted state isn't exposed to user-space via ALSA control API (mixer elements), and it looks as if it were muted by the hardware. Actually there are hardware that do the auto-muting in the hardware level, too. Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-01 11:42 ` Takashi Iwai @ 2025-07-02 1:59 ` Joakim Zhang 2025-07-02 14:27 ` Takashi Iwai 0 siblings, 1 reply; 34+ messages in thread From: Joakim Zhang @ 2025-07-02 1:59 UTC (permalink / raw) To: Takashi Iwai Cc: Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen Hello, > > > -----Original Message----- > > > From: Takashi Iwai <tiwai@suse.de> > > > Sent: Tuesday, July 1, 2025 5:15 PM > > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > > > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect > > > failed on > > > alc256 > > > > > > EXTERNAL EMAIL > > > > > > CAUTION: Suspicious Email from unusual domain. > > > > > > On Tue, 01 Jul 2025 10:40:51 +0200, > > > Joakim Zhang wrote: > > > > > > > > > > > > Hello, > > > > > > > > > > > -----Original Message----- > > > > > > > From: Takashi Iwai <tiwai@suse.de> > > > > > > > Sent: Tuesday, July 1, 2025 2:43 PM > > > > > > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > > > > > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang > > > > > > > <kailang@realtek.com>; perex@perex.cz; tiwai@suse.com; > > > > > > > linux-sound@vger.kernel.org; chris.chiu@canonical.com; > > > > > > > Geans_chen <geans_chen@realsil.com.cn> > > > > > > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack > > > > > > > detect failed on > > > > > > > alc256 > > > > > > > > > > > > > > EXTERNAL EMAIL > > > > > > > > > > > > > > CAUTION: Suspicious Email from unusual domain. > > > > > > > > > > > > > > On Tue, 01 Jul 2025 08:35:05 +0200, Joakim Zhang wrote: > > > > > > > > > > > > > > > > > > > > > > > > Hello Takashi, > > > > > > > > > > > > > > > > Thanks a lot for your help. > > > > > > > > > > > > > > > > > > Hello Kailang, > > > > > > > > > > > > > > > > > > > > I'd like to insert another question through this. That > > > > > > > > > > would be appreciated if > > > > > > > > > you could have a look. > > > > > > > > > > > > > > > > > > > > After system boot, we can see the default mixer status as > below: > > > > > > > > > > > > > > > > > > > > root@cix-localhost:~# amixer -c 0 contents > > > > > > > > > > numid=14,iface=CARD,name='Headphone Jack' > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > : values=on > > > > > > > > > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > : values=on > > > > > > > > > > numid=13,iface=CARD,name='Mic Jack' > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > : values=on > > > > > > > > > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > : values=on > > > > > > > > > > numid=11,iface=MIXER,name='Master Playback Switch' > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=1 > > > > > > > > > > : values=on > > > > > > > > > > numid=10,iface=MIXER,name='Master Playback Volume' > > > > > > > > > > ; type=INTEGER,access=rw---R-- > ,values=1,min=0,max=87,step=0 > > > > > > > > > > : values=60 > > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > > : values=on,on > > > > > > > > > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > > > > > > > > > ; type=INTEGER,access=rw---R-- > ,values=2,min=0,max=87,step=0 > > > > > > > > > > : values=87,87 > > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > > numid=9,iface=MIXER,name='Mic Boost Volume' > > > > > > > > > > ; type=INTEGER,access=rw---R-- > ,values=2,min=0,max=3,step=0 > > > > > > > > > > : values=0,0 > > > > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > > > > numid=7,iface=MIXER,name='Capture Switch' > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > > : values=on,on > > > > > > > > > > numid=6,iface=MIXER,name='Capture Volume' > > > > > > > > > > ; type=INTEGER,access=rw---R-- > ,values=2,min=0,max=63,step=0 > > > > > > > > > > : values=39,39 > > > > > > > > > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > > > > > > > > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > > > > > > > > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > > > > > > > > > ; Item #0 'Disabled' > > > > > > > > > > ; Item #1 'Enabled' > > > > > > > > > > : values=1 > > > > > > > > > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > > > > > > > > > ; type=INTEGER,access=rw---R-- > ,values=2,min=0,max=3,step=0 > > > > > > > > > > : values=0,0 > > > > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > > > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > > : values=off,off > > > > > > > > > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > > > > > > > > > ; type=INTEGER,access=rw---R-- > ,values=2,min=0,max=87,step=0 > > > > > > > > > > : values=0,0 > > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > > numid=17,iface=PCM,name='Capture Channel Map' > > > > > > > > > > ; type=INTEGER,access=r----R-- > ,values=2,min=0,max=36,step=0 > > > > > > > > > > : values=0,0 > > > > > > > > > > | container > > > > > > > > > > | chmap-fixed=FL,FR > > > > > > > > > > numid=16,iface=PCM,name='Playback Channel Map' > > > > > > > > > > ; type=INTEGER,access=r----R-- > ,values=2,min=0,max=36,step=0 > > > > > > > > > > : values=0,0 > > > > > > > > > > | container > > > > > > > > > > | chmap-fixed=FL,FR > > > > > > > > > > > > > > > > > > > > It can auto switch 'Headphone Playback > > > > > > > > > > Switch'/'Headphone Playback Volume' and 'Speaker > > > > > > > > > > Playback Switch'/'Speaker Playback Volume', when I > > > > > > > > > > plugin the headset or not, but I have not found the > > > > > > > > > > related logic, could you > > > > > > > > > please help clarify a bit? > > > > > > > > > > > > > > > > > > Isn't it "Auto-Mute Mode"? If it's set, the speaker is > > > > > > > > > muted automatically when the headphone/headset jack is > > > > > > > > > plugged by the kernel > > > > > > > driver itself. > > > > > > > > > > > > > > > > What strange is 'Auto-Mute Mode' would be disabled after > > > > > > > > headset > > > > > > > plugin/out several times, don' t know the reason.... > > > > > > > > > > > > > > "Auto-Mute Mode" is a software switch, and it means some > > > > > > > program must have turned it off explicitly. e.g. the sound > > > > > > > server like pulseaudio or pipewire disables it. > > > > > > > > > > > > > > > However, it seems that speaker and headphone/headset still > > > > > > > > can auto > > > > > > > switch. Please see below mixer status. > > > > > > > > > > > > > > Usually pulseaudio/pipewire takes over and does the switching. > > > > > > > > > > > > OK, I see, I will dig into it, could you please tell me is > > > > > > there any other software > > > > > switches in the mixers? > > > > > > > > > > Any mixer program can change... But basically the auto-mute is > > > > > a task of the sound daemon. > > > > > > > > I disable both pulseaudio and pipewire from the Debian, and enable > > > > the > > > auto-mute, when the headset plugin but the switch not set correctly. > > > > 'Headphone Playback Switch'/'Headphone Playback Volume' not set, > > > > but > > > 'Speaker Playback Switch'/'Speaker Playback Volume' enabled. > > > > Are there any other possible reasons? > > > > > > The auto-mute doesn't change the mixer state. It switches > > > internally, either by adjusting the pin control or the amp. > > > > OK, is that means all mixers setting should done by users based on Jack > status? > > The mixer settings are exposed to user-space and user-space programs can > read or change them, sure. But it's not clear what is your exact purpose or > goal, so I can't answer much better than that. > > The auto-mute feature is implemented in the kernel driver level, so that the > automatic muting via jack plug can work without the sound daemon. The > auto-muted state isn't exposed to user-space via ALSA control API (mixer > elements), and it looks as if it were muted by the hardware. Actually there are > hardware that do the auto-muting in the hardware level, too. Takashi, thanks for your details, I think what I want to know is what did in the kernel driver level for hp automute and mic autoswitch. I am looking the code, it seems only update the pins and not update the mixer, right? So when the headset plugin, it will auto mute hp and auto switch to mic at the hardware level, users still need to update the mixer manually. Further, is there any place in the hda codec driver level to update the mixers? AFAIK, for the ASoC driver, codec driver level would update some mixers dynamically based on the routing. Thanks, Joakim ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-02 1:59 ` Joakim Zhang @ 2025-07-02 14:27 ` Takashi Iwai 2025-07-03 1:39 ` Joakim Zhang 0 siblings, 1 reply; 34+ messages in thread From: Takashi Iwai @ 2025-07-02 14:27 UTC (permalink / raw) To: Joakim Zhang Cc: Takashi Iwai, Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen On Wed, 02 Jul 2025 03:59:54 +0200, Joakim Zhang wrote: > > > Hello, > > > > > -----Original Message----- > > > > From: Takashi Iwai <tiwai@suse.de> > > > > Sent: Tuesday, July 1, 2025 5:15 PM > > > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > > > > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > > > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect > > > > failed on > > > > alc256 > > > > > > > > EXTERNAL EMAIL > > > > > > > > CAUTION: Suspicious Email from unusual domain. > > > > > > > > On Tue, 01 Jul 2025 10:40:51 +0200, > > > > Joakim Zhang wrote: > > > > > > > > > > > > > > > Hello, > > > > > > > > > > > > > -----Original Message----- > > > > > > > > From: Takashi Iwai <tiwai@suse.de> > > > > > > > > Sent: Tuesday, July 1, 2025 2:43 PM > > > > > > > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > > > > > > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang > > > > > > > > <kailang@realtek.com>; perex@perex.cz; tiwai@suse.com; > > > > > > > > linux-sound@vger.kernel.org; chris.chiu@canonical.com; > > > > > > > > Geans_chen <geans_chen@realsil.com.cn> > > > > > > > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack > > > > > > > > detect failed on > > > > > > > > alc256 > > > > > > > > > > > > > > > > EXTERNAL EMAIL > > > > > > > > > > > > > > > > CAUTION: Suspicious Email from unusual domain. > > > > > > > > > > > > > > > > On Tue, 01 Jul 2025 08:35:05 +0200, Joakim Zhang wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > Hello Takashi, > > > > > > > > > > > > > > > > > > Thanks a lot for your help. > > > > > > > > > > > > > > > > > > > > Hello Kailang, > > > > > > > > > > > > > > > > > > > > > > I'd like to insert another question through this. That > > > > > > > > > > > would be appreciated if > > > > > > > > > > you could have a look. > > > > > > > > > > > > > > > > > > > > > > After system boot, we can see the default mixer status as > > below: > > > > > > > > > > > > > > > > > > > > > > root@cix-localhost:~# amixer -c 0 contents > > > > > > > > > > > numid=14,iface=CARD,name='Headphone Jack' > > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > > : values=on > > > > > > > > > > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > > : values=on > > > > > > > > > > > numid=13,iface=CARD,name='Mic Jack' > > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > > : values=on > > > > > > > > > > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > > : values=on > > > > > > > > > > > numid=11,iface=MIXER,name='Master Playback Switch' > > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=1 > > > > > > > > > > > : values=on > > > > > > > > > > > numid=10,iface=MIXER,name='Master Playback Volume' > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > ,values=1,min=0,max=87,step=0 > > > > > > > > > > > : values=60 > > > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > > > : values=on,on > > > > > > > > > > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > ,values=2,min=0,max=87,step=0 > > > > > > > > > > > : values=87,87 > > > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > > > numid=9,iface=MIXER,name='Mic Boost Volume' > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > ,values=2,min=0,max=3,step=0 > > > > > > > > > > > : values=0,0 > > > > > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > > > > > numid=7,iface=MIXER,name='Capture Switch' > > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > > > : values=on,on > > > > > > > > > > > numid=6,iface=MIXER,name='Capture Volume' > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > ,values=2,min=0,max=63,step=0 > > > > > > > > > > > : values=39,39 > > > > > > > > > > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > > > > > > > > > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > > > > > > > > > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > > > > > > > > > > ; Item #0 'Disabled' > > > > > > > > > > > ; Item #1 'Enabled' > > > > > > > > > > > : values=1 > > > > > > > > > > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > ,values=2,min=0,max=3,step=0 > > > > > > > > > > > : values=0,0 > > > > > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > > > > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > > > : values=off,off > > > > > > > > > > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > ,values=2,min=0,max=87,step=0 > > > > > > > > > > > : values=0,0 > > > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > > > numid=17,iface=PCM,name='Capture Channel Map' > > > > > > > > > > > ; type=INTEGER,access=r----R-- > > ,values=2,min=0,max=36,step=0 > > > > > > > > > > > : values=0,0 > > > > > > > > > > > | container > > > > > > > > > > > | chmap-fixed=FL,FR > > > > > > > > > > > numid=16,iface=PCM,name='Playback Channel Map' > > > > > > > > > > > ; type=INTEGER,access=r----R-- > > ,values=2,min=0,max=36,step=0 > > > > > > > > > > > : values=0,0 > > > > > > > > > > > | container > > > > > > > > > > > | chmap-fixed=FL,FR > > > > > > > > > > > > > > > > > > > > > > It can auto switch 'Headphone Playback > > > > > > > > > > > Switch'/'Headphone Playback Volume' and 'Speaker > > > > > > > > > > > Playback Switch'/'Speaker Playback Volume', when I > > > > > > > > > > > plugin the headset or not, but I have not found the > > > > > > > > > > > related logic, could you > > > > > > > > > > please help clarify a bit? > > > > > > > > > > > > > > > > > > > > Isn't it "Auto-Mute Mode"? If it's set, the speaker is > > > > > > > > > > muted automatically when the headphone/headset jack is > > > > > > > > > > plugged by the kernel > > > > > > > > driver itself. > > > > > > > > > > > > > > > > > > What strange is 'Auto-Mute Mode' would be disabled after > > > > > > > > > headset > > > > > > > > plugin/out several times, don' t know the reason.... > > > > > > > > > > > > > > > > "Auto-Mute Mode" is a software switch, and it means some > > > > > > > > program must have turned it off explicitly. e.g. the sound > > > > > > > > server like pulseaudio or pipewire disables it. > > > > > > > > > > > > > > > > > However, it seems that speaker and headphone/headset still > > > > > > > > > can auto > > > > > > > > switch. Please see below mixer status. > > > > > > > > > > > > > > > > Usually pulseaudio/pipewire takes over and does the switching. > > > > > > > > > > > > > > OK, I see, I will dig into it, could you please tell me is > > > > > > > there any other software > > > > > > switches in the mixers? > > > > > > > > > > > > Any mixer program can change... But basically the auto-mute is > > > > > > a task of the sound daemon. > > > > > > > > > > I disable both pulseaudio and pipewire from the Debian, and enable > > > > > the > > > > auto-mute, when the headset plugin but the switch not set correctly. > > > > > 'Headphone Playback Switch'/'Headphone Playback Volume' not set, > > > > > but > > > > 'Speaker Playback Switch'/'Speaker Playback Volume' enabled. > > > > > Are there any other possible reasons? > > > > > > > > The auto-mute doesn't change the mixer state. It switches > > > > internally, either by adjusting the pin control or the amp. > > > > > > OK, is that means all mixers setting should done by users based on Jack > > status? > > > > The mixer settings are exposed to user-space and user-space programs can > > read or change them, sure. But it's not clear what is your exact purpose or > > goal, so I can't answer much better than that. > > > > The auto-mute feature is implemented in the kernel driver level, so that the > > automatic muting via jack plug can work without the sound daemon. The > > auto-muted state isn't exposed to user-space via ALSA control API (mixer > > elements), and it looks as if it were muted by the hardware. Actually there are > > hardware that do the auto-muting in the hardware level, too. > > Takashi, thanks for your details, I think what I want to know is what did in the kernel driver level for hp automute and mic autoswitch. > > I am looking the code, it seems only update the pins and not update the mixer, right? So when the headset plugin, it will auto mute hp and auto switch to mic at the hardware level, users still need to update the mixer manually. Users don't need to update the mixer -- that's the whole point of the driver auto-mute stuff. When plugged, the speaker gets muted, and the output is routed to the headphone jack with the formerly set headphone volume and switch. Even if you change the speaker volume/switch, it has no effect as long as the jack is plugged. When unplugged, the headphone volume/switch can change but without any effect, too. > Further, is there any place in the hda codec driver level to update the mixers? AFAIK, for the ASoC driver, codec driver level would update some mixers dynamically based on the routing. The codec driver creates the mixer elements and handle them, yes. Also, the virtual-master control influences on the volume of each assigned output, too. Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
* RE: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 2025-07-02 14:27 ` Takashi Iwai @ 2025-07-03 1:39 ` Joakim Zhang 0 siblings, 0 replies; 34+ messages in thread From: Joakim Zhang @ 2025-07-03 1:39 UTC (permalink / raw) To: Takashi Iwai Cc: Kailang, perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, chris.chiu@canonical.com, Geans_chen Hello, > On Wed, 02 Jul 2025 03:59:54 +0200, > Joakim Zhang wrote: > > > > > > Hello, > > > > > > > -----Original Message----- > > > > > From: Takashi Iwai <tiwai@suse.de> > > > > > Sent: Tuesday, July 1, 2025 5:15 PM > > > > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > > > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang <kailang@realtek.com>; > > > > > perex@perex.cz; tiwai@suse.com; linux-sound@vger.kernel.org; > > > > > chris.chiu@canonical.com; Geans_chen <geans_chen@realsil.com.cn> > > > > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack > > > > > detect failed on > > > > > alc256 > > > > > > > > > > EXTERNAL EMAIL > > > > > > > > > > CAUTION: Suspicious Email from unusual domain. > > > > > > > > > > On Tue, 01 Jul 2025 10:40:51 +0200, Joakim Zhang wrote: > > > > > > > > > > > > > > > > > > Hello, > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > From: Takashi Iwai <tiwai@suse.de> > > > > > > > > > Sent: Tuesday, July 1, 2025 2:43 PM > > > > > > > > > To: Joakim Zhang <joakim.zhang@cixtech.com> > > > > > > > > > Cc: Takashi Iwai <tiwai@suse.de>; Kailang > > > > > > > > > <kailang@realtek.com>; perex@perex.cz; tiwai@suse.com; > > > > > > > > > linux-sound@vger.kernel.org; chris.chiu@canonical.com; > > > > > > > > > Geans_chen <geans_chen@realsil.com.cn> > > > > > > > > > Subject: Re: [PATCH V1 4/4] ALSA: hda/realtek: fix mic > > > > > > > > > jack detect failed on > > > > > > > > > alc256 > > > > > > > > > > > > > > > > > > EXTERNAL EMAIL > > > > > > > > > > > > > > > > > > CAUTION: Suspicious Email from unusual domain. > > > > > > > > > > > > > > > > > > On Tue, 01 Jul 2025 08:35:05 +0200, Joakim Zhang wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hello Takashi, > > > > > > > > > > > > > > > > > > > > Thanks a lot for your help. > > > > > > > > > > > > > > > > > > > > > > Hello Kailang, > > > > > > > > > > > > > > > > > > > > > > > > I'd like to insert another question through this. > > > > > > > > > > > > That would be appreciated if > > > > > > > > > > > you could have a look. > > > > > > > > > > > > > > > > > > > > > > > > After system boot, we can see the default mixer > > > > > > > > > > > > status as > > > below: > > > > > > > > > > > > > > > > > > > > > > > > root@cix-localhost:~# amixer -c 0 contents > > > > > > > > > > > > numid=14,iface=CARD,name='Headphone Jack' > > > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > > > : values=on > > > > > > > > > > > > numid=12,iface=CARD,name='Internal Mic Phantom Jack' > > > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > > > : values=on > > > > > > > > > > > > numid=13,iface=CARD,name='Mic Jack' > > > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > > > : values=on > > > > > > > > > > > > numid=15,iface=CARD,name='Speaker Phantom Jack' > > > > > > > > > > > > ; type=BOOLEAN,access=r-------,values=1 > > > > > > > > > > > > : values=on > > > > > > > > > > > > numid=11,iface=MIXER,name='Master Playback Switch' > > > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=1 > > > > > > > > > > > > : values=on > > > > > > > > > > > > numid=10,iface=MIXER,name='Master Playback Volume' > > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > > ,values=1,min=0,max=87,step=0 > > > > > > > > > > > > : values=60 > > > > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > > > > numid=2,iface=MIXER,name='Headphone Playback Switch' > > > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > > > > : values=on,on > > > > > > > > > > > > numid=1,iface=MIXER,name='Headphone Playback Volume' > > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > > ,values=2,min=0,max=87,step=0 > > > > > > > > > > > > : values=87,87 > > > > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > > > > numid=9,iface=MIXER,name='Mic Boost Volume' > > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > > ,values=2,min=0,max=3,step=0 > > > > > > > > > > > > : values=0,0 > > > > > > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > > > > > > numid=7,iface=MIXER,name='Capture Switch' > > > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > > > > : values=on,on > > > > > > > > > > > > numid=6,iface=MIXER,name='Capture Volume' > > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > > ,values=2,min=0,max=63,step=0 > > > > > > > > > > > > : values=39,39 > > > > > > > > > > > > | dBscale-min=-17.25dB,step=0.75dB,mute=0 > > > > > > > > > > > > numid=5,iface=MIXER,name='Auto-Mute Mode' > > > > > > > > > > > > ; type=ENUMERATED,access=rw------,values=1,items=2 > > > > > > > > > > > > ; Item #0 'Disabled' > > > > > > > > > > > > ; Item #1 'Enabled' > > > > > > > > > > > > : values=1 > > > > > > > > > > > > numid=8,iface=MIXER,name='Internal Mic Boost Volume' > > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > > ,values=2,min=0,max=3,step=0 > > > > > > > > > > > > : values=0,0 > > > > > > > > > > > > | dBscale-min=0.00dB,step=10.00dB,mute=0 > > > > > > > > > > > > numid=4,iface=MIXER,name='Speaker Playback Switch' > > > > > > > > > > > > ; type=BOOLEAN,access=rw------,values=2 > > > > > > > > > > > > : values=off,off > > > > > > > > > > > > numid=3,iface=MIXER,name='Speaker Playback Volume' > > > > > > > > > > > > ; type=INTEGER,access=rw---R-- > > > ,values=2,min=0,max=87,step=0 > > > > > > > > > > > > : values=0,0 > > > > > > > > > > > > | dBscale-min=-65.25dB,step=0.75dB,mute=0 > > > > > > > > > > > > numid=17,iface=PCM,name='Capture Channel Map' > > > > > > > > > > > > ; type=INTEGER,access=r----R-- > > > ,values=2,min=0,max=36,step=0 > > > > > > > > > > > > : values=0,0 > > > > > > > > > > > > | container > > > > > > > > > > > > | chmap-fixed=FL,FR > > > > > > > > > > > > numid=16,iface=PCM,name='Playback Channel Map' > > > > > > > > > > > > ; type=INTEGER,access=r----R-- > > > ,values=2,min=0,max=36,step=0 > > > > > > > > > > > > : values=0,0 > > > > > > > > > > > > | container > > > > > > > > > > > > | chmap-fixed=FL,FR > > > > > > > > > > > > > > > > > > > > > > > > It can auto switch 'Headphone Playback > > > > > > > > > > > > Switch'/'Headphone Playback Volume' and 'Speaker > > > > > > > > > > > > Playback Switch'/'Speaker Playback Volume', when I > > > > > > > > > > > > plugin the headset or not, but I have not found > > > > > > > > > > > > the related logic, could you > > > > > > > > > > > please help clarify a bit? > > > > > > > > > > > > > > > > > > > > > > Isn't it "Auto-Mute Mode"? If it's set, the speaker > > > > > > > > > > > is muted automatically when the headphone/headset > > > > > > > > > > > jack is plugged by the kernel > > > > > > > > > driver itself. > > > > > > > > > > > > > > > > > > > > What strange is 'Auto-Mute Mode' would be disabled > > > > > > > > > > after headset > > > > > > > > > plugin/out several times, don' t know the reason.... > > > > > > > > > > > > > > > > > > "Auto-Mute Mode" is a software switch, and it means some > > > > > > > > > program must have turned it off explicitly. e.g. the > > > > > > > > > sound server like pulseaudio or pipewire disables it. > > > > > > > > > > > > > > > > > > > However, it seems that speaker and headphone/headset > > > > > > > > > > still can auto > > > > > > > > > switch. Please see below mixer status. > > > > > > > > > > > > > > > > > > Usually pulseaudio/pipewire takes over and does the switching. > > > > > > > > > > > > > > > > OK, I see, I will dig into it, could you please tell me is > > > > > > > > there any other software > > > > > > > switches in the mixers? > > > > > > > > > > > > > > Any mixer program can change... But basically the auto-mute > > > > > > > is a task of the sound daemon. > > > > > > > > > > > > I disable both pulseaudio and pipewire from the Debian, and > > > > > > enable the > > > > > auto-mute, when the headset plugin but the switch not set correctly. > > > > > > 'Headphone Playback Switch'/'Headphone Playback Volume' not > > > > > > set, but > > > > > 'Speaker Playback Switch'/'Speaker Playback Volume' enabled. > > > > > > Are there any other possible reasons? > > > > > > > > > > The auto-mute doesn't change the mixer state. It switches > > > > > internally, either by adjusting the pin control or the amp. > > > > > > > > OK, is that means all mixers setting should done by users based on > > > > Jack > > > status? > > > > > > The mixer settings are exposed to user-space and user-space programs > > > can read or change them, sure. But it's not clear what is your > > > exact purpose or goal, so I can't answer much better than that. > > > > > > The auto-mute feature is implemented in the kernel driver level, so > > > that the automatic muting via jack plug can work without the sound > > > daemon. The auto-muted state isn't exposed to user-space via ALSA > > > control API (mixer elements), and it looks as if it were muted by > > > the hardware. Actually there are hardware that do the auto-muting in the > hardware level, too. > > > > Takashi, thanks for your details, I think what I want to know is what did in > the kernel driver level for hp automute and mic autoswitch. > > > > I am looking the code, it seems only update the pins and not update the > mixer, right? So when the headset plugin, it will auto mute hp and auto switch > to mic at the hardware level, users still need to update the mixer manually. > > Users don't need to update the mixer -- that's the whole point of the driver > auto-mute stuff. When plugged, the speaker gets muted, and the output is > routed to the headphone jack with the formerly set headphone volume and > switch. Even if you change the speaker volume/switch, it has no effect as long > as the jack is plugged. When unplugged, the headphone volume/switch can > change but without any effect, too. I have fully understood the auto-mute feature, one point you pointed out is very crucial, " When plugged, the speaker gets muted, and the output is routed to the headphone jack with the **formerly** set headphone volume and switch." So, the volume and switch of the both headphone and switch should be **formerly** set by user via ALSA API when auto-mute enabled, I tested and work normally. The problem that is bothering me now is, I cannot find which thread try to control the mixers(switch/volume of headphone/speaker, auto-mute mode etc) via ALSA API, running with debian os. ^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH V1 0/4] ALSA: hda: jack detect fixes 2025-06-19 2:08 [PATCH V1 0/4] ALSA: hda: jack detect fixes joakim.zhang ` (3 preceding siblings ...) 2025-06-19 2:08 ` [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 joakim.zhang @ 2025-06-20 11:51 ` Takashi Iwai 4 siblings, 0 replies; 34+ messages in thread From: Takashi Iwai @ 2025-06-20 11:51 UTC (permalink / raw) To: joakim.zhang Cc: perex, tiwai, linux-sound, chris.chiu, kailang, geans_chen, cix-kernel-upstream On Thu, 19 Jun 2025 04:08:40 +0200, joakim.zhang@cixtech.com wrote: > > From: Joakim Zhang <joakim.zhang@cixtech.com> > > - fixes for hda jack detection with polling mode > > Joakim Zhang (4): > ALSA: hda: fix controller cannot suspend when codec using jackpoll > ALSA: hda: add no_pin_sense_update flag for jack detection > ALSA: hda: disable jackpoll_in_suspend when system shutdown > ALSA: hda/realtek: fix mic jack detect failed on alc256 Thanks for the patches. Indeed the polling mode has been little cared for now. I'll comment / suggest in each patch reply. Takashi ^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2025-07-03 1:39 UTC | newest] Thread overview: 34+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-06-19 2:08 [PATCH V1 0/4] ALSA: hda: jack detect fixes joakim.zhang 2025-06-19 2:08 ` [PATCH V1 1/4] ALSA: hda: fix controller cannot suspend when codec using jackpoll joakim.zhang 2025-06-20 12:00 ` Takashi Iwai 2025-06-21 6:12 ` 回复: " Joakim Zhang 2025-06-19 2:08 ` [PATCH V1 2/4] ALSA: hda: add no_pin_sense_update flag for jack detection joakim.zhang 2025-06-20 12:11 ` Takashi Iwai 2025-06-21 6:14 ` 回复: " Joakim Zhang 2025-06-23 10:39 ` Joakim Zhang 2025-06-23 13:11 ` Takashi Iwai 2025-06-19 2:08 ` [PATCH V1 3/4] ALSA: hda: disable jackpoll_in_suspend when system shutdown joakim.zhang 2025-06-20 12:12 ` Takashi Iwai 2025-06-19 2:08 ` [PATCH V1 4/4] ALSA: hda/realtek: fix mic jack detect failed on alc256 joakim.zhang 2025-06-20 12:13 ` Takashi Iwai 2025-06-24 2:31 ` Kailang 2025-06-24 3:32 ` Joakim Zhang 2025-06-24 6:17 ` Kailang 2025-06-25 1:32 ` Joakim Zhang 2025-06-25 3:05 ` Kailang 2025-06-26 3:44 ` Joakim Zhang 2025-06-26 5:51 ` Kailang 2025-07-01 3:28 ` Joakim Zhang 2025-07-01 5:51 ` Takashi Iwai 2025-07-01 6:35 ` Joakim Zhang 2025-07-01 6:42 ` Takashi Iwai 2025-07-01 6:48 ` Joakim Zhang 2025-07-01 6:50 ` Takashi Iwai 2025-07-01 8:40 ` Joakim Zhang 2025-07-01 9:14 ` Takashi Iwai 2025-07-01 10:27 ` Joakim Zhang 2025-07-01 11:42 ` Takashi Iwai 2025-07-02 1:59 ` Joakim Zhang 2025-07-02 14:27 ` Takashi Iwai 2025-07-03 1:39 ` Joakim Zhang 2025-06-20 11:51 ` [PATCH V1 0/4] ALSA: hda: jack detect fixes Takashi Iwai
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox