Skip to content

Commit 2ddaa67

Browse files
committed
Merge remote-tracking branches 'asoc/fix/rt5665', 'asoc/fix/simple', 'asoc/fix/sti' and 'asoc/fix/sun8i' into asoc-linus
5 parents 367b130 + 83749ab + 971edb0 + 3c9d3f1 + eb3abae commit 2ddaa67

File tree

6 files changed

+44
-43
lines changed

6 files changed

+44
-43
lines changed

arch/arm/boot/dts/sun8i-a33.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
simple-audio-card,mclk-fs = <512>;
114114
simple-audio-card,aux-devs = <&codec_analog>;
115115
simple-audio-card,routing =
116-
"Left DAC", "Digital Left DAC",
117-
"Right DAC", "Digital Right DAC";
116+
"Left DAC", "AIF1 Slot 0 Left",
117+
"Right DAC", "AIF1 Slot 0 Right";
118118
status = "disabled";
119119

120120
simple-audio-card,cpu {

sound/soc/codecs/rt5665.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ static irqreturn_t rt5665_irq(int irq, void *data)
12411241
static void rt5665_jd_check_handler(struct work_struct *work)
12421242
{
12431243
struct rt5665_priv *rt5665 = container_of(work, struct rt5665_priv,
1244-
calibrate_work.work);
1244+
jd_check_work.work);
12451245

12461246
if (snd_soc_read(rt5665->codec, RT5665_AJD1_CTRL) & 0x0010) {
12471247
/* jack out */
@@ -2252,7 +2252,7 @@ static const char * const rt5665_if2_1_adc_in_src[] = {
22522252

22532253
static const SOC_ENUM_SINGLE_DECL(
22542254
rt5665_if2_1_adc_in_enum, RT5665_DIG_INF2_DATA,
2255-
RT5665_IF3_ADC_IN_SFT, rt5665_if2_1_adc_in_src);
2255+
RT5665_IF2_1_ADC_IN_SFT, rt5665_if2_1_adc_in_src);
22562256

22572257
static const struct snd_kcontrol_new rt5665_if2_1_adc_in_mux =
22582258
SOC_DAPM_ENUM("IF2_1 ADC IN Source", rt5665_if2_1_adc_in_enum);
@@ -3178,6 +3178,9 @@ static const struct snd_soc_dapm_route rt5665_dapm_routes[] = {
31783178
{"DAC Mono Right Filter", NULL, "DAC Mono R ASRC", is_using_asrc},
31793179
{"DAC Stereo1 Filter", NULL, "DAC STO1 ASRC", is_using_asrc},
31803180
{"DAC Stereo2 Filter", NULL, "DAC STO2 ASRC", is_using_asrc},
3181+
{"I2S1 ASRC", NULL, "CLKDET"},
3182+
{"I2S2 ASRC", NULL, "CLKDET"},
3183+
{"I2S3 ASRC", NULL, "CLKDET"},
31813184

31823185
/*Vref*/
31833186
{"Mic Det Power", NULL, "Vref2"},
@@ -3912,6 +3915,7 @@ static const struct snd_soc_dapm_route rt5665_dapm_routes[] = {
39123915
{"Mono MIX", "MONOVOL Switch", "MONOVOL"},
39133916
{"Mono Amp", NULL, "Mono MIX"},
39143917
{"Mono Amp", NULL, "Vref2"},
3918+
{"Mono Amp", NULL, "Vref3"},
39153919
{"Mono Amp", NULL, "CLKDET SYS"},
39163920
{"Mono Amp", NULL, "CLKDET MONO"},
39173921
{"Mono Playback", "Switch", "Mono Amp"},
@@ -4798,7 +4802,7 @@ static int rt5665_i2c_probe(struct i2c_client *i2c,
47984802
/* Enhance performance*/
47994803
regmap_update_bits(rt5665->regmap, RT5665_PWR_ANLG_1,
48004804
RT5665_HP_DRIVER_MASK | RT5665_LDO1_DVO_MASK,
4801-
RT5665_HP_DRIVER_5X | RT5665_LDO1_DVO_09);
4805+
RT5665_HP_DRIVER_5X | RT5665_LDO1_DVO_12);
48024806

48034807
INIT_DELAYED_WORK(&rt5665->jack_detect_work,
48044808
rt5665_jack_detect_handler);

sound/soc/codecs/rt5665.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@
11061106
#define RT5665_HP_DRIVER_MASK (0x3 << 2)
11071107
#define RT5665_HP_DRIVER_1X (0x0 << 2)
11081108
#define RT5665_HP_DRIVER_3X (0x1 << 2)
1109-
#define RT5665_HP_DRIVER_5X (0x2 << 2)
1109+
#define RT5665_HP_DRIVER_5X (0x3 << 2)
11101110
#define RT5665_LDO1_DVO_MASK (0x3)
11111111
#define RT5665_LDO1_DVO_09 (0x0)
11121112
#define RT5665_LDO1_DVO_10 (0x1)

sound/soc/generic/simple-card-utils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ int asoc_simple_card_parse_clk(struct device *dev,
115115
clk = devm_get_clk_from_child(dev, node, NULL);
116116
if (!IS_ERR(clk)) {
117117
simple_dai->sysclk = clk_get_rate(clk);
118+
simple_dai->clk = clk;
118119
} else if (!of_property_read_u32(node, "system-clock-frequency", &val)) {
119120
simple_dai->sysclk = val;
120121
} else {

sound/soc/sti/uniperif_reader.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ static int uni_reader_startup(struct snd_pcm_substream *substream,
349349
struct uniperif *reader = priv->dai_data.uni;
350350
int ret;
351351

352+
reader->substream = substream;
353+
352354
if (!UNIPERIF_TYPE_IS_TDM(reader))
353355
return 0;
354356

@@ -378,6 +380,7 @@ static void uni_reader_shutdown(struct snd_pcm_substream *substream,
378380
/* Stop the reader */
379381
uni_reader_stop(reader);
380382
}
383+
reader->substream = NULL;
381384
}
382385

383386
static const struct snd_soc_dai_ops uni_reader_dai_ops = {

sound/soc/sunxi/sun8i-codec.c

Lines changed: 30 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -259,25 +259,20 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
259259
return 0;
260260
}
261261

262-
static const struct snd_kcontrol_new sun8i_output_left_mixer_controls[] = {
263-
SOC_DAPM_SINGLE("LSlot 0", SUN8I_DAC_MXR_SRC,
264-
SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L, 1, 0),
265-
SOC_DAPM_SINGLE("LSlot 1", SUN8I_DAC_MXR_SRC,
266-
SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L, 1, 0),
267-
SOC_DAPM_SINGLE("DACL", SUN8I_DAC_MXR_SRC,
268-
SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL, 1, 0),
269-
SOC_DAPM_SINGLE("ADCL", SUN8I_DAC_MXR_SRC,
270-
SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL, 1, 0),
271-
};
272-
273-
static const struct snd_kcontrol_new sun8i_output_right_mixer_controls[] = {
274-
SOC_DAPM_SINGLE("RSlot 0", SUN8I_DAC_MXR_SRC,
262+
static const struct snd_kcontrol_new sun8i_dac_mixer_controls[] = {
263+
SOC_DAPM_DOUBLE("AIF1 Slot 0 Digital DAC Playback Switch",
264+
SUN8I_DAC_MXR_SRC,
265+
SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA0L,
275266
SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA0R, 1, 0),
276-
SOC_DAPM_SINGLE("RSlot 1", SUN8I_DAC_MXR_SRC,
267+
SOC_DAPM_DOUBLE("AIF1 Slot 1 Digital DAC Playback Switch",
268+
SUN8I_DAC_MXR_SRC,
269+
SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF1DA1L,
277270
SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF1DA1R, 1, 0),
278-
SOC_DAPM_SINGLE("DACR", SUN8I_DAC_MXR_SRC,
271+
SOC_DAPM_DOUBLE("AIF2 Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
272+
SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_AIF2DACL,
279273
SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_AIF2DACR, 1, 0),
280-
SOC_DAPM_SINGLE("ADCR", SUN8I_DAC_MXR_SRC,
274+
SOC_DAPM_DOUBLE("ADC Digital DAC Playback Switch", SUN8I_DAC_MXR_SRC,
275+
SUN8I_DAC_MXR_SRC_DACL_MXR_SRC_ADCL,
281276
SUN8I_DAC_MXR_SRC_DACR_MXR_SRC_ADCR, 1, 0),
282277
};
283278

@@ -286,19 +281,21 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
286281
SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
287282
0, NULL, 0),
288283

289-
/* Analog DAC */
290-
SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
291-
SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
292-
SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
293-
SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
284+
/* Analog DAC AIF */
285+
SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
286+
SUN8I_AIF1_DACDAT_CTRL,
287+
SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
288+
SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
289+
SUN8I_AIF1_DACDAT_CTRL,
290+
SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
294291

295292
/* DAC Mixers */
296-
SND_SOC_DAPM_MIXER("Left DAC Mixer", SND_SOC_NOPM, 0, 0,
297-
sun8i_output_left_mixer_controls,
298-
ARRAY_SIZE(sun8i_output_left_mixer_controls)),
299-
SND_SOC_DAPM_MIXER("Right DAC Mixer", SND_SOC_NOPM, 0, 0,
300-
sun8i_output_right_mixer_controls,
301-
ARRAY_SIZE(sun8i_output_right_mixer_controls)),
293+
SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
294+
sun8i_dac_mixer_controls,
295+
ARRAY_SIZE(sun8i_dac_mixer_controls)),
296+
SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
297+
sun8i_dac_mixer_controls,
298+
ARRAY_SIZE(sun8i_dac_mixer_controls)),
302299

303300
/* Clocks */
304301
SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,
@@ -321,8 +318,6 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
321318
SUN8I_MOD_RST_CTL_AIF1, 0, NULL, 0),
322319
SND_SOC_DAPM_SUPPLY("RST DAC", SUN8I_MOD_RST_CTL,
323320
SUN8I_MOD_RST_CTL_DAC, 0, NULL, 0),
324-
325-
SND_SOC_DAPM_OUTPUT("HP"),
326321
};
327322

328323
static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
@@ -338,16 +333,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
338333
{ "DAC", NULL, "MODCLK DAC" },
339334

340335
/* DAC Routes */
341-
{ "Digital Left DAC", NULL, "DAC" },
342-
{ "Digital Right DAC", NULL, "DAC" },
336+
{ "AIF1 Slot 0 Right", NULL, "DAC" },
337+
{ "AIF1 Slot 0 Left", NULL, "DAC" },
343338

344339
/* DAC Mixer Routes */
345-
{ "Left DAC Mixer", "LSlot 0", "Digital Left DAC"},
346-
{ "Right DAC Mixer", "RSlot 0", "Digital Right DAC"},
347-
348-
/* End of route : HP out */
349-
{ "HP", NULL, "Left DAC Mixer" },
350-
{ "HP", NULL, "Right DAC Mixer" },
340+
{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
341+
"AIF1 Slot 0 Left"},
342+
{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
343+
"AIF1 Slot 0 Right"},
351344
};
352345

353346
static struct snd_soc_dai_ops sun8i_codec_dai_ops = {

0 commit comments

Comments
 (0)