diff -up ./include/sound/ac97_codec.h.ad1980 ./include/sound/ac97_codec.h --- ./include/sound/ac97_codec.h.ad1980 2026-02-01 08:09:53.000000000 +0900 +++ ./include/sound/ac97_codec.h 2026-05-28 20:12:24.696696239 +0900 @@ -267,6 +267,7 @@ struct snd_ac97 { unsigned short codec_cfg[3]; // CODEC_CFG bits unsigned char swap_mic_linein; // AD1986/AD1986A only unsigned char lo_as_master; /* LO as master */ + unsigned char dont_set_losel; // do not set AC97_AD198X_LOSEL bit (surround) for LINE_OUT/HP_OUT */ } ad18xx; unsigned int dev_flags; /* device specific */ } spec; diff -up ./sound/pci/ac97/ac97_patch.c.ad1980 ./sound/pci/ac97/ac97_patch.c --- ./sound/pci/ac97/ac97_patch.c.ad1980 2026-02-01 08:09:53.000000000 +0900 +++ ./sound/pci/ac97/ac97_patch.c 2026-05-28 20:12:24.712696266 +0900 @@ -1935,7 +1935,7 @@ static int snd_ac97_ad1888_lohpsel_get(s unsigned short val; val = ac97->regs[AC97_AD_MISC]; - ucontrol->value.integer.value[0] = !(val & AC97_AD198X_LOSEL); + ucontrol->value.integer.value[0] = !(val & (ac97->spec.ad18xx.dont_set_losel ? AC97_AD198X_HPSEL : AC97_AD198X_LOSEL)); if (ac97->spec.ad18xx.lo_as_master) ucontrol->value.integer.value[0] = !ucontrol->value.integer.value[0]; @@ -1950,7 +1950,7 @@ static int snd_ac97_ad1888_lohpsel_put(s val = !ucontrol->value.integer.value[0]; if (ac97->spec.ad18xx.lo_as_master) val = !val; - val = val ? (AC97_AD198X_LOSEL | AC97_AD198X_HPSEL) : 0; + val = val ? ((ac97->spec.ad18xx.dont_set_losel ? 0 : AC97_AD198X_LOSEL) | AC97_AD198X_HPSEL) : 0; return snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD198X_LOSEL | AC97_AD198X_HPSEL, val); } @@ -2065,17 +2065,33 @@ static int patch_ad1888(struct snd_ac97 if (ac97->subsystem_vendor == 0x1043 && ac97->subsystem_device == 0x1193) /* ASUS A9T laptop */ ac97->spec.ad18xx.lo_as_master = 1; + /* + * C601 does not have surround out jacks. + * It wires SURR_OUT/HP_OUT pins to internal speaker, and + * LINE_OUT pins to line-out AND headphone jacks. + * Setting AC97_AD198X_LOSEL bit will select LINE_OUT to + * surround out, which results in "no sound". + * cf. https://bz-attachments.freebsd.org/attachment.cgi?id=101182 + */ + if (ac97->subsystem_vendor == 0x10cf && + ac97->subsystem_device == 0x122f) /* Fujitsu/Siemens C601 */ + ac97->spec.ad18xx.dont_set_losel = 1; misc = snd_ac97_read(ac97, AC97_AD_MISC); /* AD-compatible mode */ /* Stereo mutes enabled */ misc |= AC97_AD198X_MSPLT | AC97_AD198X_AC97NC; - if (!ac97->spec.ad18xx.lo_as_master) + if (!ac97->spec.ad18xx.lo_as_master) { + misc |= AC97_AD198X_HPSEL; /* Switch FRONT/SURROUND LINE-OUT/HP-OUT default connection */ /* it seems that most vendors connect line-out connector to * headphone out of AC'97 */ - misc |= AC97_AD198X_LOSEL | AC97_AD198X_HPSEL; + if (!ac97->spec.ad18xx.dont_set_losel) + misc |= AC97_AD198X_LOSEL; + else + misc &= ~AC97_AD198X_LOSEL; + } snd_ac97_write_cache(ac97, AC97_AD_MISC, misc); ac97->flags |= AC97_STEREO_MUTES;