Skip to content

Commit ea32929

Browse files
committed
Merge branch 'for-linus' into for-next
Merge 6.3-devel branch back in order to apply the more Realtek HD-audio changes cleanly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 parents c51e431 + 2ae147d commit ea32929

14 files changed

Lines changed: 97 additions & 24 deletions

File tree

Documentation/sound/hd-audio/models.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ ref
704704
no-jd
705705
BIOS setup but without jack-detection
706706
intel
707-
Intel DG45* mobos
707+
Intel D*45* mobos
708708
dell-m6-amic
709709
Dell desktops/laptops with analog mics
710710
dell-m6-dmic

sound/firewire/tascam/tascam-stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ int snd_tscm_stream_start_duplex(struct snd_tscm *tscm, unsigned int rate)
490490
// packet is important for media clock recovery.
491491
err = amdtp_domain_start(&tscm->domain, tx_init_skip_cycles, true, true);
492492
if (err < 0)
493-
return err;
493+
goto error;
494494

495495
if (!amdtp_domain_wait_ready(&tscm->domain, READY_TIMEOUT_MS)) {
496496
err = -ETIMEDOUT;

sound/i2c/cs8427.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,10 +561,13 @@ int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active)
561561
if (snd_BUG_ON(!cs8427))
562562
return -ENXIO;
563563
chip = cs8427->private_data;
564-
if (active)
564+
if (active) {
565565
memcpy(chip->playback.pcm_status,
566566
chip->playback.def_status, 24);
567-
chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
567+
chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
568+
} else {
569+
chip->playback.pcm_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE;
570+
}
568571
snd_ctl_notify(cs8427->bus->card,
569572
SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO,
570573
&chip->playback.pcm_ctl->id);

sound/pci/emu10k1/emupcm.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ static int snd_emu10k1_capture_mic_close(struct snd_pcm_substream *substream)
11831183
{
11841184
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
11851185

1186-
emu->capture_interrupt = NULL;
1186+
emu->capture_mic_interrupt = NULL;
11871187
emu->pcm_capture_mic_substream = NULL;
11881188
return 0;
11891189
}
@@ -1290,7 +1290,7 @@ static int snd_emu10k1_capture_efx_close(struct snd_pcm_substream *substream)
12901290
{
12911291
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
12921292

1293-
emu->capture_interrupt = NULL;
1293+
emu->capture_efx_interrupt = NULL;
12941294
emu->pcm_capture_efx_substream = NULL;
12951295
return 0;
12961296
}
@@ -1728,17 +1728,21 @@ int snd_emu10k1_pcm_efx(struct snd_emu10k1 *emu, int device)
17281728
struct snd_kcontrol *kctl;
17291729
int err;
17301730

1731-
err = snd_pcm_new(emu->card, "emu10k1 efx", device, 8, 1, &pcm);
1731+
err = snd_pcm_new(emu->card, "emu10k1 efx", device, emu->audigy ? 0 : 8, 1, &pcm);
17321732
if (err < 0)
17331733
return err;
17341734

17351735
pcm->private_data = emu;
17361736

1737-
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops);
1737+
if (!emu->audigy)
1738+
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops);
17381739
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_efx_ops);
17391740

17401741
pcm->info_flags = 0;
1741-
strcpy(pcm->name, "Multichannel Capture/PT Playback");
1742+
if (emu->audigy)
1743+
strcpy(pcm->name, "Multichannel Capture");
1744+
else
1745+
strcpy(pcm->name, "Multichannel Capture/PT Playback");
17421746
emu->pcm_efx = pcm;
17431747

17441748
/* EFX capture - record the "FXBUS2" channels, by default we connect the EXTINs

sound/pci/hda/patch_hdmi.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ struct hdmi_spec_per_pin {
8181
struct delayed_work work;
8282
struct hdmi_pcm *pcm; /* pointer to spec->pcm_rec[n] dynamically*/
8383
int pcm_idx; /* which pcm is attached. -1 means no pcm is attached */
84+
int prev_pcm_idx; /* previously assigned pcm index */
8485
int repoll_count;
8586
bool setup; /* the stream has been set up by prepare callback */
8687
bool silent_stream;
@@ -1380,9 +1381,17 @@ static void hdmi_attach_hda_pcm(struct hdmi_spec *spec,
13801381
/* pcm already be attached to the pin */
13811382
if (per_pin->pcm)
13821383
return;
1384+
/* try the previously used slot at first */
1385+
idx = per_pin->prev_pcm_idx;
1386+
if (idx >= 0) {
1387+
if (!test_bit(idx, &spec->pcm_bitmap))
1388+
goto found;
1389+
per_pin->prev_pcm_idx = -1; /* no longer valid, clear it */
1390+
}
13831391
idx = hdmi_find_pcm_slot(spec, per_pin);
13841392
if (idx == -EBUSY)
13851393
return;
1394+
found:
13861395
per_pin->pcm_idx = idx;
13871396
per_pin->pcm = get_hdmi_pcm(spec, idx);
13881397
set_bit(idx, &spec->pcm_bitmap);
@@ -1398,6 +1407,7 @@ static void hdmi_detach_hda_pcm(struct hdmi_spec *spec,
13981407
return;
13991408
idx = per_pin->pcm_idx;
14001409
per_pin->pcm_idx = -1;
1410+
per_pin->prev_pcm_idx = idx; /* remember the previous index */
14011411
per_pin->pcm = NULL;
14021412
if (idx >= 0 && idx < spec->pcm_used)
14031413
clear_bit(idx, &spec->pcm_bitmap);
@@ -1924,6 +1934,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
19241934

19251935
per_pin->pcm = NULL;
19261936
per_pin->pcm_idx = -1;
1937+
per_pin->prev_pcm_idx = -1;
19271938
per_pin->pin_nid = pin_nid;
19281939
per_pin->pin_nid_idx = spec->num_nids;
19291940
per_pin->dev_id = i;
@@ -4611,7 +4622,7 @@ HDA_CODEC_ENTRY(0x80862814, "DG1 HDMI", patch_i915_tgl_hdmi),
46114622
HDA_CODEC_ENTRY(0x80862815, "Alderlake HDMI", patch_i915_tgl_hdmi),
46124623
HDA_CODEC_ENTRY(0x80862816, "Rocketlake HDMI", patch_i915_tgl_hdmi),
46134624
HDA_CODEC_ENTRY(0x80862818, "Raptorlake HDMI", patch_i915_tgl_hdmi),
4614-
HDA_CODEC_ENTRY(0x80862819, "DG2 HDMI", patch_i915_adlp_hdmi),
4625+
HDA_CODEC_ENTRY(0x80862819, "DG2 HDMI", patch_i915_tgl_hdmi),
46154626
HDA_CODEC_ENTRY(0x8086281a, "Jasperlake HDMI", patch_i915_icl_hdmi),
46164627
HDA_CODEC_ENTRY(0x8086281b, "Elkhartlake HDMI", patch_i915_icl_hdmi),
46174628
HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_adlp_hdmi),

sound/pci/hda/patch_realtek.c

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2624,6 +2624,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
26242624
SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
26252625
SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
26262626
SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
2627+
SND_PCI_QUIRK(0x1558, 0x3702, "Clevo X370SN[VW]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26272628
SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26282629
SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26292630
SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
@@ -6959,6 +6960,8 @@ enum {
69596960
ALC269_FIXUP_DELL_M101Z,
69606961
ALC269_FIXUP_SKU_IGNORE,
69616962
ALC269_FIXUP_ASUS_G73JW,
6963+
ALC269_FIXUP_ASUS_N7601ZM_PINS,
6964+
ALC269_FIXUP_ASUS_N7601ZM,
69626965
ALC269_FIXUP_LENOVO_EAPD,
69636966
ALC275_FIXUP_SONY_HWEQ,
69646967
ALC275_FIXUP_SONY_DISABLE_AAMIX,
@@ -7255,6 +7258,29 @@ static const struct hda_fixup alc269_fixups[] = {
72557258
{ }
72567259
}
72577260
},
7261+
[ALC269_FIXUP_ASUS_N7601ZM_PINS] = {
7262+
.type = HDA_FIXUP_PINS,
7263+
.v.pins = (const struct hda_pintbl[]) {
7264+
{ 0x19, 0x03A11050 },
7265+
{ 0x1a, 0x03A11C30 },
7266+
{ 0x21, 0x03211420 },
7267+
{ }
7268+
}
7269+
},
7270+
[ALC269_FIXUP_ASUS_N7601ZM] = {
7271+
.type = HDA_FIXUP_VERBS,
7272+
.v.verbs = (const struct hda_verb[]) {
7273+
{0x20, AC_VERB_SET_COEF_INDEX, 0x62},
7274+
{0x20, AC_VERB_SET_PROC_COEF, 0xa007},
7275+
{0x20, AC_VERB_SET_COEF_INDEX, 0x10},
7276+
{0x20, AC_VERB_SET_PROC_COEF, 0x8420},
7277+
{0x20, AC_VERB_SET_COEF_INDEX, 0x0f},
7278+
{0x20, AC_VERB_SET_PROC_COEF, 0x7774},
7279+
{ }
7280+
},
7281+
.chained = true,
7282+
.chain_id = ALC269_FIXUP_ASUS_N7601ZM_PINS,
7283+
},
72587284
[ALC269_FIXUP_LENOVO_EAPD] = {
72597285
.type = HDA_FIXUP_VERBS,
72607286
.v.verbs = (const struct hda_verb[]) {
@@ -9262,7 +9288,6 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
92629288
SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
92639289
SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
92649290
SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
9265-
SND_PCI_QUIRK(0x1028, 0x0ac9, "Dell Precision 3260", ALC283_FIXUP_CHROME_BOOK),
92669291
SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
92679292
SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
92689293
SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
@@ -9443,6 +9468,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
94439468
SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
94449469
SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
94459470
SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9471+
SND_PCI_QUIRK(0x103c, 0x8b65, "HP ProBook 455 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9472+
SND_PCI_QUIRK(0x103c, 0x8b66, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
94469473
SND_PCI_QUIRK(0x103c, 0x8b7a, "HP", ALC236_FIXUP_HP_GPIO_LED),
94479474
SND_PCI_QUIRK(0x103c, 0x8b7d, "HP", ALC236_FIXUP_HP_GPIO_LED),
94489475
SND_PCI_QUIRK(0x103c, 0x8b87, "HP", ALC236_FIXUP_HP_GPIO_LED),
@@ -9464,6 +9491,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
94649491
SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
94659492
SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
94669493
SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE),
9494+
SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM", ALC269_FIXUP_ASUS_N7601ZM),
94679495
SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
94689496
SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC),
94699497
SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC),
@@ -9661,6 +9689,9 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
96619689
SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2),
96629690
SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2),
96639691
SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2),
9692+
SND_PCI_QUIRK(0x17aa, 0x2318, "Thinkpad Z13 Gen2", ALC287_FIXUP_CS35L41_I2C_2),
9693+
SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_CS35L41_I2C_2),
9694+
SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_CS35L41_I2C_2),
96649695
SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
96659696
SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
96669697
SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
@@ -9713,6 +9744,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
97139744
SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
97149745
SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
97159746
SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
9747+
SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
97169748
SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
97179749
SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
97189750
SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),

sound/pci/hda/patch_sigmatel.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,6 +1707,7 @@ static const struct snd_pci_quirk stac925x_fixup_tbl[] = {
17071707
};
17081708

17091709
static const struct hda_pintbl ref92hd73xx_pin_configs[] = {
1710+
// Port A-H
17101711
{ 0x0a, 0x02214030 },
17111712
{ 0x0b, 0x02a19040 },
17121713
{ 0x0c, 0x01a19020 },
@@ -1715,9 +1716,12 @@ static const struct hda_pintbl ref92hd73xx_pin_configs[] = {
17151716
{ 0x0f, 0x01014010 },
17161717
{ 0x10, 0x01014020 },
17171718
{ 0x11, 0x01014030 },
1719+
// CD in
17181720
{ 0x12, 0x02319040 },
1721+
// Digial Mic ins
17191722
{ 0x13, 0x90a000f0 },
17201723
{ 0x14, 0x90a000f0 },
1724+
// Digital outs
17211725
{ 0x22, 0x01452050 },
17221726
{ 0x23, 0x01452050 },
17231727
{}
@@ -1758,13 +1762,17 @@ static const struct hda_pintbl alienware_m17x_pin_configs[] = {
17581762
};
17591763

17601764
static const struct hda_pintbl intel_dg45id_pin_configs[] = {
1765+
// Analog outputs
17611766
{ 0x0a, 0x02214230 },
17621767
{ 0x0b, 0x02A19240 },
17631768
{ 0x0c, 0x01013214 },
17641769
{ 0x0d, 0x01014210 },
17651770
{ 0x0e, 0x01A19250 },
17661771
{ 0x0f, 0x01011212 },
17671772
{ 0x10, 0x01016211 },
1773+
// Digital output
1774+
{ 0x22, 0x01451380 },
1775+
{ 0x23, 0x40f000f0 },
17681776
{}
17691777
};
17701778

@@ -1955,6 +1963,8 @@ static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = {
19551963
"DFI LanParty", STAC_92HD73XX_REF),
19561964
SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101,
19571965
"DFI LanParty", STAC_92HD73XX_REF),
1966+
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5001,
1967+
"Intel DP45SG", STAC_92HD73XX_INTEL),
19581968
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5002,
19591969
"Intel DG45ID", STAC_92HD73XX_INTEL),
19601970
SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5003,

sound/pci/ymfpci/ymfpci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci,
172172
return -ENOENT;
173173
}
174174

175-
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
175+
err = snd_devm_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
176176
sizeof(*chip), &card);
177177
if (err < 0)
178178
return err;

sound/pci/ymfpci/ymfpci_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2160,7 +2160,7 @@ static int snd_ymfpci_memalloc(struct snd_ymfpci *chip)
21602160
chip->work_base = ptr;
21612161
chip->work_base_addr = ptr_addr;
21622162

2163-
snd_BUG_ON(ptr + chip->work_size !=
2163+
snd_BUG_ON(ptr + PAGE_ALIGN(chip->work_size) !=
21642164
chip->work_ptr->area + chip->work_ptr->bytes);
21652165

21662166
snd_ymfpci_writel(chip, YDSXGR_PLAYCTRLBASE, chip->bank_base_playback_addr);

sound/soc/codecs/max98373.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static int max98373_dac_event(struct snd_soc_dapm_widget *w,
3131
MAX98373_GLOBAL_EN_MASK, 1);
3232
usleep_range(30000, 31000);
3333
break;
34-
case SND_SOC_DAPM_POST_PMD:
34+
case SND_SOC_DAPM_PRE_PMD:
3535
regmap_update_bits(max98373->regmap,
3636
MAX98373_R20FF_GLOBAL_SHDN,
3737
MAX98373_GLOBAL_EN_MASK, 0);
@@ -64,7 +64,7 @@ static const struct snd_kcontrol_new max98373_spkfb_control =
6464
static const struct snd_soc_dapm_widget max98373_dapm_widgets[] = {
6565
SND_SOC_DAPM_DAC_E("Amp Enable", "HiFi Playback",
6666
MAX98373_R202B_PCM_RX_EN, 0, 0, max98373_dac_event,
67-
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
67+
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
6868
SND_SOC_DAPM_MUX("DAI Sel Mux", SND_SOC_NOPM, 0, 0,
6969
&max98373_dai_controls),
7070
SND_SOC_DAPM_OUTPUT("BE_OUT"),

0 commit comments

Comments
 (0)