Skip to content

Commit 108b661

Browse files
committed
Merge tag 'sound-6.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "A collection of small device-specific fixes: - ASoC Intel topology fixes for conflicting Bluetooth bits - Cleanups of ASoC drivers for superfluous NULL checks - Fix for error handling in the AC97 bus - A regression fix for TAS2781 speaker ID handling - HD-audio quirks" * tag 'sound-6.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: add HP Laptop 15s-eq1xxx mute LED quirk ALSA: hda/realtek: Add quirk for Acer Nitro AN517-55 ALSA: hda/tas2781: properly initialize speaker_id for TAS2563 ALSA: ac97: fix a double free in snd_ac97_controller_register() ASoC: sun4i-spdif: Add missing kerneldoc fields for sun4i_spdif_quirks ASoC: codecs: pm4125: clean up bind() device reference handling ASoC: soc_sdw_utils: drop bogus container_of() error handling ASoC: codecs: wcd937x: drop bogus container_of() error handling ASoC: codecs: pm4125: drop bogus container_of() error handling ASoC: SOF: Intel: add -bt tplg suffix if BT is present ASoC: Intel: sof_sdw: shift SSP BT mask bits.
2 parents f0b9d8e + 9ed7a28 commit 108b661

9 files changed

Lines changed: 30 additions & 34 deletions

File tree

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/hda/codecs/realtek/alc269.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6321,6 +6321,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
63216321
SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
63226322
SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
63236323
SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC2XX_FIXUP_HEADSET_MIC),
6324+
SND_PCI_QUIRK(0x1025, 0x1597, "Acer Nitro 5 AN517-55", ALC2XX_FIXUP_HEADSET_MIC),
63246325
SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
63256326
SND_PCI_QUIRK(0x1025, 0x1826, "Acer Helios ZPC", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
63266327
SND_PCI_QUIRK(0x1025, 0x182c, "Acer Helios ZPD", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
@@ -6508,6 +6509,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
65086509
SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
65096510
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
65106511
SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
6512+
SND_PCI_QUIRK(0x103c, 0x8706, "HP Laptop 15s-eq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
65116513
SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
65126514
SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
65136515
SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
111111
sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
112112
if (IS_ERR(sub)) {
113113
/* No subsys id in older tas2563 projects. */
114-
if (!strncmp(hid, "INT8866", sizeof("INT8866")))
114+
if (!strncmp(hid, "INT8866", sizeof("INT8866"))) {
115+
p->speaker_id = -1;
115116
goto end_2563;
117+
}
116118
dev_err(p->dev, "Failed to get SUBSYS ID.\n");
117119
ret = PTR_ERR(sub);
118120
goto err;

sound/soc/codecs/pm4125.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,10 +1505,6 @@ static int pm4125_bind(struct device *dev)
15051505
struct device_link *devlink;
15061506
int ret;
15071507

1508-
/* Initialize device pointers to NULL for safe cleanup */
1509-
pm4125->rxdev = NULL;
1510-
pm4125->txdev = NULL;
1511-
15121508
/* Give the soundwire subdevices some more time to settle */
15131509
usleep_range(15000, 15010);
15141510

@@ -1537,13 +1533,7 @@ static int pm4125_bind(struct device *dev)
15371533

15381534
pm4125->sdw_priv[AIF1_CAP] = dev_get_drvdata(pm4125->txdev);
15391535
pm4125->sdw_priv[AIF1_CAP]->pm4125 = pm4125;
1540-
15411536
pm4125->tx_sdw_dev = dev_to_sdw_dev(pm4125->txdev);
1542-
if (!pm4125->tx_sdw_dev) {
1543-
dev_err(dev, "could not get txslave with matching of dev\n");
1544-
ret = -EINVAL;
1545-
goto error_put_tx;
1546-
}
15471537

15481538
/*
15491539
* As TX is the main CSR reg interface, which should not be suspended first.
@@ -1624,11 +1614,8 @@ static void pm4125_unbind(struct device *dev)
16241614
device_link_remove(dev, pm4125->rxdev);
16251615
device_link_remove(pm4125->rxdev, pm4125->txdev);
16261616

1627-
/* Release device references acquired in bind */
1628-
if (pm4125->txdev)
1629-
put_device(pm4125->txdev);
1630-
if (pm4125->rxdev)
1631-
put_device(pm4125->rxdev);
1617+
put_device(pm4125->txdev);
1618+
put_device(pm4125->rxdev);
16321619

16331620
component_unbind_all(dev, pm4125);
16341621
}

sound/soc/codecs/wcd937x.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2763,11 +2763,6 @@ static int wcd937x_bind(struct device *dev)
27632763
wcd937x->sdw_priv[AIF1_CAP] = dev_get_drvdata(wcd937x->txdev);
27642764
wcd937x->sdw_priv[AIF1_CAP]->wcd937x = wcd937x;
27652765
wcd937x->tx_sdw_dev = dev_to_sdw_dev(wcd937x->txdev);
2766-
if (!wcd937x->tx_sdw_dev) {
2767-
dev_err(dev, "could not get txslave with matching of dev\n");
2768-
ret = -EINVAL;
2769-
goto err_put_txdev;
2770-
}
27712766

27722767
/*
27732768
* As TX is the main CSR reg interface, which should not be suspended first.

sound/soc/intel/boards/sof_sdw_common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ enum {
4646
#define SOC_SDW_NO_AGGREGATION BIT(14)
4747

4848
/* BT audio offload: reserve 3 bits for future */
49-
#define SOF_BT_OFFLOAD_SSP_SHIFT 15
50-
#define SOF_BT_OFFLOAD_SSP_MASK (GENMASK(17, 15))
49+
#define SOF_BT_OFFLOAD_SSP_SHIFT 18
50+
#define SOF_BT_OFFLOAD_SSP_MASK (GENMASK(20, 18))
5151
#define SOF_BT_OFFLOAD_SSP(quirk) \
5252
(((quirk) << SOF_BT_OFFLOAD_SSP_SHIFT) & SOF_BT_OFFLOAD_SSP_MASK)
53-
#define SOF_SSP_BT_OFFLOAD_PRESENT BIT(18)
53+
#define SOF_SSP_BT_OFFLOAD_PRESENT BIT(21)
5454

5555
struct intel_mc_ctx {
5656
struct sof_hdmi_private hdmi;

sound/soc/sdw_utils/soc_sdw_utils.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,10 +1414,6 @@ static int is_sdca_endpoint_present(struct device *dev,
14141414
}
14151415

14161416
slave = dev_to_sdw_dev(sdw_dev);
1417-
if (!slave) {
1418-
ret = -EINVAL;
1419-
goto put_device;
1420-
}
14211417

14221418
/* Make sure BIOS provides SDCA properties */
14231419
if (!slave->sdca_data.interface_revision) {

sound/soc/sof/intel/hda.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,7 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
15491549
* name string if quirk flag is set.
15501550
*/
15511551
if (mach) {
1552+
const struct sof_intel_dsp_desc *chip = get_chip_info(sdev->pdata);
15521553
bool tplg_fixup = false;
15531554
bool dmic_fixup = false;
15541555

@@ -1598,6 +1599,18 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
15981599
sof_pdata->tplg_filename = tplg_filename;
15991600
}
16001601

1602+
if (tplg_fixup && mach->mach_params.bt_link_mask &&
1603+
chip->hw_ip_version >= SOF_INTEL_ACE_4_0) {
1604+
int bt_port = fls(mach->mach_params.bt_link_mask) - 1;
1605+
1606+
tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, "%s-ssp%d-bt",
1607+
sof_pdata->tplg_filename, bt_port);
1608+
if (!tplg_filename)
1609+
return NULL;
1610+
1611+
sof_pdata->tplg_filename = tplg_filename;
1612+
}
1613+
16011614
if (mach->link_mask) {
16021615
mach->mach_params.links = mach->links;
16031616
mach->mach_params.link_mask = mach->link_mask;
@@ -1609,7 +1622,6 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
16091622
if (tplg_fixup &&
16101623
mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER &&
16111624
mach->mach_params.i2s_link_mask) {
1612-
const struct sof_intel_dsp_desc *chip = get_chip_info(sdev->pdata);
16131625
int ssp_num;
16141626
int mclk_mask;
16151627

sound/soc/sunxi/sun4i-spdif.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@
171171
* @reg_dac_txdata: TX FIFO offset for DMA config.
172172
* @has_reset: SoC needs reset deasserted.
173173
* @val_fctl_ftx: TX FIFO flush bitmask.
174+
* @mclk_multiplier: ratio of internal MCLK divider
175+
* @tx_clk_name: name of TX module clock if split clock design
174176
*/
175177
struct sun4i_spdif_quirks {
176178
unsigned int reg_dac_txdata;

0 commit comments

Comments
 (0)