Skip to content

Commit 8bf65ec

Browse files
committed
Merge branch 'for-linus' into for-next
Pull 6.19-devel branch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 parents b47ce58 + b7e26c8 commit 8bf65ec

34 files changed

Lines changed: 344 additions & 166 deletions

include/sound/pcm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,7 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
14021402
#define snd_pcm_lib_mmap_iomem NULL
14031403
#endif
14041404

1405-
void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime);
1405+
int snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime);
14061406

14071407
/**
14081408
* snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer

include/sound/soc-acpi.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ struct snd_soc_acpi_link_adr {
203203
* @mach: the pointer of the machine driver
204204
* @prefix: the prefix of the topology file name. Typically, it is the path.
205205
* @tplg_files: the pointer of the array of the topology file names.
206+
* @best_effort: ignore non supported links and try to build the card in best effort
207+
* with supported links
206208
*/
207209
/* Descriptor for SST ASoC machine driver */
208210
struct snd_soc_acpi_mach {
@@ -224,7 +226,8 @@ struct snd_soc_acpi_mach {
224226
const u32 tplg_quirk_mask;
225227
int (*get_function_tplg_files)(struct snd_soc_card *card,
226228
const struct snd_soc_acpi_mach *mach,
227-
const char *prefix, const char ***tplg_files);
229+
const char *prefix, const char ***tplg_files,
230+
bool best_effort);
228231
};
229232

230233
#define SND_SOC_ACPI_MAX_CODECS 3

sound/ac97/bus.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ static void ac97_adapter_release(struct device *dev)
298298
idr_remove(&ac97_adapter_idr, ac97_ctrl->nr);
299299
dev_dbg(&ac97_ctrl->adap, "adapter unregistered by %s\n",
300300
dev_name(ac97_ctrl->parent));
301+
kfree(ac97_ctrl);
301302
}
302303

303304
static const struct device_type ac97_adapter_type = {
@@ -319,7 +320,9 @@ static int ac97_add_adapter(struct ac97_controller *ac97_ctrl)
319320
ret = device_register(&ac97_ctrl->adap);
320321
if (ret)
321322
put_device(&ac97_ctrl->adap);
322-
}
323+
} else
324+
kfree(ac97_ctrl);
325+
323326
if (!ret) {
324327
list_add(&ac97_ctrl->controllers, &ac97_controllers);
325328
dev_dbg(&ac97_ctrl->adap, "adapter registered by %s\n",
@@ -361,14 +364,11 @@ struct ac97_controller *snd_ac97_controller_register(
361364
ret = ac97_add_adapter(ac97_ctrl);
362365

363366
if (ret)
364-
goto err;
367+
return ERR_PTR(ret);
365368
ac97_bus_reset(ac97_ctrl);
366369
ac97_bus_scan(ac97_ctrl);
367370

368371
return ac97_ctrl;
369-
err:
370-
kfree(ac97_ctrl);
371-
return ERR_PTR(ret);
372372
}
373373
EXPORT_SYMBOL_GPL(snd_ac97_controller_register);
374374

sound/core/oss/pcm_oss.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,9 @@ static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream)
10761076
runtime->oss.params = 0;
10771077
runtime->oss.prepare = 1;
10781078
runtime->oss.buffer_used = 0;
1079-
snd_pcm_runtime_buffer_set_silence(runtime);
1079+
err = snd_pcm_runtime_buffer_set_silence(runtime);
1080+
if (err < 0)
1081+
goto failure;
10801082

10811083
runtime->oss.period_frames = snd_pcm_alsa_frames(substream, oss_period_size);
10821084

sound/core/pcm_native.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,13 +730,18 @@ static void snd_pcm_buffer_access_unlock(struct snd_pcm_runtime *runtime)
730730
}
731731

732732
/* fill the PCM buffer with the current silence format; called from pcm_oss.c */
733-
void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime)
733+
int snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime)
734734
{
735-
snd_pcm_buffer_access_lock(runtime);
735+
int err;
736+
737+
err = snd_pcm_buffer_access_lock(runtime);
738+
if (err < 0)
739+
return err;
736740
if (runtime->dma_area)
737741
snd_pcm_format_set_silence(runtime->format, runtime->dma_area,
738742
bytes_to_samples(runtime, runtime->dma_bytes));
739743
snd_pcm_buffer_access_unlock(runtime);
744+
return 0;
740745
}
741746
EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence);
742747

sound/hda/codecs/realtek/alc269.c

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,6 +1670,18 @@ static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
16701670
alc236_fixup_hp_micmute_led_vref(codec, fix, action);
16711671
}
16721672

1673+
static void alc236_fixup_hp_mute_led_micmute_gpio(struct hda_codec *codec,
1674+
const struct hda_fixup *fix, int action)
1675+
{
1676+
struct alc_spec *spec = codec->spec;
1677+
1678+
if (action == HDA_FIXUP_ACT_PRE_PROBE)
1679+
spec->micmute_led_polarity = 1;
1680+
1681+
alc236_fixup_hp_mute_led_coefbit2(codec, fix, action);
1682+
alc_fixup_hp_gpio_led(codec, action, 0x00, 0x01);
1683+
}
1684+
16731685
static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
16741686
const unsigned short coefs[2])
16751687
{
@@ -3800,6 +3812,7 @@ enum {
38003812
ALC295_FIXUP_DELL_TAS2781_I2C,
38013813
ALC245_FIXUP_TAS2781_SPI_2,
38023814
ALC287_FIXUP_TXNW2781_I2C,
3815+
ALC287_FIXUP_TXNW2781_I2C_ASUS,
38033816
ALC287_FIXUP_YOGA7_14ARB7_I2C,
38043817
ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
38053818
ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT,
@@ -5374,9 +5387,7 @@ static const struct hda_fixup alc269_fixups[] = {
53745387
},
53755388
[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
53765389
.type = HDA_FIXUP_FUNC,
5377-
.v.func = alc236_fixup_hp_mute_led_coefbit2,
5378-
.chained = true,
5379-
.chain_id = ALC236_FIXUP_HP_GPIO_LED,
5390+
.v.func = alc236_fixup_hp_mute_led_micmute_gpio,
53805391
},
53815392
[ALC236_FIXUP_LENOVO_INV_DMIC] = {
53825393
.type = HDA_FIXUP_FUNC,
@@ -6101,6 +6112,12 @@ static const struct hda_fixup alc269_fixups[] = {
61016112
.chained = true,
61026113
.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
61036114
},
6115+
[ALC287_FIXUP_TXNW2781_I2C_ASUS] = {
6116+
.type = HDA_FIXUP_FUNC,
6117+
.v.func = tas2781_fixup_txnw_i2c,
6118+
.chained = true,
6119+
.chain_id = ALC294_FIXUP_ASUS_SPK,
6120+
},
61046121
[ALC287_FIXUP_YOGA7_14ARB7_I2C] = {
61056122
.type = HDA_FIXUP_FUNC,
61066123
.v.func = yoga7_14arb7_fixup_i2c,
@@ -6356,6 +6373,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
63566373
SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
63576374
SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
63586375
SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC2XX_FIXUP_HEADSET_MIC),
6376+
SND_PCI_QUIRK(0x1025, 0x1597, "Acer Nitro 5 AN517-55", ALC2XX_FIXUP_HEADSET_MIC),
63596377
SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
63606378
SND_PCI_QUIRK(0x1025, 0x1826, "Acer Helios ZPC", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
63616379
SND_PCI_QUIRK(0x1025, 0x182c, "Acer Helios ZPD", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
@@ -6543,6 +6561,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
65436561
SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
65446562
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
65456563
SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
6564+
SND_PCI_QUIRK(0x103c, 0x8706, "HP Laptop 15s-eq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
65466565
SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
65476566
SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
65486567
SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),
@@ -6823,10 +6842,10 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
68236842
SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
68246843
SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
68256844
SND_PCI_QUIRK(0x103c, 0x8e8a, "HP NexusX", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
6845+
SND_PCI_QUIRK(0x103c, 0x8e9c, "HP 16 Clipper OmniBook X X360", ALC287_FIXUP_CS35L41_I2C_2),
68266846
SND_PCI_QUIRK(0x103c, 0x8e9d, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
68276847
SND_PCI_QUIRK(0x103c, 0x8e9e, "HP 17 Turbine OmniBook X UMA", ALC287_FIXUP_CS35L41_I2C_2),
68286848
SND_PCI_QUIRK(0x103c, 0x8eb6, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
6829-
SND_PCI_QUIRK(0x103c, 0x8eb7, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
68306849
SND_PCI_QUIRK(0x103c, 0x8eb8, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
68316850
SND_PCI_QUIRK(0x103c, 0x8ec1, "HP 200 G2i", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
68326851
SND_PCI_QUIRK(0x103c, 0x8ec4, "HP Bantie I6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
@@ -6842,11 +6861,13 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
68426861
SND_PCI_QUIRK(0x103c, 0x8eda, "HP ZBook Firefly 16W", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
68436862
SND_PCI_QUIRK(0x103c, 0x8ee4, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
68446863
SND_PCI_QUIRK(0x103c, 0x8ee5, "HP Bantie A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
6864+
SND_PCI_QUIRK(0x103c, 0x8ee7, "HP Abe A6U", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
68456865
SND_PCI_QUIRK(0x103c, 0x8f0c, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED),
68466866
SND_PCI_QUIRK(0x103c, 0x8f0e, "HP ZBook X G2i 16W", ALC236_FIXUP_HP_GPIO_LED),
68476867
SND_PCI_QUIRK(0x103c, 0x8f40, "HP ZBook 8 G2a 14", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
68486868
SND_PCI_QUIRK(0x103c, 0x8f41, "HP ZBook 8 G2a 16", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
68496869
SND_PCI_QUIRK(0x103c, 0x8f42, "HP ZBook 8 G2a 14W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
6870+
SND_PCI_QUIRK(0x103c, 0x8f57, "HP Trekker G7JC", ALC287_FIXUP_CS35L41_I2C_2),
68506871
SND_PCI_QUIRK(0x103c, 0x8f62, "HP ZBook 8 G2a 16W", ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED),
68516872
SND_PCI_QUIRK(0x1043, 0x1032, "ASUS VivoBook X513EA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
68526873
SND_PCI_QUIRK(0x1043, 0x1034, "ASUS GU605C", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
@@ -6879,8 +6900,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
68796900
SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
68806901
SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),
68816902
SND_PCI_QUIRK(0x1043, 0x1314, "ASUS GA605K", ALC285_FIXUP_ASUS_GA605K_HEADSET_MIC),
6882-
SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C),
6883-
SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C),
6903+
SND_PCI_QUIRK(0x1043, 0x1384, "ASUS RC73XA", ALC287_FIXUP_TXNW2781_I2C_ASUS),
6904+
SND_PCI_QUIRK(0x1043, 0x1394, "ASUS RC73YA", ALC287_FIXUP_TXNW2781_I2C_ASUS),
68846905
SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE),
68856906
SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
68866907
SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC),

sound/hda/codecs/side-codecs/tas2781_hda_i2c.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ struct tas2781_hda_i2c_priv {
6060
int (*save_calibration)(struct tas2781_hda *h);
6161

6262
int hda_chip_id;
63+
bool skip_calibration;
6364
};
6465

6566
static int tas2781_get_i2c_res(struct acpi_resource *ares, void *data)
@@ -111,8 +112,10 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
111112
sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
112113
if (IS_ERR(sub)) {
113114
/* No subsys id in older tas2563 projects. */
114-
if (!strncmp(hid, "INT8866", sizeof("INT8866")))
115+
if (!strncmp(hid, "INT8866", sizeof("INT8866"))) {
116+
p->speaker_id = -1;
115117
goto end_2563;
118+
}
116119
dev_err(p->dev, "Failed to get SUBSYS ID.\n");
117120
ret = PTR_ERR(sub);
118121
goto err;
@@ -489,7 +492,8 @@ static void tasdevice_dspfw_init(void *context)
489492
/* If calibrated data occurs error, dsp will still works with default
490493
* calibrated data inside algo.
491494
*/
492-
hda_priv->save_calibration(tas_hda);
495+
if (!hda_priv->skip_calibration)
496+
hda_priv->save_calibration(tas_hda);
493497
}
494498

495499
static void tasdev_fw_ready(const struct firmware *fmw, void *context)
@@ -544,6 +548,7 @@ static int tas2781_hda_bind(struct device *dev, struct device *master,
544548
void *master_data)
545549
{
546550
struct tas2781_hda *tas_hda = dev_get_drvdata(dev);
551+
struct tas2781_hda_i2c_priv *hda_priv = tas_hda->hda_priv;
547552
struct hda_component_parent *parent = master_data;
548553
struct hda_component *comp;
549554
struct hda_codec *codec;
@@ -569,6 +574,14 @@ static int tas2781_hda_bind(struct device *dev, struct device *master,
569574
break;
570575
}
571576

577+
/*
578+
* Using ASUS ROG Xbox Ally X (RC73XA) UEFI calibration data
579+
* causes audio dropouts during playback, use fallback data
580+
* from DSP firmware as a workaround.
581+
*/
582+
if (codec->core.subsystem_id == 0x10431384)
583+
hda_priv->skip_calibration = true;
584+
572585
guard(pm_runtime_active_auto)(dev);
573586

574587
comp->dev = dev;

sound/pcmcia/pdaudiocf/pdaudiocf.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
131131
link->config_index = 1;
132132
link->config_regs = PRESENT_OPTION;
133133

134-
return pdacf_config(link);
134+
err = pdacf_config(link);
135+
if (err < 0) {
136+
card_list[i] = NULL;
137+
snd_card_free(card);
138+
return err;
139+
}
140+
return 0;
135141
}
136142

137143

sound/pcmcia/vx/vxpocket.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,13 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
284284

285285
vxp->p_dev = p_dev;
286286

287-
return vxpocket_config(p_dev);
287+
err = vxpocket_config(p_dev);
288+
if (err < 0) {
289+
card_alloc &= ~(1 << i);
290+
snd_card_free(card);
291+
return err;
292+
}
293+
return 0;
288294
}
289295

290296
static void vxpocket_detach(struct pcmcia_device *link)

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
661661
DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7UCX"),
662662
}
663663
},
664+
{
665+
.driver_data = &acp6x_card,
666+
.matches = {
667+
DMI_MATCH(DMI_BOARD_VENDOR, "HONOR"),
668+
DMI_MATCH(DMI_PRODUCT_NAME, "GOH-X"),
669+
}
670+
},
664671
{}
665672
};
666673

0 commit comments

Comments
 (0)