Skip to content

Commit 5a56996

Browse files
committed
Merge tag 'asoc-fix-v5.6-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.6 More fixes that have arrived since the merge window, spread out all over. There's a few things like the operation callback addition for rt1015 and the meson reset addition which add small new bits of functionality to fix non-working systems, they're all very small and for parts of newly added functionality.
2 parents 95dbf14 + 3fb83cb commit 5a56996

File tree

15 files changed

+71
-52
lines changed

15 files changed

+71
-52
lines changed

include/sound/soc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ struct snd_soc_pcm_runtime {
11571157
((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]); \
11581158
(i)++)
11591159
#define for_each_rtd_codec_dai_rollback(rtd, i, dai) \
1160-
for (; ((--i) >= 0) && ((dai) = rtd->codec_dais[i]);)
1160+
for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);)
11611161

11621162
void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
11631163

sound/soc/codecs/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ config SND_SOC_WM8737
14061406
depends on SND_SOC_I2C_AND_SPI
14071407

14081408
config SND_SOC_WM8741
1409-
tristate "Wolfson Microelectronics WM8737 DAC"
1409+
tristate "Wolfson Microelectronics WM8741 DAC"
14101410
depends on SND_SOC_I2C_AND_SPI
14111411

14121412
config SND_SOC_WM8750

sound/soc/codecs/pcm512x.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,13 +1564,15 @@ int pcm512x_probe(struct device *dev, struct regmap *regmap)
15641564
}
15651565

15661566
pcm512x->sclk = devm_clk_get(dev, NULL);
1567-
if (PTR_ERR(pcm512x->sclk) == -EPROBE_DEFER)
1568-
return -EPROBE_DEFER;
1567+
if (PTR_ERR(pcm512x->sclk) == -EPROBE_DEFER) {
1568+
ret = -EPROBE_DEFER;
1569+
goto err;
1570+
}
15691571
if (!IS_ERR(pcm512x->sclk)) {
15701572
ret = clk_prepare_enable(pcm512x->sclk);
15711573
if (ret != 0) {
15721574
dev_err(dev, "Failed to enable SCLK: %d\n", ret);
1573-
return ret;
1575+
goto err;
15741576
}
15751577
}
15761578

sound/soc/codecs/rt1015.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ static int rt1015_hw_params(struct snd_pcm_substream *substream,
664664
snd_soc_component_update_bits(component, RT1015_TDM_MASTER,
665665
RT1015_I2S_DL_MASK, val_len);
666666
snd_soc_component_update_bits(component, RT1015_CLK2,
667-
RT1015_FS_PD_MASK, pre_div);
667+
RT1015_FS_PD_MASK, pre_div << RT1015_FS_PD_SFT);
668668

669669
return 0;
670670
}
@@ -857,6 +857,7 @@ struct snd_soc_dai_driver rt1015_dai[] = {
857857
.rates = RT1015_STEREO_RATES,
858858
.formats = RT1015_FORMATS,
859859
},
860+
.ops = &rt1015_aif_dai_ops,
860861
}
861862
};
862863

sound/soc/codecs/tas2562.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ static int tas2562_set_bitwidth(struct tas2562_data *tas2562, int bitwidth)
215215
break;
216216

217217
default:
218-
dev_info(tas2562->dev, "Not supported params format\n");
218+
dev_info(tas2562->dev, "Unsupported bitwidth format\n");
219+
return -EINVAL;
219220
}
220221

221222
ret = snd_soc_component_update_bits(tas2562->component,
@@ -251,7 +252,7 @@ static int tas2562_hw_params(struct snd_pcm_substream *substream,
251252

252253
ret = tas2562_set_samplerate(tas2562, params_rate(params));
253254
if (ret)
254-
dev_err(tas2562->dev, "set bitwidth failed, %d\n", ret);
255+
dev_err(tas2562->dev, "set sample rate failed, %d\n", ret);
255256

256257
return ret;
257258
}

sound/soc/intel/skylake/skl-debug.c

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ static ssize_t skl_print_pins(struct skl_module_pin *m_pin, char *buf,
3434
int i;
3535
ssize_t ret = 0;
3636

37-
for (i = 0; i < max_pin; i++)
38-
ret += snprintf(buf + size, MOD_BUF - size,
37+
for (i = 0; i < max_pin; i++) {
38+
ret += scnprintf(buf + size, MOD_BUF - size,
3939
"%s %d\n\tModule %d\n\tInstance %d\n\t"
4040
"In-used %s\n\tType %s\n"
4141
"\tState %d\n\tIndex %d\n",
@@ -45,13 +45,15 @@ static ssize_t skl_print_pins(struct skl_module_pin *m_pin, char *buf,
4545
m_pin[i].in_use ? "Used" : "Unused",
4646
m_pin[i].is_dynamic ? "Dynamic" : "Static",
4747
m_pin[i].pin_state, i);
48+
size += ret;
49+
}
4850
return ret;
4951
}
5052

5153
static ssize_t skl_print_fmt(struct skl_module_fmt *fmt, char *buf,
5254
ssize_t size, bool direction)
5355
{
54-
return snprintf(buf + size, MOD_BUF - size,
56+
return scnprintf(buf + size, MOD_BUF - size,
5557
"%s\n\tCh %d\n\tFreq %d\n\tBit depth %d\n\t"
5658
"Valid bit depth %d\n\tCh config %#x\n\tInterleaving %d\n\t"
5759
"Sample Type %d\n\tCh Map %#x\n",
@@ -75,16 +77,16 @@ static ssize_t module_read(struct file *file, char __user *user_buf,
7577
if (!buf)
7678
return -ENOMEM;
7779

78-
ret = snprintf(buf, MOD_BUF, "Module:\n\tUUID %pUL\n\tModule id %d\n"
80+
ret = scnprintf(buf, MOD_BUF, "Module:\n\tUUID %pUL\n\tModule id %d\n"
7981
"\tInstance id %d\n\tPvt_id %d\n", mconfig->guid,
8082
mconfig->id.module_id, mconfig->id.instance_id,
8183
mconfig->id.pvt_id);
8284

83-
ret += snprintf(buf + ret, MOD_BUF - ret,
85+
ret += scnprintf(buf + ret, MOD_BUF - ret,
8486
"Resources:\n\tCPC %#x\n\tIBS %#x\n\tOBS %#x\t\n",
8587
res->cpc, res->ibs, res->obs);
8688

87-
ret += snprintf(buf + ret, MOD_BUF - ret,
89+
ret += scnprintf(buf + ret, MOD_BUF - ret,
8890
"Module data:\n\tCore %d\n\tIn queue %d\n\t"
8991
"Out queue %d\n\tType %s\n",
9092
mconfig->core_id, mconfig->max_in_queue,
@@ -94,38 +96,38 @@ static ssize_t module_read(struct file *file, char __user *user_buf,
9496
ret += skl_print_fmt(mconfig->in_fmt, buf, ret, true);
9597
ret += skl_print_fmt(mconfig->out_fmt, buf, ret, false);
9698

97-
ret += snprintf(buf + ret, MOD_BUF - ret,
99+
ret += scnprintf(buf + ret, MOD_BUF - ret,
98100
"Fixup:\n\tParams %#x\n\tConverter %#x\n",
99101
mconfig->params_fixup, mconfig->converter);
100102

101-
ret += snprintf(buf + ret, MOD_BUF - ret,
103+
ret += scnprintf(buf + ret, MOD_BUF - ret,
102104
"Module Gateway:\n\tType %#x\n\tVbus %#x\n\tHW conn %#x\n\tSlot %#x\n",
103105
mconfig->dev_type, mconfig->vbus_id,
104106
mconfig->hw_conn_type, mconfig->time_slot);
105107

106-
ret += snprintf(buf + ret, MOD_BUF - ret,
108+
ret += scnprintf(buf + ret, MOD_BUF - ret,
107109
"Pipeline:\n\tID %d\n\tPriority %d\n\tConn Type %d\n\t"
108110
"Pages %#x\n", mconfig->pipe->ppl_id,
109111
mconfig->pipe->pipe_priority, mconfig->pipe->conn_type,
110112
mconfig->pipe->memory_pages);
111113

112-
ret += snprintf(buf + ret, MOD_BUF - ret,
114+
ret += scnprintf(buf + ret, MOD_BUF - ret,
113115
"\tParams:\n\t\tHost DMA %d\n\t\tLink DMA %d\n",
114116
mconfig->pipe->p_params->host_dma_id,
115117
mconfig->pipe->p_params->link_dma_id);
116118

117-
ret += snprintf(buf + ret, MOD_BUF - ret,
119+
ret += scnprintf(buf + ret, MOD_BUF - ret,
118120
"\tPCM params:\n\t\tCh %d\n\t\tFreq %d\n\t\tFormat %d\n",
119121
mconfig->pipe->p_params->ch,
120122
mconfig->pipe->p_params->s_freq,
121123
mconfig->pipe->p_params->s_fmt);
122124

123-
ret += snprintf(buf + ret, MOD_BUF - ret,
125+
ret += scnprintf(buf + ret, MOD_BUF - ret,
124126
"\tLink %#x\n\tStream %#x\n",
125127
mconfig->pipe->p_params->linktype,
126128
mconfig->pipe->p_params->stream);
127129

128-
ret += snprintf(buf + ret, MOD_BUF - ret,
130+
ret += scnprintf(buf + ret, MOD_BUF - ret,
129131
"\tState %d\n\tPassthru %s\n",
130132
mconfig->pipe->state,
131133
mconfig->pipe->passthru ? "true" : "false");
@@ -135,7 +137,7 @@ static ssize_t module_read(struct file *file, char __user *user_buf,
135137
ret += skl_print_pins(mconfig->m_out_pin, buf,
136138
mconfig->max_out_queue, ret, false);
137139

138-
ret += snprintf(buf + ret, MOD_BUF - ret,
140+
ret += scnprintf(buf + ret, MOD_BUF - ret,
139141
"Other:\n\tDomain %d\n\tHomogeneous Input %s\n\t"
140142
"Homogeneous Output %s\n\tIn Queue Mask %d\n\t"
141143
"Out Queue Mask %d\n\tDMA ID %d\n\tMem Pages %d\n\t"
@@ -191,7 +193,7 @@ static ssize_t fw_softreg_read(struct file *file, char __user *user_buf,
191193
__ioread32_copy(d->fw_read_buff, fw_reg_addr, w0_stat_sz >> 2);
192194

193195
for (offset = 0; offset < FW_REG_SIZE; offset += 16) {
194-
ret += snprintf(tmp + ret, FW_REG_BUF - ret, "%#.4x: ", offset);
196+
ret += scnprintf(tmp + ret, FW_REG_BUF - ret, "%#.4x: ", offset);
195197
hex_dump_to_buffer(d->fw_read_buff + offset, 16, 16, 4,
196198
tmp + ret, FW_REG_BUF - ret, 0);
197199
ret += strlen(tmp + ret);

sound/soc/intel/skylake/skl-ssp-clk.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,11 @@ static int skl_clk_dev_probe(struct platform_device *pdev)
384384
&clks[i], clk_pdata, i);
385385

386386
if (IS_ERR(data->clk[data->avail_clk_cnt])) {
387-
ret = PTR_ERR(data->clk[data->avail_clk_cnt++]);
387+
ret = PTR_ERR(data->clk[data->avail_clk_cnt]);
388388
goto err_unreg_skl_clk;
389389
}
390+
391+
data->avail_clk_cnt++;
390392
}
391393

392394
platform_set_drvdata(pdev, data);

sound/soc/meson/g12a-tohdmitx.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/module.h>
99
#include <sound/pcm_params.h>
1010
#include <linux/regmap.h>
11+
#include <linux/reset.h>
1112
#include <sound/soc.h>
1213
#include <sound/soc-dai.h>
1314

@@ -378,6 +379,11 @@ static int g12a_tohdmitx_probe(struct platform_device *pdev)
378379
struct device *dev = &pdev->dev;
379380
void __iomem *regs;
380381
struct regmap *map;
382+
int ret;
383+
384+
ret = device_reset(dev);
385+
if (ret)
386+
return ret;
381387

382388
regs = devm_platform_ioremap_resource(pdev, 0);
383389
if (IS_ERR(regs))

sound/soc/soc-component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream)
451451
int i, ret;
452452

453453
for_each_rtd_components(rtd, i, component) {
454-
if (component->driver->ioctl) {
454+
if (component->driver->sync_stop) {
455455
ret = component->driver->sync_stop(component,
456456
substream);
457457
if (ret < 0)

sound/soc/soc-compress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream)
299299
for_each_dpcm_be(fe, stream, dpcm)
300300
dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE;
301301

302-
snd_soc_dapm_stream_stop(fe, stream);
302+
dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP);
303303

304304
fe->dpcm[stream].state = SND_SOC_DPCM_STATE_CLOSE;
305305
fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_NO;

0 commit comments

Comments
 (0)