Skip to content

Commit ed42668

Browse files
committed
Merge tag 'asoc-fix-v6.17-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.17 This is a relatively small set of fixes and device quirks that came in during the merge window, the AMD changes adding support for ACP 7.2 systems are all just adding IDs for the devices rather than any substantial code - the actual code is the same as for prior versions of the platform.
2 parents 9f320df + 614d416 commit ed42668

File tree

15 files changed

+53
-6
lines changed

15 files changed

+53
-6
lines changed

include/sound/tas2781-tlv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#ifndef __TAS2781_TLV_H__
1616
#define __TAS2781_TLV_H__
1717

18-
static const __maybe_unused DECLARE_TLV_DB_SCALE(dvc_tlv, -10000, 100, 0);
18+
static const __maybe_unused DECLARE_TLV_DB_SCALE(dvc_tlv, -10000, 50, 0);
1919
static const __maybe_unused DECLARE_TLV_DB_SCALE(amp_vol_tlv, 1100, 50, 0);
2020

2121
#endif

sound/soc/amd/acp/acp-sdw-legacy-mach.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ static int create_sdw_dailink(struct snd_soc_card *card,
158158
break;
159159
case ACP70_PCI_REV:
160160
case ACP71_PCI_REV:
161+
case ACP72_PCI_REV:
161162
ret = get_acp70_cpu_pin_id(ffs(soc_end->link_mask - 1),
162163
*be_id, &cpu_pin_id, dev);
163164
if (ret)
@@ -264,6 +265,7 @@ static int create_sdw_dailinks(struct snd_soc_card *card,
264265
case ACP63_PCI_REV:
265266
case ACP70_PCI_REV:
266267
case ACP71_PCI_REV:
268+
case ACP72_PCI_REV:
267269
sdw_platform_component->name = "amd_ps_sdw_dma.0";
268270
break;
269271
default:
@@ -311,6 +313,7 @@ static int create_dmic_dailinks(struct snd_soc_card *card,
311313
case ACP63_PCI_REV:
312314
case ACP70_PCI_REV:
313315
case ACP71_PCI_REV:
316+
case ACP72_PCI_REV:
314317
pdm_cpu->name = "acp_ps_pdm_dma.0";
315318
pdm_platform->name = "acp_ps_pdm_dma.0";
316319
break;

sound/soc/amd/acp/acp-sdw-sof-mach.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ static int create_sdw_dailink(struct snd_soc_card *card,
130130
break;
131131
case ACP70_PCI_REV:
132132
case ACP71_PCI_REV:
133+
case ACP72_PCI_REV:
133134
ret = get_acp70_cpu_pin_id(ffs(sof_end->link_mask - 1),
134135
*be_id, &cpu_pin_id, dev);
135136
if (ret)

sound/soc/amd/acp/soc_amd_sdw_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#define ACP63_PCI_REV 0x63
2222
#define ACP70_PCI_REV 0x70
2323
#define ACP71_PCI_REV 0x71
24+
#define ACP72_PCI_REV 0x72
25+
2426
#define SOC_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0))
2527
#define ASOC_SDW_FOUR_SPK BIT(4)
2628
#define ASOC_SDW_ACP_DMIC BIT(5)

sound/soc/amd/ps/acp63.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#define ACP63_PCI_REV 0x63
1515
#define ACP70_PCI_REV 0x70
1616
#define ACP71_PCI_REV 0x71
17+
#define ACP72_PCI_REV 0x72
1718

1819
#define ACP_SOFT_RESET_SOFTRESET_AUDDONE_MASK 0x00010001
1920
#define ACP63_PGFSM_CNTL_POWER_ON_MASK 1

sound/soc/amd/ps/pci-ps.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ static short int check_and_handle_sdw_dma_irq(struct acp63_dev_data *adata, u32
117117
break;
118118
case ACP70_PCI_REV:
119119
case ACP71_PCI_REV:
120+
case ACP72_PCI_REV:
120121
adata->acp70_sdw0_dma_intr_stat[stream_id] = 1;
121122
break;
122123
}
@@ -141,6 +142,7 @@ static short int check_and_handle_sdw_dma_irq(struct acp63_dev_data *adata, u32
141142
break;
142143
case ACP70_PCI_REV:
143144
case ACP71_PCI_REV:
145+
case ACP72_PCI_REV:
144146
if (ext_intr_stat1 & ACP70_P1_SDW_DMA_IRQ_MASK) {
145147
for (index = ACP70_P1_AUDIO2_RX_THRESHOLD;
146148
index <= ACP70_P1_AUDIO0_TX_THRESHOLD; index++) {
@@ -552,6 +554,7 @@ static int acp_hw_init_ops(struct acp63_dev_data *adata, struct pci_dev *pci)
552554
break;
553555
case ACP70_PCI_REV:
554556
case ACP71_PCI_REV:
557+
case ACP72_PCI_REV:
555558
acp70_hw_init_ops(adata->hw_ops);
556559
break;
557560
default:
@@ -581,6 +584,7 @@ static int snd_acp63_probe(struct pci_dev *pci,
581584
case ACP63_PCI_REV:
582585
case ACP70_PCI_REV:
583586
case ACP71_PCI_REV:
587+
case ACP72_PCI_REV:
584588
break;
585589
default:
586590
dev_dbg(&pci->dev, "acp63/acp70/acp71 pci device not found\n");

sound/soc/amd/ps/ps-sdw-dma.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ static int acp63_configure_sdw_ringbuffer(void __iomem *acp_base, u32 stream_id,
269269
break;
270270
case ACP70_PCI_REV:
271271
case ACP71_PCI_REV:
272+
case ACP72_PCI_REV:
272273
switch (manager_instance) {
273274
case ACP_SDW0:
274275
reg_dma_size = acp70_sdw0_dma_reg[stream_id].reg_dma_size;
@@ -382,6 +383,7 @@ static int acp63_sdw_dma_hw_params(struct snd_soc_component *component,
382383
break;
383384
case ACP70_PCI_REV:
384385
case ACP71_PCI_REV:
386+
case ACP72_PCI_REV:
385387
switch (stream->instance) {
386388
case ACP_SDW0:
387389
sdw_data->acp70_sdw0_dma_stream[stream_id] = substream;
@@ -451,6 +453,7 @@ static u64 acp63_sdw_get_byte_count(struct acp_sdw_dma_stream *stream, void __io
451453
break;
452454
case ACP70_PCI_REV:
453455
case ACP71_PCI_REV:
456+
case ACP72_PCI_REV:
454457
switch (stream->instance) {
455458
case ACP_SDW0:
456459
pos_low_reg = acp70_sdw0_dma_reg[stream->stream_id].pos_low_reg;
@@ -529,6 +532,7 @@ static int acp63_sdw_dma_close(struct snd_soc_component *component,
529532
break;
530533
case ACP70_PCI_REV:
531534
case ACP71_PCI_REV:
535+
case ACP72_PCI_REV:
532536
switch (stream->instance) {
533537
case ACP_SDW0:
534538
sdw_data->acp70_sdw0_dma_stream[stream->stream_id] = NULL;
@@ -574,6 +578,7 @@ static int acp63_sdw_dma_enable(struct snd_pcm_substream *substream,
574578
break;
575579
case ACP70_PCI_REV:
576580
case ACP71_PCI_REV:
581+
case ACP72_PCI_REV:
577582
switch (stream->instance) {
578583
case ACP_SDW0:
579584
sdw_dma_en_reg = acp70_sdw0_dma_enable_reg[stream_id];

sound/soc/codecs/wm8962.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ struct wm8962_priv {
8282
#endif
8383

8484
int irq;
85+
bool master_flag;
8586
};
8687

8788
/* We can't use the same notifier block for more than one supply and
@@ -2715,6 +2716,7 @@ static int wm8962_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
27152716
static int wm8962_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
27162717
{
27172718
struct snd_soc_component *component = dai->component;
2719+
struct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component);
27182720
int aif0 = 0;
27192721

27202722
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
@@ -2761,9 +2763,11 @@ static int wm8962_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
27612763
return -EINVAL;
27622764
}
27632765

2766+
wm8962->master_flag = false;
27642767
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
27652768
case SND_SOC_DAIFMT_CBP_CFP:
27662769
aif0 |= WM8962_MSTR;
2770+
wm8962->master_flag = true;
27672771
break;
27682772
case SND_SOC_DAIFMT_CBC_CFC:
27692773
break;
@@ -3903,6 +3907,9 @@ static int wm8962_runtime_resume(struct device *dev)
39033907
WM8962_BIAS_ENA | WM8962_VMID_SEL_MASK,
39043908
WM8962_BIAS_ENA | 0x180);
39053909

3910+
if (wm8962->master_flag)
3911+
regmap_update_bits(wm8962->regmap, WM8962_AUDIO_INTERFACE_0,
3912+
WM8962_MSTR, WM8962_MSTR);
39063913
msleep(5);
39073914

39083915
return 0;
@@ -3916,6 +3923,10 @@ static int wm8962_runtime_suspend(struct device *dev)
39163923
{
39173924
struct wm8962_priv *wm8962 = dev_get_drvdata(dev);
39183925

3926+
if (wm8962->master_flag)
3927+
regmap_update_bits(wm8962->regmap, WM8962_AUDIO_INTERFACE_0,
3928+
WM8962_MSTR, 0);
3929+
39193930
regmap_update_bits(wm8962->regmap, WM8962_PWR_MGMT_1,
39203931
WM8962_VMID_SEL_MASK | WM8962_BIAS_ENA, 0);
39213932

sound/soc/intel/avs/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,8 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
445445
adev = devm_kzalloc(dev, sizeof(*adev), GFP_KERNEL);
446446
if (!adev)
447447
return -ENOMEM;
448+
bus = &adev->base.core;
449+
448450
ret = avs_bus_init(adev, pci, id);
449451
if (ret < 0) {
450452
dev_err(dev, "failed to init avs bus: %d\n", ret);
@@ -455,7 +457,6 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
455457
if (ret < 0)
456458
return ret;
457459

458-
bus = &adev->base.core;
459460
bus->addr = pci_resource_start(pci, 0);
460461
bus->remap_addr = pci_ioremap_bar(pci, 0);
461462
if (!bus->remap_addr) {

sound/soc/intel/boards/sof_sdw.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,14 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
741741
},
742742
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
743743
},
744+
{
745+
.callback = sof_sdw_quirk_cb,
746+
.matches = {
747+
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
748+
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CCC")
749+
},
750+
.driver_data = (void *)(SOC_SDW_CODEC_SPKR),
751+
},
744752
/* Pantherlake devices*/
745753
{
746754
.callback = sof_sdw_quirk_cb,

0 commit comments

Comments
 (0)