diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-11-03 13:20:53 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-11-03 13:20:53 -0400 |
commit | 6bcbf64ace40d6833622d85701218a8bb7a4f207 (patch) | |
tree | a8db5d361115448647c18b8eb403911ef5aba617 /sound | |
parent | 51e4152a969aa6d2306492ebf143932dcb535c9b (diff) | |
parent | 0b7dd6ad92b6cace35dc5d06d6e236c2751c85dc (diff) |
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm5100.c | 12 | ||||
-rw-r--r-- | sound/soc/codecs/wm8711.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/wm8904.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8940.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8962.c | 30 |
7 files changed, 34 insertions, 18 deletions
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index ab27dbcd1262..336de8f69a02 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -430,6 +430,7 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
430 | iface_reg |= TLV320AIC23_MS_MASTER; | 430 | iface_reg |= TLV320AIC23_MS_MASTER; |
431 | break; | 431 | break; |
432 | case SND_SOC_DAIFMT_CBS_CFS: | 432 | case SND_SOC_DAIFMT_CBS_CFS: |
433 | iface_reg &= ~TLV320AIC23_MS_MASTER; | ||
433 | break; | 434 | break; |
434 | default: | 435 | default: |
435 | return -EINVAL; | 436 | return -EINVAL; |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 7a49390bc30d..87d5ef188e29 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -1023,6 +1023,7 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
1023 | break; | 1023 | break; |
1024 | case SND_SOC_DAIFMT_CBS_CFS: | 1024 | case SND_SOC_DAIFMT_CBS_CFS: |
1025 | aic3x->master = 0; | 1025 | aic3x->master = 0; |
1026 | iface_areg &= ~(BIT_CLK_MASTER | WORD_CLK_MASTER); | ||
1026 | break; | 1027 | break; |
1027 | default: | 1028 | default: |
1028 | return -EINVAL; | 1029 | return -EINVAL; |
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index 5d88c99aaea6..42d9039a49e9 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c | |||
@@ -2361,13 +2361,17 @@ static int wm5100_gpio_direction_out(struct gpio_chip *chip, | |||
2361 | { | 2361 | { |
2362 | struct wm5100_priv *wm5100 = gpio_to_wm5100(chip); | 2362 | struct wm5100_priv *wm5100 = gpio_to_wm5100(chip); |
2363 | struct snd_soc_codec *codec = wm5100->codec; | 2363 | struct snd_soc_codec *codec = wm5100->codec; |
2364 | int val; | 2364 | int val, ret; |
2365 | 2365 | ||
2366 | val = (1 << WM5100_GP1_FN_SHIFT) | (!!value << WM5100_GP1_LVL_SHIFT); | 2366 | val = (1 << WM5100_GP1_FN_SHIFT) | (!!value << WM5100_GP1_LVL_SHIFT); |
2367 | 2367 | ||
2368 | return snd_soc_update_bits(codec, WM5100_GPIO_CTRL_1 + offset, | 2368 | ret = snd_soc_update_bits(codec, WM5100_GPIO_CTRL_1 + offset, |
2369 | WM5100_GP1_FN_MASK | WM5100_GP1_DIR | | 2369 | WM5100_GP1_FN_MASK | WM5100_GP1_DIR | |
2370 | WM5100_GP1_LVL, val); | 2370 | WM5100_GP1_LVL, val); |
2371 | if (ret < 0) | ||
2372 | return ret; | ||
2373 | else | ||
2374 | return 0; | ||
2371 | } | 2375 | } |
2372 | 2376 | ||
2373 | static int wm5100_gpio_get(struct gpio_chip *chip, unsigned offset) | 2377 | static int wm5100_gpio_get(struct gpio_chip *chip, unsigned offset) |
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c index 8d0347cf0e9a..076bdb9930a1 100644 --- a/sound/soc/codecs/wm8711.c +++ b/sound/soc/codecs/wm8711.c | |||
@@ -151,7 +151,7 @@ static int wm8711_hw_params(struct snd_pcm_substream *substream, | |||
151 | { | 151 | { |
152 | struct snd_soc_codec *codec = dai->codec; | 152 | struct snd_soc_codec *codec = dai->codec; |
153 | struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec); | 153 | 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; |
155 | int i = get_coeff(wm8711->sysclk, params_rate(params)); | 155 | int i = get_coeff(wm8711->sysclk, params_rate(params)); |
156 | u16 srate = (coeff_div[i].sr << 2) | | 156 | u16 srate = (coeff_div[i].sr << 2) | |
157 | (coeff_div[i].bosr << 1) | coeff_div[i].usb; | 157 | (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, | |||
232 | unsigned int fmt) | 232 | unsigned int fmt) |
233 | { | 233 | { |
234 | struct snd_soc_codec *codec = codec_dai->codec; | 234 | struct snd_soc_codec *codec = codec_dai->codec; |
235 | u16 iface = 0; | 235 | u16 iface = snd_soc_read(codec, WM8711_IFACE) & 0x000c; |
236 | 236 | ||
237 | /* set master/slave audio interface */ | 237 | /* set master/slave audio interface */ |
238 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { | 238 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { |
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 9fc8f4c0a9a9..285ef87e6704 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -867,7 +867,7 @@ SOC_ENUM("Right Capture Mode", rin_mode), | |||
867 | SOC_DOUBLE_R("Capture Volume", WM8904_ANALOGUE_LEFT_INPUT_0, | 867 | SOC_DOUBLE_R("Capture Volume", WM8904_ANALOGUE_LEFT_INPUT_0, |
868 | WM8904_ANALOGUE_RIGHT_INPUT_0, 0, 31, 0), | 868 | WM8904_ANALOGUE_RIGHT_INPUT_0, 0, 31, 0), |
869 | SOC_DOUBLE_R("Capture Switch", WM8904_ANALOGUE_LEFT_INPUT_0, | 869 | 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), |
871 | 871 | ||
872 | SOC_SINGLE("High Pass Filter Switch", WM8904_ADC_DIGITAL_0, 4, 1, 0), | 872 | SOC_SINGLE("High Pass Filter Switch", WM8904_ADC_DIGITAL_0, 4, 1, 0), |
873 | SOC_ENUM("High Pass Filter Mode", hpf_mode), | 873 | SOC_ENUM("High Pass Filter Mode", hpf_mode), |
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index dc5cb3150857..de9ec9b8b7d9 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c | |||
@@ -621,7 +621,7 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai, | |||
621 | 621 | ||
622 | switch (div_id) { | 622 | switch (div_id) { |
623 | case WM8940_BCLKDIV: | 623 | case WM8940_BCLKDIV: |
624 | reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFFEF3; | 624 | reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFFE3; |
625 | ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 2)); | 625 | ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 2)); |
626 | break; | 626 | break; |
627 | case WM8940_MCLKDIV: | 627 | case WM8940_MCLKDIV: |
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index f60dfa16545e..91d3c6dbeba3 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -1961,7 +1961,13 @@ static int wm8962_readable_register(struct snd_soc_codec *codec, unsigned int re | |||
1961 | 1961 | ||
1962 | static int wm8962_reset(struct snd_soc_codec *codec) | 1962 | static int wm8962_reset(struct snd_soc_codec *codec) |
1963 | { | 1963 | { |
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); | ||
1965 | } | 1971 | } |
1966 | 1972 | ||
1967 | static const DECLARE_TLV_DB_SCALE(inpga_tlv, -2325, 75, 0); | 1973 | 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, | |||
2360 | 2366 | ||
2361 | snd_soc_update_bits(codec, WM8962_FLL_CONTROL_1, | 2367 | snd_soc_update_bits(codec, WM8962_FLL_CONTROL_1, |
2362 | WM8962_FLL_ENA, WM8962_FLL_ENA); | 2368 | WM8962_FLL_ENA, WM8962_FLL_ENA); |
2363 | if (wm8962->irq) { | 2369 | |
2364 | timeout = msecs_to_jiffies(5); | 2370 | timeout = msecs_to_jiffies(5); |
2365 | timeout = wait_for_completion_timeout(&wm8962->fll_lock, | 2371 | timeout = wait_for_completion_timeout(&wm8962->fll_lock, |
2366 | timeout); | 2372 | timeout); |
2367 | 2373 | ||
2368 | if (timeout == 0) | 2374 | if (wm8962->irq && timeout == 0) |
2369 | dev_err(codec->dev, | 2375 | dev_err(codec->dev, |
2370 | "Timed out starting FLL\n"); | 2376 | "Timed out starting FLL\n"); |
2371 | } | ||
2372 | } | 2377 | } |
2373 | break; | 2378 | break; |
2374 | 2379 | ||
@@ -4029,6 +4034,11 @@ static int wm8962_probe(struct snd_soc_codec *codec) | |||
4029 | snd_soc_update_bits(codec, WM8962_CLOCKING2, | 4034 | snd_soc_update_bits(codec, WM8962_CLOCKING2, |
4030 | WM8962_CLKREG_OVD, WM8962_CLKREG_OVD); | 4035 | WM8962_CLKREG_OVD, WM8962_CLKREG_OVD); |
4031 | 4036 | ||
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 | |||
4032 | regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies); | 4042 | regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies); |
4033 | 4043 | ||
4034 | if (pdata) { | 4044 | if (pdata) { |