Skip to content

Commit bac4d82

Browse files
committed
Merge tag 'asoc-fix-v6.4-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.4 A collection of fixes for v6.4, mostly driver specific but there's also one fix for DPCM to avoid incorrectly repeated calls to prepare() which can trigger issues on some systems.
2 parents 81302b1 + 011a871 commit bac4d82

File tree

20 files changed

+101
-59
lines changed

20 files changed

+101
-59
lines changed

Documentation/devicetree/bindings/sound/tlv320aic32x4.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Required properties:
88
"ti,tlv320aic32x6" TLV320AIC3206, TLV320AIC3256
99
"ti,tas2505" TAS2505, TAS2521
1010
- reg: I2C slave address
11-
- supply-*: Required supply regulators are:
11+
- *-supply: Required supply regulators are:
1212
"iov" - digital IO power supply
1313
"ldoin" - LDO power supply
1414
"dv" - Digital core power supply

include/sound/soc-acpi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ struct snd_soc_acpi_link_adr {
170170
/* Descriptor for SST ASoC machine driver */
171171
struct snd_soc_acpi_mach {
172172
u8 id[ACPI_ID_LEN];
173+
const char *uid;
173174
const struct snd_soc_acpi_codecs *comp_ids;
174175
const u32 link_mask;
175176
const struct snd_soc_acpi_link_adr *links;

include/sound/soc-dpcm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe,
122122
int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe,
123123
struct snd_soc_pcm_runtime *be, int stream);
124124

125+
/* can this BE perform prepare */
126+
int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe,
127+
struct snd_soc_pcm_runtime *be, int stream);
128+
125129
/* is the current PCM operation for this FE ? */
126130
int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream);
127131

include/uapi/sound/skl-tplg-interface.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ enum skl_ch_cfg {
6666
SKL_CH_CFG_DUAL_MONO = 9,
6767
SKL_CH_CFG_I2S_DUAL_STEREO_0 = 10,
6868
SKL_CH_CFG_I2S_DUAL_STEREO_1 = 11,
69-
SKL_CH_CFG_4_CHANNEL = 12,
69+
SKL_CH_CFG_7_1 = 12,
70+
SKL_CH_CFG_4_CHANNEL = SKL_CH_CFG_7_1,
7071
SKL_CH_CFG_INVALID
7172
};
7273

sound/soc/codecs/cs35l41-lib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static const struct reg_default cs35l41_reg[] = {
4646
{ CS35L41_DSP1_RX5_SRC, 0x00000020 },
4747
{ CS35L41_DSP1_RX6_SRC, 0x00000021 },
4848
{ CS35L41_DSP1_RX7_SRC, 0x0000003A },
49-
{ CS35L41_DSP1_RX8_SRC, 0x00000001 },
49+
{ CS35L41_DSP1_RX8_SRC, 0x0000003B },
5050
{ CS35L41_NGATE1_SRC, 0x00000008 },
5151
{ CS35L41_NGATE2_SRC, 0x00000009 },
5252
{ CS35L41_AMP_DIG_VOL_CTRL, 0x00008000 },
@@ -58,8 +58,8 @@ static const struct reg_default cs35l41_reg[] = {
5858
{ CS35L41_IRQ1_MASK2, 0xFFFFFFFF },
5959
{ CS35L41_IRQ1_MASK3, 0xFFFF87FF },
6060
{ CS35L41_IRQ1_MASK4, 0xFEFFFFFF },
61-
{ CS35L41_GPIO1_CTRL1, 0xE1000001 },
62-
{ CS35L41_GPIO2_CTRL1, 0xE1000001 },
61+
{ CS35L41_GPIO1_CTRL1, 0x81000001 },
62+
{ CS35L41_GPIO2_CTRL1, 0x81000001 },
6363
{ CS35L41_MIXER_NGATE_CFG, 0x00000000 },
6464
{ CS35L41_MIXER_NGATE_CH1_CFG, 0x00000303 },
6565
{ CS35L41_MIXER_NGATE_CH2_CFG, 0x00000303 },

sound/soc/codecs/lpass-tx-macro.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ static int tx_macro_put_dec_enum(struct snd_kcontrol *kcontrol,
746746
struct tx_macro *tx = snd_soc_component_get_drvdata(component);
747747

748748
val = ucontrol->value.enumerated.item[0];
749+
if (val >= e->items)
750+
return -EINVAL;
749751

750752
switch (e->reg) {
751753
case CDC_TX_INP_MUX_ADC_MUX0_CFG0:
@@ -772,6 +774,9 @@ static int tx_macro_put_dec_enum(struct snd_kcontrol *kcontrol,
772774
case CDC_TX_INP_MUX_ADC_MUX7_CFG0:
773775
mic_sel_reg = CDC_TX7_TX_PATH_CFG0;
774776
break;
777+
default:
778+
dev_err(component->dev, "Error in configuration!!\n");
779+
return -EINVAL;
775780
}
776781

777782
if (val != 0) {

sound/soc/codecs/rt5682-i2c.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ static int rt5682_i2c_probe(struct i2c_client *i2c)
267267
ret = devm_request_threaded_irq(&i2c->dev, i2c->irq, NULL,
268268
rt5682_irq, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING
269269
| IRQF_ONESHOT, "rt5682", rt5682);
270-
if (ret)
270+
if (!ret)
271+
rt5682->irq = i2c->irq;
272+
else
271273
dev_err(&i2c->dev, "Failed to reguest IRQ: %d\n", ret);
272274
}
273275

sound/soc/codecs/rt5682.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,6 +2959,9 @@ static int rt5682_suspend(struct snd_soc_component *component)
29592959
if (rt5682->is_sdw)
29602960
return 0;
29612961

2962+
if (rt5682->irq)
2963+
disable_irq(rt5682->irq);
2964+
29622965
cancel_delayed_work_sync(&rt5682->jack_detect_work);
29632966
cancel_delayed_work_sync(&rt5682->jd_check_work);
29642967
if (rt5682->hs_jack && (rt5682->jack_type & SND_JACK_HEADSET) == SND_JACK_HEADSET) {
@@ -3027,6 +3030,9 @@ static int rt5682_resume(struct snd_soc_component *component)
30273030
mod_delayed_work(system_power_efficient_wq,
30283031
&rt5682->jack_detect_work, msecs_to_jiffies(0));
30293032

3033+
if (rt5682->irq)
3034+
enable_irq(rt5682->irq);
3035+
30303036
return 0;
30313037
}
30323038
#else

sound/soc/codecs/rt5682.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,7 @@ struct rt5682_priv {
14621462
int pll_out[RT5682_PLLS];
14631463

14641464
int jack_type;
1465+
int irq;
14651466
int irq_work_delay_time;
14661467
};
14671468

sound/soc/dwc/dwc-i2s.c

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -183,30 +183,6 @@ static void i2s_stop(struct dw_i2s_dev *dev,
183183
}
184184
}
185185

186-
static int dw_i2s_startup(struct snd_pcm_substream *substream,
187-
struct snd_soc_dai *cpu_dai)
188-
{
189-
struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(cpu_dai);
190-
union dw_i2s_snd_dma_data *dma_data = NULL;
191-
192-
if (!(dev->capability & DWC_I2S_RECORD) &&
193-
(substream->stream == SNDRV_PCM_STREAM_CAPTURE))
194-
return -EINVAL;
195-
196-
if (!(dev->capability & DWC_I2S_PLAY) &&
197-
(substream->stream == SNDRV_PCM_STREAM_PLAYBACK))
198-
return -EINVAL;
199-
200-
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
201-
dma_data = &dev->play_dma_data;
202-
else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
203-
dma_data = &dev->capture_dma_data;
204-
205-
snd_soc_dai_set_dma_data(cpu_dai, substream, (void *)dma_data);
206-
207-
return 0;
208-
}
209-
210186
static void dw_i2s_config(struct dw_i2s_dev *dev, int stream)
211187
{
212188
u32 ch_reg;
@@ -305,12 +281,6 @@ static int dw_i2s_hw_params(struct snd_pcm_substream *substream,
305281
return 0;
306282
}
307283

308-
static void dw_i2s_shutdown(struct snd_pcm_substream *substream,
309-
struct snd_soc_dai *dai)
310-
{
311-
snd_soc_dai_set_dma_data(dai, substream, NULL);
312-
}
313-
314284
static int dw_i2s_prepare(struct snd_pcm_substream *substream,
315285
struct snd_soc_dai *dai)
316286
{
@@ -382,8 +352,6 @@ static int dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
382352
}
383353

384354
static const struct snd_soc_dai_ops dw_i2s_dai_ops = {
385-
.startup = dw_i2s_startup,
386-
.shutdown = dw_i2s_shutdown,
387355
.hw_params = dw_i2s_hw_params,
388356
.prepare = dw_i2s_prepare,
389357
.trigger = dw_i2s_trigger,
@@ -625,6 +593,14 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
625593

626594
}
627595

596+
static int dw_i2s_dai_probe(struct snd_soc_dai *dai)
597+
{
598+
struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(dai);
599+
600+
snd_soc_dai_init_dma_data(dai, &dev->play_dma_data, &dev->capture_dma_data);
601+
return 0;
602+
}
603+
628604
static int dw_i2s_probe(struct platform_device *pdev)
629605
{
630606
const struct i2s_platform_data *pdata = pdev->dev.platform_data;
@@ -643,6 +619,7 @@ static int dw_i2s_probe(struct platform_device *pdev)
643619
return -ENOMEM;
644620

645621
dw_i2s_dai->ops = &dw_i2s_dai_ops;
622+
dw_i2s_dai->probe = dw_i2s_dai_probe;
646623

647624
dev->i2s_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
648625
if (IS_ERR(dev->i2s_base))

0 commit comments

Comments
 (0)