Skip to content

Commit 6bcbf64

Browse files
committed
Merge branch 'fix/asoc' into for-linus
2 parents 51e4152 + 0b7dd6a commit 6bcbf64

7 files changed

Lines changed: 34 additions & 18 deletions

File tree

‎sound/soc/codecs/tlv320aic23.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai,
430430
iface_reg |= TLV320AIC23_MS_MASTER;
431431
break;
432432
case SND_SOC_DAIFMT_CBS_CFS:
433+
iface_reg &= ~TLV320AIC23_MS_MASTER;
433434
break;
434435
default:
435436
return -EINVAL;

‎sound/soc/codecs/tlv320aic3x.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,7 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai,
10231023
break;
10241024
case SND_SOC_DAIFMT_CBS_CFS:
10251025
aic3x->master = 0;
1026+
iface_areg &= ~(BIT_CLK_MASTER | WORD_CLK_MASTER);
10261027
break;
10271028
default:
10281029
return -EINVAL;

‎sound/soc/codecs/wm5100.c‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,13 +2361,17 @@ static int wm5100_gpio_direction_out(struct gpio_chip *chip,
23612361
{
23622362
struct wm5100_priv *wm5100 = gpio_to_wm5100(chip);
23632363
struct snd_soc_codec *codec = wm5100->codec;
2364-
int val;
2364+
int val, ret;
23652365

23662366
val = (1 << WM5100_GP1_FN_SHIFT) | (!!value << WM5100_GP1_LVL_SHIFT);
23672367

2368-
return snd_soc_update_bits(codec, WM5100_GPIO_CTRL_1 + offset,
2369-
WM5100_GP1_FN_MASK | WM5100_GP1_DIR |
2370-
WM5100_GP1_LVL, val);
2368+
ret = snd_soc_update_bits(codec, WM5100_GPIO_CTRL_1 + offset,
2369+
WM5100_GP1_FN_MASK | WM5100_GP1_DIR |
2370+
WM5100_GP1_LVL, val);
2371+
if (ret < 0)
2372+
return ret;
2373+
else
2374+
return 0;
23712375
}
23722376

23732377
static int wm5100_gpio_get(struct gpio_chip *chip, unsigned offset)

‎sound/soc/codecs/wm8711.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static int wm8711_hw_params(struct snd_pcm_substream *substream,
151151
{
152152
struct snd_soc_codec *codec = dai->codec;
153153
struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec);
154-
u16 iface = snd_soc_read(codec, WM8711_IFACE) & 0xfffc;
154+
u16 iface = snd_soc_read(codec, WM8711_IFACE) & 0xfff3;
155155
int i = get_coeff(wm8711->sysclk, params_rate(params));
156156
u16 srate = (coeff_div[i].sr << 2) |
157157
(coeff_div[i].bosr << 1) | coeff_div[i].usb;
@@ -232,7 +232,7 @@ static int wm8711_set_dai_fmt(struct snd_soc_dai *codec_dai,
232232
unsigned int fmt)
233233
{
234234
struct snd_soc_codec *codec = codec_dai->codec;
235-
u16 iface = 0;
235+
u16 iface = snd_soc_read(codec, WM8711_IFACE) & 0x000c;
236236

237237
/* set master/slave audio interface */
238238
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {

‎sound/soc/codecs/wm8904.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ SOC_ENUM("Right Capture Mode", rin_mode),
867867
SOC_DOUBLE_R("Capture Volume", WM8904_ANALOGUE_LEFT_INPUT_0,
868868
WM8904_ANALOGUE_RIGHT_INPUT_0, 0, 31, 0),
869869
SOC_DOUBLE_R("Capture Switch", WM8904_ANALOGUE_LEFT_INPUT_0,
870-
WM8904_ANALOGUE_RIGHT_INPUT_0, 7, 1, 0),
870+
WM8904_ANALOGUE_RIGHT_INPUT_0, 7, 1, 1),
871871

872872
SOC_SINGLE("High Pass Filter Switch", WM8904_ADC_DIGITAL_0, 4, 1, 0),
873873
SOC_ENUM("High Pass Filter Mode", hpf_mode),

‎sound/soc/codecs/wm8940.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
621621

622622
switch (div_id) {
623623
case WM8940_BCLKDIV:
624-
reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFFEF3;
624+
reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFFE3;
625625
ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 2));
626626
break;
627627
case WM8940_MCLKDIV:

‎sound/soc/codecs/wm8962.c‎

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,13 @@ static int wm8962_readable_register(struct snd_soc_codec *codec, unsigned int re
19611961

19621962
static int wm8962_reset(struct snd_soc_codec *codec)
19631963
{
1964-
return snd_soc_write(codec, WM8962_SOFTWARE_RESET, 0x6243);
1964+
int ret;
1965+
1966+
ret = snd_soc_write(codec, WM8962_SOFTWARE_RESET, 0x6243);
1967+
if (ret != 0)
1968+
return ret;
1969+
1970+
return snd_soc_write(codec, WM8962_PLL_SOFTWARE_RESET, 0);
19651971
}
19661972

19671973
static const DECLARE_TLV_DB_SCALE(inpga_tlv, -2325, 75, 0);
@@ -2360,15 +2366,14 @@ static int sysclk_event(struct snd_soc_dapm_widget *w,
23602366

23612367
snd_soc_update_bits(codec, WM8962_FLL_CONTROL_1,
23622368
WM8962_FLL_ENA, WM8962_FLL_ENA);
2363-
if (wm8962->irq) {
2364-
timeout = msecs_to_jiffies(5);
2365-
timeout = wait_for_completion_timeout(&wm8962->fll_lock,
2366-
timeout);
2367-
2368-
if (timeout == 0)
2369-
dev_err(codec->dev,
2370-
"Timed out starting FLL\n");
2371-
}
2369+
2370+
timeout = msecs_to_jiffies(5);
2371+
timeout = wait_for_completion_timeout(&wm8962->fll_lock,
2372+
timeout);
2373+
2374+
if (wm8962->irq && timeout == 0)
2375+
dev_err(codec->dev,
2376+
"Timed out starting FLL\n");
23722377
}
23732378
break;
23742379

@@ -4029,6 +4034,11 @@ static int wm8962_probe(struct snd_soc_codec *codec)
40294034
snd_soc_update_bits(codec, WM8962_CLOCKING2,
40304035
WM8962_CLKREG_OVD, WM8962_CLKREG_OVD);
40314036

4037+
/* Ensure that the oscillator and PLLs are disabled */
4038+
snd_soc_update_bits(codec, WM8962_PLL2,
4039+
WM8962_OSC_ENA | WM8962_PLL2_ENA | WM8962_PLL3_ENA,
4040+
0);
4041+
40324042
regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies);
40334043

40344044
if (pdata) {

0 commit comments

Comments
 (0)