Skip to content

Commit a72ff08

Browse files
committed
Merge remote-tracking branch 'asoc/for-5.7' into asoc-linus
2 parents 9cb1fd0 + f4aa5e2 commit a72ff08

33 files changed

+186
-222
lines changed

Documentation/devicetree/bindings/sound/nau8825.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,5 @@ Example:
101101
nuvoton,crosstalk-enable;
102102

103103
clock-names = "mclk";
104-
clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_2>;
104+
clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_2>;
105105
};

Documentation/devicetree/bindings/sound/rt1308.txt

100755100644
File mode changed.

include/sound/soc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -790,9 +790,6 @@ struct snd_soc_dai_link {
790790
const struct snd_soc_pcm_stream *params;
791791
unsigned int num_params;
792792

793-
struct snd_soc_dapm_widget *playback_widget;
794-
struct snd_soc_dapm_widget *capture_widget;
795-
796793
unsigned int dai_fmt; /* format to set on init */
797794

798795
enum snd_soc_dpcm_trigger trigger[2]; /* trigger type for DPCM */
@@ -1156,6 +1153,9 @@ struct snd_soc_pcm_runtime {
11561153
struct snd_soc_dai **cpu_dais;
11571154
unsigned int num_cpus;
11581155

1156+
struct snd_soc_dapm_widget *playback_widget;
1157+
struct snd_soc_dapm_widget *capture_widget;
1158+
11591159
struct delayed_work delayed_work;
11601160
void (*close_delayed_work_func)(struct snd_soc_pcm_runtime *rtd);
11611161
#ifdef CONFIG_DEBUG_FS

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

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,6 @@ static int acp3x_dma_open(struct snd_soc_component *component,
241241
adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
242242
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
243243

244-
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
245-
adata->play_stream = substream;
246-
adata->i2ssp_play_stream = substream;
247-
} else {
248-
adata->capture_stream = substream;
249-
adata->i2ssp_capture_stream = substream;
250-
}
251-
252244
i2s_data->acp3x_base = adata->acp3x_base;
253245
runtime->private_data = i2s_data;
254246
return ret;
@@ -263,23 +255,42 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
263255
struct snd_soc_pcm_runtime *prtd;
264256
struct snd_soc_card *card;
265257
struct acp3x_platform_info *pinfo;
258+
struct i2s_dev_data *adata;
266259
u64 size;
267260

268261
prtd = substream->private_data;
269262
card = prtd->card;
270263
pinfo = snd_soc_card_get_drvdata(card);
264+
adata = dev_get_drvdata(component->dev);
271265
rtd = substream->runtime->private_data;
272266
if (!rtd)
273267
return -EINVAL;
274268

275-
if (pinfo)
276-
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
269+
if (pinfo) {
270+
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
277271
rtd->i2s_instance = pinfo->play_i2s_instance;
278-
else
272+
switch (rtd->i2s_instance) {
273+
case I2S_BT_INSTANCE:
274+
adata->play_stream = substream;
275+
break;
276+
case I2S_SP_INSTANCE:
277+
default:
278+
adata->i2ssp_play_stream = substream;
279+
}
280+
} else {
279281
rtd->i2s_instance = pinfo->cap_i2s_instance;
280-
else
282+
switch (rtd->i2s_instance) {
283+
case I2S_BT_INSTANCE:
284+
adata->capture_stream = substream;
285+
break;
286+
case I2S_SP_INSTANCE:
287+
default:
288+
adata->i2ssp_capture_stream = substream;
289+
}
290+
}
291+
} else {
281292
pr_err("pinfo failed\n");
282-
293+
}
283294
size = params_buffer_bytes(params);
284295
rtd->dma_addr = substream->dma_buffer.addr;
285296
rtd->num_pages = (PAGE_ALIGN(size) >> PAGE_SHIFT);

sound/soc/codecs/adau7118-i2c.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,20 @@ static const struct reg_default adau7118_reg_defaults[] = {
3232
{ ADAU7118_REG_RESET, 0x00 },
3333
};
3434

35+
static bool adau7118_volatile(struct device *dev, unsigned int reg)
36+
{
37+
return (reg == ADAU7118_REG_RESET);
38+
}
39+
40+
3541
static const struct regmap_config adau7118_regmap_config = {
3642
.reg_bits = 8,
3743
.val_bits = 8,
3844
.reg_defaults = adau7118_reg_defaults,
3945
.num_reg_defaults = ARRAY_SIZE(adau7118_reg_defaults),
4046
.cache_type = REGCACHE_RBTREE,
4147
.max_register = ADAU7118_REG_RESET,
48+
.volatile_reg = adau7118_volatile,
4249
};
4350

4451
static int adau7118_probe_i2c(struct i2c_client *i2c,

sound/soc/codecs/max9768.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,6 @@ static struct i2c_driver max9768_i2c_driver = {
220220
};
221221
module_i2c_driver(max9768_i2c_driver);
222222

223-
MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>");
223+
MODULE_AUTHOR("Wolfram Sang <kernel@pengutronix.de>");
224224
MODULE_DESCRIPTION("ASoC MAX9768 amplifier driver");
225225
MODULE_LICENSE("GPL v2");

sound/soc/codecs/max98373.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,8 @@ static int max98373_resume(struct device *dev)
850850
{
851851
struct max98373_priv *max98373 = dev_get_drvdata(dev);
852852

853-
max98373_reset(max98373, dev);
854853
regcache_cache_only(max98373->regmap, false);
854+
max98373_reset(max98373, dev);
855855
regcache_sync(max98373->regmap);
856856
return 0;
857857
}

sound/soc/codecs/max9867.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(max9867_micboost_tlv,
4646

4747
static const struct snd_kcontrol_new max9867_snd_controls[] = {
4848
SOC_DOUBLE_R_TLV("Master Playback Volume", MAX9867_LEFTVOL,
49-
MAX9867_RIGHTVOL, 0, 41, 1, max9867_master_tlv),
49+
MAX9867_RIGHTVOL, 0, 40, 1, max9867_master_tlv),
5050
SOC_DOUBLE_R_TLV("Line Capture Volume", MAX9867_LEFTLINELVL,
5151
MAX9867_RIGHTLINELVL, 0, 15, 1, max9867_line_tlv),
5252
SOC_DOUBLE_R_TLV("Mic Capture Volume", MAX9867_LEFTMICGAIN,
5353
MAX9867_RIGHTMICGAIN, 0, 20, 1, max9867_mic_tlv),
5454
SOC_DOUBLE_R_TLV("Mic Boost Capture Volume", MAX9867_LEFTMICGAIN,
55-
MAX9867_RIGHTMICGAIN, 5, 4, 0, max9867_micboost_tlv),
55+
MAX9867_RIGHTMICGAIN, 5, 3, 0, max9867_micboost_tlv),
5656
SOC_SINGLE("Digital Sidetone Volume", MAX9867_SIDETONE, 0, 31, 1),
5757
SOC_SINGLE_TLV("Digital Playback Volume", MAX9867_DACLEVEL, 0, 15, 1,
5858
max9867_dac_tlv),
5959
SOC_SINGLE_TLV("Digital Boost Playback Volume", MAX9867_DACLEVEL, 4, 3, 0,
6060
max9867_dacboost_tlv),
61-
SOC_DOUBLE_TLV("Digital Capture Volume", MAX9867_ADCLEVEL, 0, 4, 15, 1,
61+
SOC_DOUBLE_TLV("Digital Capture Volume", MAX9867_ADCLEVEL, 4, 0, 15, 1,
6262
max9867_adc_tlv),
6363
SOC_ENUM("Speaker Mode", max9867_spkmode),
6464
SOC_SINGLE("Volume Smoothing Switch", MAX9867_MODECONFIG, 6, 1, 0),

sound/soc/codecs/tlv320adcx140.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -511,11 +511,11 @@ static const struct snd_soc_dapm_route adcx140_audio_map[] = {
511511
static const struct snd_kcontrol_new adcx140_snd_controls[] = {
512512
SOC_SINGLE_TLV("Analog CH1 Mic Gain Volume", ADCX140_CH1_CFG1, 2, 42, 0,
513513
adc_tlv),
514-
SOC_SINGLE_TLV("Analog CH2 Mic Gain Volume", ADCX140_CH1_CFG2, 2, 42, 0,
514+
SOC_SINGLE_TLV("Analog CH2 Mic Gain Volume", ADCX140_CH2_CFG1, 2, 42, 0,
515515
adc_tlv),
516-
SOC_SINGLE_TLV("Analog CH3 Mic Gain Volume", ADCX140_CH1_CFG3, 2, 42, 0,
516+
SOC_SINGLE_TLV("Analog CH3 Mic Gain Volume", ADCX140_CH3_CFG1, 2, 42, 0,
517517
adc_tlv),
518-
SOC_SINGLE_TLV("Analog CH4 Mic Gain Volume", ADCX140_CH1_CFG4, 2, 42, 0,
518+
SOC_SINGLE_TLV("Analog CH4 Mic Gain Volume", ADCX140_CH4_CFG1, 2, 42, 0,
519519
adc_tlv),
520520

521521
SOC_SINGLE_TLV("DRE Threshold", ADCX140_DRE_CFG0, 4, 9, 0,
@@ -739,11 +739,12 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
739739
{
740740
struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(component);
741741
int sleep_cfg_val = ADCX140_WAKE_DEV;
742-
u8 bias_source;
743-
u8 vref_source;
742+
u32 bias_source;
743+
u32 vref_source;
744+
u8 bias_cfg;
744745
int ret;
745746

746-
ret = device_property_read_u8(adcx140->dev, "ti,mic-bias-source",
747+
ret = device_property_read_u32(adcx140->dev, "ti,mic-bias-source",
747748
&bias_source);
748749
if (ret)
749750
bias_source = ADCX140_MIC_BIAS_VAL_VREF;
@@ -754,7 +755,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
754755
return -EINVAL;
755756
}
756757

757-
ret = device_property_read_u8(adcx140->dev, "ti,vref-source",
758+
ret = device_property_read_u32(adcx140->dev, "ti,vref-source",
758759
&vref_source);
759760
if (ret)
760761
vref_source = ADCX140_MIC_BIAS_VREF_275V;
@@ -765,7 +766,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
765766
return -EINVAL;
766767
}
767768

768-
bias_source |= vref_source;
769+
bias_cfg = bias_source << ADCX140_MIC_BIAS_SHIFT | vref_source;
769770

770771
ret = adcx140_reset(adcx140);
771772
if (ret)
@@ -785,7 +786,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
785786

786787
ret = regmap_update_bits(adcx140->regmap, ADCX140_BIAS_CFG,
787788
ADCX140_MIC_BIAS_VAL_MSK |
788-
ADCX140_MIC_BIAS_VREF_MSK, bias_source);
789+
ADCX140_MIC_BIAS_VREF_MSK, bias_cfg);
789790
if (ret)
790791
dev_err(adcx140->dev, "setting MIC bias failed %d\n", ret);
791792
out:

sound/soc/codecs/tlv320adcx140.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
#define ADCX140_MIC_BIAS_VAL_VREF_1096 1
117117
#define ADCX140_MIC_BIAS_VAL_AVDD 6
118118
#define ADCX140_MIC_BIAS_VAL_MSK GENMASK(6, 4)
119+
#define ADCX140_MIC_BIAS_SHIFT 4
119120

120121
#define ADCX140_MIC_BIAS_VREF_275V 0
121122
#define ADCX140_MIC_BIAS_VREF_25V 1

0 commit comments

Comments
 (0)