Skip to content

Commit dad19af

Browse files
committed
Merge tag 'asoc-fix-v5.13-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.13 A collection of fixes that have come in since the merge window, mainly device specific things. The fixes to the generic cards from Morimoto-san are handling regressions that were introduced in the merge window on at least the Kontron sl28-var3-ads2.
2 parents 2b899f3 + af27025 commit dad19af

25 files changed

+202
-149
lines changed

include/sound/soc-dai.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct snd_compr_stream;
8181
#define SND_SOC_DAIFMT_CBP_CFP (1 << 12) /* codec clk provider & frame provider */
8282
#define SND_SOC_DAIFMT_CBC_CFP (2 << 12) /* codec clk consumer & frame provider */
8383
#define SND_SOC_DAIFMT_CBP_CFC (3 << 12) /* codec clk provider & frame consumer */
84-
#define SND_SOC_DAIFMT_CBC_CFC (4 << 12) /* codec clk consumer & frame follower */
84+
#define SND_SOC_DAIFMT_CBC_CFC (4 << 12) /* codec clk consumer & frame consumer */
8585

8686
/* previous definitions kept for backwards-compatibility, do not use in new contributions */
8787
#define SND_SOC_DAIFMT_CBM_CFM SND_SOC_DAIFMT_CBP_CFP

sound/soc/amd/raven/acp3x-pcm-dma.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,6 @@ static int acp3x_dma_open(struct snd_soc_component *component,
235235
return ret;
236236
}
237237

238-
if (!adata->play_stream && !adata->capture_stream &&
239-
!adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
240-
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
241-
242238
i2s_data->acp3x_base = adata->acp3x_base;
243239
runtime->private_data = i2s_data;
244240
return ret;
@@ -365,12 +361,6 @@ static int acp3x_dma_close(struct snd_soc_component *component,
365361
}
366362
}
367363

368-
/* Disable ACP irq, when the current stream is being closed and
369-
* another stream is also not active.
370-
*/
371-
if (!adata->play_stream && !adata->capture_stream &&
372-
!adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
373-
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
374364
return 0;
375365
}
376366

sound/soc/amd/raven/acp3x.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
#define ACP_POWER_OFF_IN_PROGRESS 0x03
7878

7979
#define ACP3x_ITER_IRER_SAMP_LEN_MASK 0x38
80+
#define ACP_EXT_INTR_STAT_CLEAR_MASK 0xFFFFFFFF
8081

8182
struct acp3x_platform_info {
8283
u16 play_i2s_instance;

sound/soc/amd/raven/pci-acp3x.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,19 @@ static int acp3x_reset(void __iomem *acp3x_base)
7676
return -ETIMEDOUT;
7777
}
7878

79+
static void acp3x_enable_interrupts(void __iomem *acp_base)
80+
{
81+
rv_writel(0x01, acp_base + mmACP_EXTERNAL_INTR_ENB);
82+
}
83+
84+
static void acp3x_disable_interrupts(void __iomem *acp_base)
85+
{
86+
rv_writel(ACP_EXT_INTR_STAT_CLEAR_MASK, acp_base +
87+
mmACP_EXTERNAL_INTR_STAT);
88+
rv_writel(0x00, acp_base + mmACP_EXTERNAL_INTR_CNTL);
89+
rv_writel(0x00, acp_base + mmACP_EXTERNAL_INTR_ENB);
90+
}
91+
7992
static int acp3x_init(struct acp3x_dev_data *adata)
8093
{
8194
void __iomem *acp3x_base = adata->acp3x_base;
@@ -93,13 +106,15 @@ static int acp3x_init(struct acp3x_dev_data *adata)
93106
pr_err("ACP3x reset failed\n");
94107
return ret;
95108
}
109+
acp3x_enable_interrupts(acp3x_base);
96110
return 0;
97111
}
98112

99113
static int acp3x_deinit(void __iomem *acp3x_base)
100114
{
101115
int ret;
102116

117+
acp3x_disable_interrupts(acp3x_base);
103118
/* Reset */
104119
ret = acp3x_reset(acp3x_base);
105120
if (ret) {

sound/soc/codecs/ak5558.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ static struct snd_soc_dai_driver ak5558_dai = {
307307
};
308308

309309
static struct snd_soc_dai_driver ak5552_dai = {
310-
.name = "ak5558-aif",
310+
.name = "ak5552-aif",
311311
.capture = {
312312
.stream_name = "Capture",
313313
.channels_min = 1,

sound/soc/codecs/cs35l32.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ static const struct regmap_config cs35l32_regmap = {
261261
.readable_reg = cs35l32_readable_register,
262262
.precious_reg = cs35l32_precious_register,
263263
.cache_type = REGCACHE_RBTREE,
264+
265+
.use_single_read = true,
266+
.use_single_write = true,
264267
};
265268

266269
static int cs35l32_handle_of_data(struct i2c_client *i2c_client,

sound/soc/codecs/cs35l33.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,
12011201
dev_err(&i2c_client->dev,
12021202
"CS35L33 Device ID (%X). Expected ID %X\n",
12031203
devid, CS35L33_CHIP_ID);
1204+
ret = -EINVAL;
12041205
goto err_enable;
12051206
}
12061207

sound/soc/codecs/cs35l34.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,9 @@ static struct regmap_config cs35l34_regmap = {
800800
.readable_reg = cs35l34_readable_register,
801801
.precious_reg = cs35l34_precious_register,
802802
.cache_type = REGCACHE_RBTREE,
803+
804+
.use_single_read = true,
805+
.use_single_write = true,
803806
};
804807

805808
static int cs35l34_handle_of_data(struct i2c_client *i2c_client,

sound/soc/codecs/cs42l42.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,9 @@ static const struct regmap_config cs42l42_regmap = {
399399
.reg_defaults = cs42l42_reg_defaults,
400400
.num_reg_defaults = ARRAY_SIZE(cs42l42_reg_defaults),
401401
.cache_type = REGCACHE_RBTREE,
402+
403+
.use_single_read = true,
404+
.use_single_write = true,
402405
};
403406

404407
static DECLARE_TLV_DB_SCALE(adc_tlv, -9600, 100, false);

sound/soc/codecs/cs42l56.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client,
11751175
struct cs42l56_platform_data *pdata =
11761176
dev_get_platdata(&i2c_client->dev);
11771177
int ret, i;
1178-
unsigned int devid = 0;
1178+
unsigned int devid;
11791179
unsigned int alpha_rev, metal_rev;
11801180
unsigned int reg;
11811181

@@ -1245,6 +1245,11 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client,
12451245
}
12461246

12471247
ret = regmap_read(cs42l56->regmap, CS42L56_CHIP_ID_1, &reg);
1248+
if (ret) {
1249+
dev_err(&i2c_client->dev, "Failed to read chip ID: %d\n", ret);
1250+
return ret;
1251+
}
1252+
12481253
devid = reg & CS42L56_CHIP_ID_MASK;
12491254
if (devid != CS42L56_DEVID) {
12501255
dev_err(&i2c_client->dev,

0 commit comments

Comments
 (0)