Skip to content

Commit ecae4c8

Browse files
committed
Merge tag 'asoc-fix-v6.1-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.1 A clutch of small fixes that have come in in the past week, people seem to have been unusually active for this late in the release cycle. The most critical one here is the fix to renumber the SOF DAI types in order to restore ABI compatibility which was broken by the addition of AMD support.
2 parents 05530ef + db8f91d commit ecae4c8

File tree

8 files changed

+20
-10
lines changed

8 files changed

+20
-10
lines changed

include/sound/sof/dai.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ enum sof_ipc_dai_type {
8484
SOF_DAI_AMD_BT, /**< AMD ACP BT*/
8585
SOF_DAI_AMD_SP, /**< AMD ACP SP */
8686
SOF_DAI_AMD_DMIC, /**< AMD ACP DMIC */
87-
SOF_DAI_AMD_HS, /**< Amd HS */
8887
SOF_DAI_MEDIATEK_AFE, /**< Mediatek AFE */
88+
SOF_DAI_AMD_HS, /**< Amd HS */
8989
};
9090

9191
/* general purpose DAI configuration */

sound/soc/codecs/hdac_hda.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ enum {
1414
HDAC_HDMI_1_DAI_ID,
1515
HDAC_HDMI_2_DAI_ID,
1616
HDAC_HDMI_3_DAI_ID,
17-
HDAC_LAST_DAI_ID = HDAC_HDMI_3_DAI_ID,
17+
HDAC_DAI_ID_NUM
1818
};
1919

2020
struct hdac_hda_pcm {
@@ -24,7 +24,7 @@ struct hdac_hda_pcm {
2424

2525
struct hdac_hda_priv {
2626
struct hda_codec *codec;
27-
struct hdac_hda_pcm pcm[HDAC_LAST_DAI_ID];
27+
struct hdac_hda_pcm pcm[HDAC_DAI_ID_NUM];
2828
bool need_display_power;
2929
};
3030

sound/soc/codecs/max98373-i2c.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,10 @@ static int max98373_i2c_probe(struct i2c_client *i2c)
549549
max98373->cache = devm_kcalloc(&i2c->dev, max98373->cache_num,
550550
sizeof(*max98373->cache),
551551
GFP_KERNEL);
552+
if (!max98373->cache) {
553+
ret = -ENOMEM;
554+
return ret;
555+
}
552556

553557
for (i = 0; i < max98373->cache_num; i++)
554558
max98373->cache[i].reg = max98373_i2c_cache_reg[i];

sound/soc/codecs/rt711-sdca-sdw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static int rt711_sdca_read_prop(struct sdw_slave *slave)
230230
}
231231

232232
/* set the timeout values */
233-
prop->clk_stop_timeout = 20;
233+
prop->clk_stop_timeout = 700;
234234

235235
/* wake-up event */
236236
prop->wake_capable = 1;

sound/soc/codecs/sgtl5000.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,6 +1794,7 @@ static void sgtl5000_i2c_remove(struct i2c_client *client)
17941794
{
17951795
struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client);
17961796

1797+
regmap_write(sgtl5000->regmap, SGTL5000_CHIP_CLK_CTRL, SGTL5000_CHIP_CLK_CTRL_DEFAULT);
17971798
regmap_write(sgtl5000->regmap, SGTL5000_CHIP_DIG_POWER, SGTL5000_DIG_POWER_DEFAULT);
17981799
regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, SGTL5000_ANA_POWER_DEFAULT);
17991800

sound/soc/codecs/wm8962.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,6 +2503,14 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
25032503
snd_soc_component_update_bits(component, WM8962_CLOCKING2,
25042504
WM8962_SYSCLK_ENA_MASK, WM8962_SYSCLK_ENA);
25052505

2506+
/* DSPCLK_DIV field in WM8962_CLOCKING1 register is used to generate
2507+
* correct frequency of LRCLK and BCLK. Sometimes the read-only value
2508+
* can't be updated timely after enabling SYSCLK. This results in wrong
2509+
* calculation values. Delay is introduced here to wait for newest
2510+
* value from register. The time of the delay should be at least
2511+
* 500~1000us according to test.
2512+
*/
2513+
usleep_range(500, 1000);
25062514
dspclk = snd_soc_component_read(component, WM8962_CLOCKING1);
25072515

25082516
if (snd_soc_component_get_bias_level(component) != SND_SOC_BIAS_ON)

sound/soc/soc-pcm.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -822,11 +822,6 @@ static int __soc_pcm_open(struct snd_soc_pcm_runtime *rtd,
822822
ret = snd_soc_dai_startup(dai, substream);
823823
if (ret < 0)
824824
goto err;
825-
826-
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
827-
dai->tx_mask = 0;
828-
else
829-
dai->rx_mask = 0;
830825
}
831826

832827
/* Dynamic PCM DAI links compat checks use dynamic capabilities */
@@ -1252,6 +1247,8 @@ static void dpcm_be_reparent(struct snd_soc_pcm_runtime *fe,
12521247
return;
12531248

12541249
be_substream = snd_soc_dpcm_get_substream(be, stream);
1250+
if (!be_substream)
1251+
return;
12551252

12561253
for_each_dpcm_fe(be, stream, dpcm) {
12571254
if (dpcm->fe == fe)

sound/soc/stm/stm32_i2s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev,
10771077
if (irq < 0)
10781078
return irq;
10791079

1080-
ret = devm_request_irq(&pdev->dev, irq, stm32_i2s_isr, IRQF_ONESHOT,
1080+
ret = devm_request_irq(&pdev->dev, irq, stm32_i2s_isr, 0,
10811081
dev_name(&pdev->dev), i2s);
10821082
if (ret) {
10831083
dev_err(&pdev->dev, "irq request returned %d\n", ret);

0 commit comments

Comments
 (0)