Skip to content

Commit ddd5609

Browse files
committed
Merge tag 'asoc-fix-v5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.7 A collection of fixes that have been accumilated since the merge window, mainly relating to x86 platform support.
2 parents 3c6fd1f + ccfc531 commit ddd5609

File tree

23 files changed

+93
-28
lines changed

23 files changed

+93
-28
lines changed

Documentation/devicetree/bindings/sound/cirrus,cs42l51.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ required:
4949
examples:
5050
- |
5151
#include <dt-bindings/gpio/gpio.h>
52-
i2c@0 {
52+
i2c {
5353
#address-cells = <1>;
5454
#size-cells = <0>;
5555

include/sound/soc-dai.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ struct snd_soc_dai {
351351

352352
/* bit field */
353353
unsigned int probed:1;
354-
unsigned int started:1;
354+
unsigned int started[SNDRV_PCM_STREAM_LAST + 1];
355355
};
356356

357357
static inline struct snd_soc_pcm_stream *

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
139139
rv_writel(adata->tdm_fmt, rtd->acp3x_base + frmt_reg);
140140
}
141141
val = rv_readl(rtd->acp3x_base + reg_val);
142+
val &= ~ACP3x_ITER_IRER_SAMP_LEN_MASK;
142143
val = val | (rtd->xfer_resolution << 3);
143144
rv_writel(val, rtd->acp3x_base + reg_val);
144145
return 0;

sound/soc/amd/raven/acp3x.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@
7676
#define ACP_POWERED_OFF 0x02
7777
#define ACP_POWER_OFF_IN_PROGRESS 0x03
7878

79+
#define ACP3x_ITER_IRER_SAMP_LEN_MASK 0x38
80+
7981
struct acp3x_platform_info {
8082
u16 play_i2s_instance;
8183
u16 cap_i2s_instance;

sound/soc/bcm/bcm63xx-pcm-whistler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ bcm63xx_pcm_pointer(struct snd_soc_component *component,
181181
snd_pcm_uframes_t x;
182182
struct bcm63xx_runtime_data *prtd = substream->runtime->private_data;
183183

184-
if ((void *)prtd->dma_addr_next == NULL)
184+
if (!prtd->dma_addr_next)
185185
prtd->dma_addr_next = substream->runtime->dma_addr;
186186

187187
x = bytes_to_frames(substream->runtime,

sound/soc/codecs/cs4270.c

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ struct cs4270_private {
137137

138138
/* power domain regulators */
139139
struct regulator_bulk_data supplies[ARRAY_SIZE(supply_names)];
140+
141+
/* reset gpio */
142+
struct gpio_desc *reset_gpio;
140143
};
141144

142145
static const struct snd_soc_dapm_widget cs4270_dapm_widgets[] = {
@@ -648,6 +651,22 @@ static const struct regmap_config cs4270_regmap = {
648651
.volatile_reg = cs4270_reg_is_volatile,
649652
};
650653

654+
/**
655+
* cs4270_i2c_remove - deinitialize the I2C interface of the CS4270
656+
* @i2c_client: the I2C client object
657+
*
658+
* This function puts the chip into low power mode when the i2c device
659+
* is removed.
660+
*/
661+
static int cs4270_i2c_remove(struct i2c_client *i2c_client)
662+
{
663+
struct cs4270_private *cs4270 = i2c_get_clientdata(i2c_client);
664+
665+
gpiod_set_value_cansleep(cs4270->reset_gpio, 0);
666+
667+
return 0;
668+
}
669+
651670
/**
652671
* cs4270_i2c_probe - initialize the I2C interface of the CS4270
653672
* @i2c_client: the I2C client object
@@ -660,7 +679,6 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
660679
const struct i2c_device_id *id)
661680
{
662681
struct cs4270_private *cs4270;
663-
struct gpio_desc *reset_gpiod;
664682
unsigned int val;
665683
int ret, i;
666684

@@ -679,10 +697,21 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
679697
if (ret < 0)
680698
return ret;
681699

682-
reset_gpiod = devm_gpiod_get_optional(&i2c_client->dev, "reset",
683-
GPIOD_OUT_HIGH);
684-
if (PTR_ERR(reset_gpiod) == -EPROBE_DEFER)
685-
return -EPROBE_DEFER;
700+
/* reset the device */
701+
cs4270->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev, "reset",
702+
GPIOD_OUT_LOW);
703+
if (IS_ERR(cs4270->reset_gpio)) {
704+
dev_dbg(&i2c_client->dev, "Error getting CS4270 reset GPIO\n");
705+
return PTR_ERR(cs4270->reset_gpio);
706+
}
707+
708+
if (cs4270->reset_gpio) {
709+
dev_dbg(&i2c_client->dev, "Found reset GPIO\n");
710+
gpiod_set_value_cansleep(cs4270->reset_gpio, 1);
711+
}
712+
713+
/* Sleep 500ns before i2c communications */
714+
ndelay(500);
686715

687716
cs4270->regmap = devm_regmap_init_i2c(i2c_client, &cs4270_regmap);
688717
if (IS_ERR(cs4270->regmap))
@@ -735,6 +764,7 @@ static struct i2c_driver cs4270_i2c_driver = {
735764
},
736765
.id_table = cs4270_id,
737766
.probe = cs4270_i2c_probe,
767+
.remove = cs4270_i2c_remove,
738768
};
739769

740770
module_i2c_driver(cs4270_i2c_driver);

sound/soc/codecs/rt5645.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3758,6 +3758,14 @@ static const struct dmi_system_id dmi_platform_data[] = {
37583758
},
37593759
.driver_data = (void *)&kahlee_platform_data,
37603760
},
3761+
{
3762+
.ident = "Medion E1239T",
3763+
.matches = {
3764+
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "MEDION"),
3765+
DMI_MATCH(DMI_PRODUCT_NAME, "E1239T MD60568"),
3766+
},
3767+
.driver_data = (void *)&intel_braswell_platform_data,
3768+
},
37613769
{ }
37623770
};
37633771

sound/soc/codecs/rt5682.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3703,7 +3703,7 @@ static const struct acpi_device_id rt5682_acpi_match[] = {
37033703
MODULE_DEVICE_TABLE(acpi, rt5682_acpi_match);
37043704
#endif
37053705

3706-
static struct i2c_driver rt5682_i2c_driver = {
3706+
static struct i2c_driver __maybe_unused rt5682_i2c_driver = {
37073707
.driver = {
37083708
.name = "rt5682",
37093709
.of_match_table = of_match_ptr(rt5682_of_match),
@@ -3713,7 +3713,10 @@ static struct i2c_driver rt5682_i2c_driver = {
37133713
.shutdown = rt5682_i2c_shutdown,
37143714
.id_table = rt5682_i2c_id,
37153715
};
3716+
3717+
#ifdef CONFIG_I2C
37163718
module_i2c_driver(rt5682_i2c_driver);
3719+
#endif
37173720

37183721
MODULE_DESCRIPTION("ASoC RT5682 driver");
37193722
MODULE_AUTHOR("Bard Liao <[email protected]>");

sound/soc/intel/atom/sst-atom-controls.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ static int sst_fill_and_send_cmd_unlocked(struct sst_data *drv,
5050
{
5151
int ret = 0;
5252

53+
WARN_ON(!mutex_is_locked(&drv->lock));
54+
5355
ret = sst_fill_byte_control(drv, ipc_msg,
5456
block, task_id, pipe_id, len, cmd_data);
5557
if (ret < 0)
@@ -966,7 +968,9 @@ static int sst_set_be_modules(struct snd_soc_dapm_widget *w,
966968
dev_dbg(c->dev, "Enter: widget=%s\n", w->name);
967969

968970
if (SND_SOC_DAPM_EVENT_ON(event)) {
971+
mutex_lock(&drv->lock);
969972
ret = sst_send_slot_map(drv);
973+
mutex_unlock(&drv->lock);
970974
if (ret)
971975
return ret;
972976
ret = sst_send_pipe_module_params(w, k);

sound/soc/intel/atom/sst/sst_pvt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ int sst_prepare_and_post_msg(struct intel_sst_drv *sst,
223223
size_t mbox_data_len, const void *mbox_data, void **data,
224224
bool large, bool fill_dsp, bool sync, bool response)
225225
{
226+
struct sst_block *block = NULL;
226227
struct ipc_post *msg = NULL;
227228
struct ipc_dsp_hdr dsp_hdr;
228-
struct sst_block *block;
229229
int ret = 0, pvt_id;
230230

231231
pvt_id = sst_assign_pvt_id(sst);

0 commit comments

Comments
 (0)