Skip to content

Commit 5574aaa

Browse files
committed
Merge tag 'sound-fix-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Two regression fixes that had been introduced in this merge window, additional HD-audio quirks, and a further enhancement for the new kunit" * tag 'sound-fix-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: core: add kunitconfig ALSA: hda/realtek: add in quirk for Acer Swift Go 16 - SFG16-71 Revert "ALSA: usb-audio: Name feature ctl using output if input is PCM" ALSA: timer: Fix missing irq-disable at closing ALSA: hda/realtek: Add quirk for Lenovo Yoga 9 14IMH9
2 parents f6cef5f + 585f5bf commit 5574aaa

File tree

4 files changed

+42
-36
lines changed

4 files changed

+42
-36
lines changed

sound/core/.kunitconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONFIG_KUNIT=y
2+
CONFIG_SOUND=y
3+
CONFIG_SND=y
4+
CONFIG_SND_PCM=y
5+
CONFIG_SND_CORE_TEST=y

sound/core/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ static void snd_timer_close_locked(struct snd_timer_instance *timeri,
409409
struct snd_timer *timer = timeri->timer;
410410

411411
if (timer) {
412-
guard(spinlock)(&timer->lock);
412+
guard(spinlock_irq)(&timer->lock);
413413
timeri->flags |= SNDRV_TIMER_IFLG_DEAD;
414414
}
415415

sound/pci/hda/patch_realtek.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6891,6 +6891,13 @@ static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc,
68916891
comp_generic_fixup(cdc, action, "i2c", "INT8866", "-%s:00", 1);
68926892
}
68936893

6894+
static void alc256_fixup_acer_sfg16_micmute_led(struct hda_codec *codec,
6895+
const struct hda_fixup *fix, int action)
6896+
{
6897+
alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
6898+
}
6899+
6900+
68946901
/* for alc295_fixup_hp_top_speakers */
68956902
#include "hp_x360_helper.c"
68966903

@@ -7360,6 +7367,7 @@ enum {
73607367
ALC287_FIXUP_LEGION_16ITHG6,
73617368
ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
73627369
ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN,
7370+
ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN,
73637371
ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS,
73647372
ALC236_FIXUP_DELL_DUAL_CODECS,
73657373
ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
@@ -7373,6 +7381,7 @@ enum {
73737381
ALC289_FIXUP_DELL_CS35L41_SPI_2,
73747382
ALC294_FIXUP_CS35L41_I2C_2,
73757383
ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED,
7384+
ALC256_FIXUP_ACER_SFG16_MICMUTE_LED,
73767385
};
73777386

73787387
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -9490,6 +9499,12 @@ static const struct hda_fixup alc269_fixups[] = {
94909499
.chained = true,
94919500
.chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
94929501
},
9502+
[ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = {
9503+
.type = HDA_FIXUP_FUNC,
9504+
.v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
9505+
.chained = true,
9506+
.chain_id = ALC287_FIXUP_CS35L41_I2C_2,
9507+
},
94939508
[ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = {
94949509
.type = HDA_FIXUP_FUNC,
94959510
.v.func = alc295_fixup_dell_inspiron_top_speakers,
@@ -9562,6 +9577,10 @@ static const struct hda_fixup alc269_fixups[] = {
95629577
.chained = true,
95639578
.chain_id = ALC285_FIXUP_HP_GPIO_LED,
95649579
},
9580+
[ALC256_FIXUP_ACER_SFG16_MICMUTE_LED] = {
9581+
.type = HDA_FIXUP_FUNC,
9582+
.v.func = alc256_fixup_acer_sfg16_micmute_led,
9583+
},
95659584
};
95669585

95679586
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -9605,6 +9624,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
96059624
SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
96069625
SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
96079626
SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
9627+
SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
96089628
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
96099629
SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
96109630
SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
@@ -10270,6 +10290,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1027010290
SND_PCI_QUIRK(0x17aa, 0x38c3, "Y980 DUAL", ALC287_FIXUP_TAS2781_I2C),
1027110291
SND_PCI_QUIRK(0x17aa, 0x38cb, "Y790 YG DUAL", ALC287_FIXUP_TAS2781_I2C),
1027210292
SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", ALC287_FIXUP_TAS2781_I2C),
10293+
SND_PCI_QUIRK(0x17aa, 0x38d2, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
10294+
SND_PCI_QUIRK(0x17aa, 0x38d7, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN),
1027310295
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
1027410296
SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
1027510297
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),

sound/usb/mixer.c

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,34 +1652,6 @@ static const struct usb_feature_control_info *get_feature_control_info(int contr
16521652
return NULL;
16531653
}
16541654

1655-
static int feature_unit_mutevol_ctl_name(struct usb_mixer_interface *mixer,
1656-
struct snd_kcontrol *kctl,
1657-
struct usb_audio_term *iterm,
1658-
struct usb_audio_term *oterm)
1659-
{
1660-
struct usb_audio_term *aterm, *bterm;
1661-
bool output_first;
1662-
int len = 0;
1663-
1664-
/*
1665-
* If the input terminal is USB Streaming, we try getting the name of
1666-
* the output terminal first in hopes of getting something more
1667-
* descriptive than "PCM".
1668-
*/
1669-
output_first = iterm && !(iterm->type >> 16) && (iterm->type & 0xff00) == 0x0100;
1670-
1671-
aterm = output_first ? oterm : iterm;
1672-
bterm = output_first ? iterm : oterm;
1673-
1674-
if (aterm)
1675-
len = get_term_name(mixer->chip, aterm, kctl->id.name,
1676-
sizeof(kctl->id.name), 1);
1677-
if (!len && bterm)
1678-
len = get_term_name(mixer->chip, bterm, kctl->id.name,
1679-
sizeof(kctl->id.name), 1);
1680-
return len;
1681-
}
1682-
16831655
static void __build_feature_ctl(struct usb_mixer_interface *mixer,
16841656
const struct usbmix_name_map *imap,
16851657
unsigned int ctl_mask, int control,
@@ -1761,15 +1733,22 @@ static void __build_feature_ctl(struct usb_mixer_interface *mixer,
17611733
case UAC_FU_MUTE:
17621734
case UAC_FU_VOLUME:
17631735
/*
1764-
* Determine the control name:
1765-
* - If a name id is given in descriptor, use it.
1766-
* - If input and output terminals are present, try to derive
1767-
* the name from either of these.
1768-
* - Otherwise, make up a name using the feature unit ID.
1736+
* determine the control name. the rule is:
1737+
* - if a name id is given in descriptor, use it.
1738+
* - if the connected input can be determined, then use the name
1739+
* of terminal type.
1740+
* - if the connected output can be determined, use it.
1741+
* - otherwise, anonymous name.
17691742
*/
17701743
if (!len) {
1771-
len = feature_unit_mutevol_ctl_name(mixer, kctl, iterm,
1772-
oterm);
1744+
if (iterm)
1745+
len = get_term_name(mixer->chip, iterm,
1746+
kctl->id.name,
1747+
sizeof(kctl->id.name), 1);
1748+
if (!len && oterm)
1749+
len = get_term_name(mixer->chip, oterm,
1750+
kctl->id.name,
1751+
sizeof(kctl->id.name), 1);
17731752
if (!len)
17741753
snprintf(kctl->id.name, sizeof(kctl->id.name),
17751754
"Feature %d", unitid);

0 commit comments

Comments
 (0)