Skip to content

Commit 8566645

Browse files
committed
Merge remote-tracking branch 'asoc/for-5.14' into asoc-linus
2 parents 2734d6c + 82d28b6 commit 8566645

16 files changed

Lines changed: 152 additions & 88 deletions

File tree

Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ properties:
114114

115115
ports:
116116
$ref: /schemas/graph.yaml#/properties/ports
117-
properties:
117+
patternProperties:
118118
port(@[0-9a-f]+)?:
119119
$ref: audio-graph-port.yaml#
120120
unevaluatedProperties: false

include/sound/soc.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,12 @@ struct snd_soc_dai_link {
712712
/* Do not create a PCM for this DAI link (Backend link) */
713713
unsigned int ignore:1;
714714

715+
/* This flag will reorder stop sequence. By enabling this flag
716+
* DMA controller stop sequence will be invoked first followed by
717+
* CPU DAI driver stop sequence
718+
*/
719+
unsigned int stop_dma_first:1;
720+
715721
#ifdef CONFIG_SND_SOC_TOPOLOGY
716722
struct snd_soc_dobj dobj; /* For topology */
717723
#endif

sound/soc/amd/acp-da7219-max98357a.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
576576
| SND_SOC_DAIFMT_CBM_CFM,
577577
.init = cz_rt5682_init,
578578
.dpcm_playback = 1,
579+
.stop_dma_first = 1,
579580
.ops = &cz_rt5682_play_ops,
580581
SND_SOC_DAILINK_REG(designware1, rt5682, platform),
581582
},
@@ -585,6 +586,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
585586
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
586587
| SND_SOC_DAIFMT_CBM_CFM,
587588
.dpcm_capture = 1,
589+
.stop_dma_first = 1,
588590
.ops = &cz_rt5682_cap_ops,
589591
SND_SOC_DAILINK_REG(designware2, rt5682, platform),
590592
},
@@ -594,6 +596,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
594596
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
595597
| SND_SOC_DAIFMT_CBM_CFM,
596598
.dpcm_playback = 1,
599+
.stop_dma_first = 1,
597600
.ops = &cz_rt5682_max_play_ops,
598601
SND_SOC_DAILINK_REG(designware3, mx, platform),
599602
},
@@ -604,6 +607,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
604607
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
605608
| SND_SOC_DAIFMT_CBM_CFM,
606609
.dpcm_capture = 1,
610+
.stop_dma_first = 1,
607611
.ops = &cz_rt5682_dmic0_cap_ops,
608612
SND_SOC_DAILINK_REG(designware3, adau, platform),
609613
},
@@ -614,6 +618,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
614618
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
615619
| SND_SOC_DAIFMT_CBM_CFM,
616620
.dpcm_capture = 1,
621+
.stop_dma_first = 1,
617622
.ops = &cz_rt5682_dmic1_cap_ops,
618623
SND_SOC_DAILINK_REG(designware2, adau, platform),
619624
},

sound/soc/codecs/Kconfig

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ config SND_SOC_SSM2305
13251325
high-efficiency mono Class-D audio power amplifiers.
13261326

13271327
config SND_SOC_SSM2518
1328-
tristate
1328+
tristate "Analog Devices SSM2518 Class-D Amplifier"
13291329
depends on I2C
13301330

13311331
config SND_SOC_SSM2602
@@ -1557,6 +1557,7 @@ config SND_SOC_WCD934X
15571557
Qualcomm SoCs like SDM845.
15581558

15591559
config SND_SOC_WCD938X
1560+
depends on SND_SOC_WCD938X_SDW
15601561
tristate
15611562

15621563
config SND_SOC_WCD938X_SDW
@@ -1813,11 +1814,6 @@ config SND_SOC_ZL38060
18131814
which consists of a Digital Signal Processor (DSP), several Digital
18141815
Audio Interfaces (DAIs), analog outputs, and a block of 14 GPIOs.
18151816

1816-
config SND_SOC_ZX_AUD96P22
1817-
tristate "ZTE ZX AUD96P22 CODEC"
1818-
depends on I2C
1819-
select REGMAP_I2C
1820-
18211817
# Amp
18221818
config SND_SOC_LM4857
18231819
tristate

sound/soc/codecs/rt5631.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,8 @@ static const struct regmap_config rt5631_regmap_config = {
16951695
.reg_defaults = rt5631_reg,
16961696
.num_reg_defaults = ARRAY_SIZE(rt5631_reg),
16971697
.cache_type = REGCACHE_RBTREE,
1698+
.use_single_read = true,
1699+
.use_single_write = true,
16981700
};
16991701

17001702
static int rt5631_i2c_probe(struct i2c_client *i2c,

sound/soc/codecs/rt5682.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,10 +973,14 @@ int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert)
973973
rt5682_enable_push_button_irq(component, false);
974974
snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_1,
975975
RT5682_TRIG_JD_MASK, RT5682_TRIG_JD_LOW);
976-
if (!snd_soc_dapm_get_pin_status(dapm, "MICBIAS"))
976+
if (!snd_soc_dapm_get_pin_status(dapm, "MICBIAS") &&
977+
!snd_soc_dapm_get_pin_status(dapm, "PLL1") &&
978+
!snd_soc_dapm_get_pin_status(dapm, "PLL2B"))
977979
snd_soc_component_update_bits(component,
978980
RT5682_PWR_ANLG_1, RT5682_PWR_MB, 0);
979-
if (!snd_soc_dapm_get_pin_status(dapm, "Vref2"))
981+
if (!snd_soc_dapm_get_pin_status(dapm, "Vref2") &&
982+
!snd_soc_dapm_get_pin_status(dapm, "PLL1") &&
983+
!snd_soc_dapm_get_pin_status(dapm, "PLL2B"))
980984
snd_soc_component_update_bits(component,
981985
RT5682_PWR_ANLG_1, RT5682_PWR_VREF2, 0);
982986
snd_soc_component_update_bits(component, RT5682_PWR_ANLG_3,

sound/soc/codecs/tlv320aic31xx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,8 @@ static int aic31xx_i2c_probe(struct i2c_client *i2c,
16041604
ret);
16051605
return ret;
16061606
}
1607+
regcache_cache_only(aic31xx->regmap, true);
1608+
16071609
aic31xx->dev = &i2c->dev;
16081610
aic31xx->irq = i2c->irq;
16091611

sound/soc/codecs/tlv320aic31xx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ struct aic31xx_pdata {
151151
#define AIC31XX_WORD_LEN_24BITS 0x02
152152
#define AIC31XX_WORD_LEN_32BITS 0x03
153153
#define AIC31XX_IFACE1_MASTER_MASK GENMASK(3, 2)
154-
#define AIC31XX_BCLK_MASTER BIT(2)
155-
#define AIC31XX_WCLK_MASTER BIT(3)
154+
#define AIC31XX_BCLK_MASTER BIT(3)
155+
#define AIC31XX_WCLK_MASTER BIT(2)
156156

157157
/* AIC31XX_DATA_OFFSET */
158158
#define AIC31XX_DATA_OFFSET_MASK GENMASK(7, 0)

sound/soc/codecs/tlv320aic32x4.c

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ static DECLARE_TLV_DB_SCALE(tlv_pcm, -6350, 50, 0);
250250
static DECLARE_TLV_DB_SCALE(tlv_driver_gain, -600, 100, 0);
251251
/* -12dB min, 0.5dB steps */
252252
static DECLARE_TLV_DB_SCALE(tlv_adc_vol, -1200, 50, 0);
253-
254-
static DECLARE_TLV_DB_LINEAR(tlv_spk_vol, TLV_DB_GAIN_MUTE, 0);
253+
/* -6dB min, 1dB steps */
254+
static DECLARE_TLV_DB_SCALE(tlv_tas_driver_gain, -5850, 50, 0);
255255
static DECLARE_TLV_DB_SCALE(tlv_amp_vol, 0, 600, 1);
256256

257257
static const char * const lo_cm_text[] = {
@@ -1063,21 +1063,20 @@ static const struct snd_soc_component_driver soc_component_dev_aic32x4 = {
10631063
};
10641064

10651065
static const struct snd_kcontrol_new aic32x4_tas2505_snd_controls[] = {
1066-
SOC_DOUBLE_R_S_TLV("PCM Playback Volume", AIC32X4_LDACVOL,
1067-
AIC32X4_LDACVOL, 0, -0x7f, 0x30, 7, 0, tlv_pcm),
1066+
SOC_SINGLE_S8_TLV("PCM Playback Volume",
1067+
AIC32X4_LDACVOL, -0x7f, 0x30, tlv_pcm),
10681068
SOC_ENUM("DAC Playback PowerTune Switch", l_ptm_enum),
1069-
SOC_DOUBLE_R_S_TLV("HP Driver Playback Volume", AIC32X4_HPLGAIN,
1070-
AIC32X4_HPLGAIN, 0, -0x6, 0x1d, 5, 0,
1071-
tlv_driver_gain),
1072-
SOC_DOUBLE_R("HP DAC Playback Switch", AIC32X4_HPLGAIN,
1073-
AIC32X4_HPLGAIN, 6, 0x01, 1),
10741069

1075-
SOC_SINGLE("Auto-mute Switch", AIC32X4_DACMUTE, 4, 7, 0),
1070+
SOC_SINGLE_TLV("HP Driver Gain Volume",
1071+
AIC32X4_HPLGAIN, 0, 0x74, 1, tlv_tas_driver_gain),
1072+
SOC_SINGLE("HP DAC Playback Switch", AIC32X4_HPLGAIN, 6, 1, 1),
10761073

1077-
SOC_SINGLE_RANGE_TLV("Speaker Driver Playback Volume", TAS2505_SPKVOL1,
1078-
0, 0, 117, 1, tlv_spk_vol),
1079-
SOC_SINGLE_TLV("Speaker Amplifier Playback Volume", TAS2505_SPKVOL2,
1080-
4, 5, 0, tlv_amp_vol),
1074+
SOC_SINGLE_TLV("Speaker Driver Playback Volume",
1075+
TAS2505_SPKVOL1, 0, 0x74, 1, tlv_tas_driver_gain),
1076+
SOC_SINGLE_TLV("Speaker Amplifier Playback Volume",
1077+
TAS2505_SPKVOL2, 4, 5, 0, tlv_amp_vol),
1078+
1079+
SOC_SINGLE("Auto-mute Switch", AIC32X4_DACMUTE, 4, 7, 0),
10811080
};
10821081

10831082
static const struct snd_kcontrol_new hp_output_mixer_controls[] = {

sound/soc/codecs/wcd938x.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3317,13 +3317,6 @@ static int wcd938x_soc_codec_probe(struct snd_soc_component *component)
33173317
(WCD938X_DIGITAL_INTR_LEVEL_0 + i), 0);
33183318
}
33193319

3320-
ret = wcd938x_irq_init(wcd938x, component->dev);
3321-
if (ret) {
3322-
dev_err(component->dev, "%s: IRQ init failed: %d\n",
3323-
__func__, ret);
3324-
return ret;
3325-
}
3326-
33273320
wcd938x->hphr_pdm_wd_int = regmap_irq_get_virq(wcd938x->irq_chip,
33283321
WCD938X_IRQ_HPHR_PDM_WD_INT);
33293322
wcd938x->hphl_pdm_wd_int = regmap_irq_get_virq(wcd938x->irq_chip,
@@ -3553,7 +3546,6 @@ static int wcd938x_bind(struct device *dev)
35533546
}
35543547
wcd938x->sdw_priv[AIF1_PB] = dev_get_drvdata(wcd938x->rxdev);
35553548
wcd938x->sdw_priv[AIF1_PB]->wcd938x = wcd938x;
3556-
wcd938x->sdw_priv[AIF1_PB]->slave_irq = wcd938x->virq;
35573549

35583550
wcd938x->txdev = wcd938x_sdw_device_get(wcd938x->txnode);
35593551
if (!wcd938x->txdev) {
@@ -3562,7 +3554,6 @@ static int wcd938x_bind(struct device *dev)
35623554
}
35633555
wcd938x->sdw_priv[AIF1_CAP] = dev_get_drvdata(wcd938x->txdev);
35643556
wcd938x->sdw_priv[AIF1_CAP]->wcd938x = wcd938x;
3565-
wcd938x->sdw_priv[AIF1_CAP]->slave_irq = wcd938x->virq;
35663557
wcd938x->tx_sdw_dev = dev_to_sdw_dev(wcd938x->txdev);
35673558
if (!wcd938x->tx_sdw_dev) {
35683559
dev_err(dev, "could not get txslave with matching of dev\n");
@@ -3595,6 +3586,15 @@ static int wcd938x_bind(struct device *dev)
35953586
return PTR_ERR(wcd938x->regmap);
35963587
}
35973588

3589+
ret = wcd938x_irq_init(wcd938x, dev);
3590+
if (ret) {
3591+
dev_err(dev, "%s: IRQ init failed: %d\n", __func__, ret);
3592+
return ret;
3593+
}
3594+
3595+
wcd938x->sdw_priv[AIF1_PB]->slave_irq = wcd938x->virq;
3596+
wcd938x->sdw_priv[AIF1_CAP]->slave_irq = wcd938x->virq;
3597+
35983598
ret = wcd938x_set_micbias_data(wcd938x);
35993599
if (ret < 0) {
36003600
dev_err(dev, "%s: bad micbias pdata\n", __func__);

0 commit comments

Comments
 (0)