Skip to content

Commit fbf9e3b

Browse files
committed
Merge tag 'sound-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "The amount of changes wasn't as small as wished, but all reasonably small fixes. There is a PCM core API change, which is for correcting the behavior change we took in 6.8. The rest are device-specific fixes for ASoC AMD, Qualcomm, Cirrus codecs, HD-audio quirks & co" * tag 'sound-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: amd: yc: Fix non-functional mic on Lenovo 21J2 ASoC: amd: yc: add new YC platform variant (0x63) support ALSA: hda/realtek - ALC285 reduce pop noise from Headphone port ASoC: amd: yc: Add Lenovo ThinkBook 21J0 into DMI quirk table ALSA: hda/realtek: Add special fixup for Lenovo 14IRP8 ASoC: soc-card: Fix missing locking in snd_soc_card_get_kcontrol() ALSA: hda/realtek: tas2781: enable subwoofer volume control ALSA: pcm: clarify and fix default msbits value for all formats ASoC: qcom: Fix uninitialized pointer dmactl ALSA: hda/realtek: fix mute/micmute LED For HP mt440 ALSA: Drop leftover snd-rtctimer stuff from Makefile ALSA: ump: Fix the discard error code from snd_ump_legacy_open() ALSA: hda/realtek: Enable Mute LED on HP 840 G8 (MB 8AB8) ASoC: cs35l56: Must clear HALO_STATE before issuing SYSTEM_RESET ALSA: hda/realtek: Fix top speaker connection on Dell Inspiron 16 Plus 7630 ALSA: firewire-lib: fix to check cycle continuity
2 parents 7187ea0 + 17c6a0c commit fbf9e3b

15 files changed

Lines changed: 96 additions & 14 deletions

File tree

include/sound/soc-card.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ static inline void snd_soc_card_mutex_unlock(struct snd_soc_card *card)
3030

3131
struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card,
3232
const char *name);
33+
struct snd_kcontrol *snd_soc_card_get_kcontrol_locked(struct snd_soc_card *soc_card,
34+
const char *name);
3335
int snd_soc_card_jack_new(struct snd_soc_card *card, const char *id, int type,
3436
struct snd_soc_jack *jack);
3537
int snd_soc_card_jack_new_pins(struct snd_soc_card *card, const char *id,

include/uapi/sound/asound.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct snd_hwdep_dsp_image {
142142
* *
143143
*****************************************************************************/
144144

145-
#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 16)
145+
#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 17)
146146

147147
typedef unsigned long snd_pcm_uframes_t;
148148
typedef signed long snd_pcm_sframes_t;
@@ -416,7 +416,7 @@ struct snd_pcm_hw_params {
416416
unsigned int rmask; /* W: requested masks */
417417
unsigned int cmask; /* R: changed masks */
418418
unsigned int info; /* R: Info flags for returned setup */
419-
unsigned int msbits; /* R: used most significant bits */
419+
unsigned int msbits; /* R: used most significant bits (in sample bit-width) */
420420
unsigned int rate_num; /* R: rate numerator */
421421
unsigned int rate_den; /* R: rate denominator */
422422
snd_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */

sound/core/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ snd-ump-objs := ump.o
3232
snd-ump-$(CONFIG_SND_UMP_LEGACY_RAWMIDI) += ump_convert.o
3333
snd-timer-objs := timer.o
3434
snd-hrtimer-objs := hrtimer.o
35-
snd-rtctimer-objs := rtctimer.o
3635
snd-hwdep-objs := hwdep.o
3736
snd-seq-device-objs := seq_device.o
3837

sound/core/pcm_native.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,11 @@ static int fixup_unreferenced_params(struct snd_pcm_substream *substream,
486486
i = hw_param_interval_c(params, SNDRV_PCM_HW_PARAM_SAMPLE_BITS);
487487
if (snd_interval_single(i))
488488
params->msbits = snd_interval_value(i);
489+
m = hw_param_mask_c(params, SNDRV_PCM_HW_PARAM_FORMAT);
490+
if (snd_mask_single(m)) {
491+
snd_pcm_format_t format = (__force snd_pcm_format_t)snd_mask_min(m);
492+
params->msbits = snd_pcm_format_width(format);
493+
}
489494
}
490495

491496
if (params->msbits) {

sound/core/ump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ static int snd_ump_legacy_open(struct snd_rawmidi_substream *substream)
985985
struct snd_ump_endpoint *ump = substream->rmidi->private_data;
986986
int dir = substream->stream;
987987
int group = ump->legacy_mapping[substream->number];
988-
int err;
988+
int err = 0;
989989

990990
mutex_lock(&ump->open_mutex);
991991
if (ump->legacy_substreams[dir][group]) {
@@ -1009,7 +1009,7 @@ static int snd_ump_legacy_open(struct snd_rawmidi_substream *substream)
10091009
spin_unlock_irq(&ump->legacy_locks[dir]);
10101010
unlock:
10111011
mutex_unlock(&ump->open_mutex);
1012-
return 0;
1012+
return err;
10131013
}
10141014

10151015
static int snd_ump_legacy_close(struct snd_rawmidi_substream *substream)

sound/firewire/amdtp-stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ static int generate_tx_packet_descs(struct amdtp_stream *s, struct pkt_desc *des
951951
// to the reason.
952952
unsigned int safe_cycle = increment_ohci_cycle_count(next_cycle,
953953
IR_JUMBO_PAYLOAD_MAX_SKIP_CYCLES);
954-
lost = (compare_ohci_cycle_count(safe_cycle, cycle) > 0);
954+
lost = (compare_ohci_cycle_count(safe_cycle, cycle) < 0);
955955
}
956956
if (lost) {
957957
dev_err(&s->unit->device, "Detect discontinuity of cycle: %d %d\n",

sound/pci/hda/patch_realtek.c

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3684,6 +3684,7 @@ static void alc285_hp_init(struct hda_codec *codec)
36843684
int i, val;
36853685
int coef38, coef0d, coef36;
36863686

3687+
alc_write_coefex_idx(codec, 0x58, 0x00, 0x1888); /* write default value */
36873688
alc_update_coef_idx(codec, 0x4a, 1<<15, 1<<15); /* Reset HP JD */
36883689
coef38 = alc_read_coef_idx(codec, 0x38); /* Amp control */
36893690
coef0d = alc_read_coef_idx(codec, 0x0d); /* Digital Misc control */
@@ -7444,6 +7445,7 @@ enum {
74447445
ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
74457446
ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
74467447
ALC298_FIXUP_LENOVO_C940_DUET7,
7448+
ALC287_FIXUP_LENOVO_14IRP8_DUETITL,
74477449
ALC287_FIXUP_13S_GEN2_SPEAKERS,
74487450
ALC256_FIXUP_SET_COEF_DEFAULTS,
74497451
ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
@@ -7495,6 +7497,26 @@ static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
74957497
__snd_hda_apply_fixup(codec, id, action, 0);
74967498
}
74977499

7500+
/* A special fixup for Lenovo Slim/Yoga Pro 9 14IRP8 and Yoga DuetITL 2021;
7501+
* 14IRP8 PCI SSID will mistakenly be matched with the DuetITL codec SSID,
7502+
* so we need to apply a different fixup in this case. The only DuetITL codec
7503+
* SSID reported so far is the 17aa:3802 while the 14IRP8 has the 17aa:38be
7504+
* and 17aa:38bf. If it weren't for the PCI SSID, the 14IRP8 models would
7505+
* have matched correctly by their codecs.
7506+
*/
7507+
static void alc287_fixup_lenovo_14irp8_duetitl(struct hda_codec *codec,
7508+
const struct hda_fixup *fix,
7509+
int action)
7510+
{
7511+
int id;
7512+
7513+
if (codec->core.subsystem_id == 0x17aa3802)
7514+
id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* DuetITL */
7515+
else
7516+
id = ALC287_FIXUP_TAS2781_I2C; /* 14IRP8 */
7517+
__snd_hda_apply_fixup(codec, id, action, 0);
7518+
}
7519+
74987520
static const struct hda_fixup alc269_fixups[] = {
74997521
[ALC269_FIXUP_GPIO2] = {
75007522
.type = HDA_FIXUP_FUNC,
@@ -9379,6 +9401,10 @@ static const struct hda_fixup alc269_fixups[] = {
93799401
.type = HDA_FIXUP_FUNC,
93809402
.v.func = alc298_fixup_lenovo_c940_duet7,
93819403
},
9404+
[ALC287_FIXUP_LENOVO_14IRP8_DUETITL] = {
9405+
.type = HDA_FIXUP_FUNC,
9406+
.v.func = alc287_fixup_lenovo_14irp8_duetitl,
9407+
},
93829408
[ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
93839409
.type = HDA_FIXUP_VERBS,
93849410
.v.verbs = (const struct hda_verb[]) {
@@ -9585,7 +9611,7 @@ static const struct hda_fixup alc269_fixups[] = {
95859611
.type = HDA_FIXUP_FUNC,
95869612
.v.func = tas2781_fixup_i2c,
95879613
.chained = true,
9588-
.chain_id = ALC269_FIXUP_THINKPAD_ACPI,
9614+
.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
95899615
},
95909616
[ALC287_FIXUP_YOGA7_14ARB7_I2C] = {
95919617
.type = HDA_FIXUP_FUNC,
@@ -9746,6 +9772,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
97469772
SND_PCI_QUIRK(0x1028, 0x0c1c, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
97479773
SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS),
97489774
SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS),
9775+
SND_PCI_QUIRK(0x1028, 0x0c28, "Dell Inspiron 16 Plus 7630", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
97499776
SND_PCI_QUIRK(0x1028, 0x0c4d, "Dell", ALC287_FIXUP_CS35L41_I2C_4),
97509777
SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
97519778
SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2),
@@ -9902,6 +9929,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
99029929
SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
99039930
SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
99049931
SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
9932+
SND_PCI_QUIRK(0x103c, 0x897d, "HP mt440 Mobile Thin Client U74", ALC236_FIXUP_HP_GPIO_LED),
99059933
SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4),
99069934
SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
99079935
SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2),
@@ -9927,11 +9955,13 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
99279955
SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED),
99289956
SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED),
99299957
SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED),
9958+
SND_PCI_QUIRK(0x103c, 0x8ab9, "HP EliteBook 840 G8 (MB 8AB8)", ALC285_FIXUP_HP_GPIO_LED),
99309959
SND_PCI_QUIRK(0x103c, 0x8abb, "HP ZBook Firefly 14 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
99319960
SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
99329961
SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
99339962
SND_PCI_QUIRK(0x103c, 0x8b0f, "HP Elite mt645 G7 Mobile Thin Client U81", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
99349963
SND_PCI_QUIRK(0x103c, 0x8b2f, "HP 255 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
9964+
SND_PCI_QUIRK(0x103c, 0x8b3f, "HP mt440 Mobile Thin Client U91", ALC236_FIXUP_HP_GPIO_LED),
99359965
SND_PCI_QUIRK(0x103c, 0x8b42, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
99369966
SND_PCI_QUIRK(0x103c, 0x8b43, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
99379967
SND_PCI_QUIRK(0x103c, 0x8b44, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
@@ -10247,7 +10277,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1024710277
SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
1024810278
SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC),
1024910279
SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
10250-
SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
10280+
SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8 / DuetITL 2021", ALC287_FIXUP_LENOVO_14IRP8_DUETITL),
1025110281
SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
1025210282
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
1025310283
SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),

sound/soc/amd/yc/acp6x-mach.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,20 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
199199
DMI_MATCH(DMI_PRODUCT_NAME, "21HY"),
200200
}
201201
},
202+
{
203+
.driver_data = &acp6x_card,
204+
.matches = {
205+
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
206+
DMI_MATCH(DMI_PRODUCT_NAME, "21J2"),
207+
}
208+
},
209+
{
210+
.driver_data = &acp6x_card,
211+
.matches = {
212+
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
213+
DMI_MATCH(DMI_PRODUCT_NAME, "21J0"),
214+
}
215+
},
202216
{
203217
.driver_data = &acp6x_card,
204218
.matches = {

sound/soc/amd/yc/pci-acp6x.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ static int snd_acp6x_probe(struct pci_dev *pci,
162162
/* Yellow Carp device check */
163163
switch (pci->revision) {
164164
case 0x60:
165+
case 0x63:
165166
case 0x6f:
166167
break;
167168
default:

sound/soc/codecs/cs35l45.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static int cs35l45_activate_ctl(struct snd_soc_component *component,
184184
else
185185
snprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, "%s", ctl_name);
186186

187-
kcontrol = snd_soc_card_get_kcontrol(component->card, name);
187+
kcontrol = snd_soc_card_get_kcontrol_locked(component->card, name);
188188
if (!kcontrol) {
189189
dev_err(component->dev, "Can't find kcontrol %s\n", name);
190190
return -EINVAL;

0 commit comments

Comments
 (0)