diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 13:46:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 13:46:37 -0400 |
commit | d3e458d78167102cc961237cfceef6fffc80c0b3 (patch) | |
tree | e9195c1294daf053614e63ac52b0b44a28479017 /sound/soc/codecs/wm8962.c | |
parent | f2e1fbb5f2177227f71c4fc0491e531dd7acd385 (diff) | |
parent | d351cf4603edb2a5bfa9a48d06c425511c63f2a3 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (308 commits)
ALSA: sound/pci/asihpi: check adapter index in hpi_ioctl
ALSA: aloop - Fix possible IRQ lock inversion
ALSA: sound/core: merge list_del()/list_add_tail() to list_move_tail()
ALSA: ctxfi - use list_move() instead of list_del()/list_add() combination
ALSA: firewire - msleep needs delay.h
ALSA: firewire-lib, firewire-speakers: handle packet queueing errors
ALSA: firewire-lib: allocate DMA buffer separately
ALSA: firewire-lib: use no-info SYT for packets without SYT sample
ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver
ALSA: hda - Remove an unused variable in patch_realtek.c
ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs
ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs
ALSA: hda - Move default input-src selection to init part
ALSA: hda - Initialize special cases for input src in init phase
ALSA: ctxfi - Clear input settings before initialization
ALSA: ctxfi - Fix SPDIF status retrieval
ALSA: ctxfi - Fix incorrect SPDIF status bit mask
ALSA: ctxfi - Fix microphone boost codes/comments
ALSA: atiixp - Fix wrong time-out checks during ac-link reset
ALSA: intel8x0m: append 'm' to "r_intel8x0"
...
Diffstat (limited to 'sound/soc/codecs/wm8962.c')
-rw-r--r-- | sound/soc/codecs/wm8962.c | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index b9cb1fcf8c92..3b71dd65c966 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -1938,7 +1938,7 @@ static const struct wm8962_reg_access { | |||
1938 | [21139] = { 0xFFFF, 0xFFFF, 0x0000 }, /* R21139 - VSS_XTS32_0 */ | 1938 | [21139] = { 0xFFFF, 0xFFFF, 0x0000 }, /* R21139 - VSS_XTS32_0 */ |
1939 | }; | 1939 | }; |
1940 | 1940 | ||
1941 | static int wm8962_volatile_register(unsigned int reg) | 1941 | static int wm8962_volatile_register(struct snd_soc_codec *codec, unsigned int reg) |
1942 | { | 1942 | { |
1943 | if (wm8962_reg_access[reg].vol) | 1943 | if (wm8962_reg_access[reg].vol) |
1944 | return 1; | 1944 | return 1; |
@@ -1946,7 +1946,7 @@ static int wm8962_volatile_register(unsigned int reg) | |||
1946 | return 0; | 1946 | return 0; |
1947 | } | 1947 | } |
1948 | 1948 | ||
1949 | static int wm8962_readable_register(unsigned int reg) | 1949 | static int wm8962_readable_register(struct snd_soc_codec *codec, unsigned int reg) |
1950 | { | 1950 | { |
1951 | if (wm8962_reg_access[reg].read) | 1951 | if (wm8962_reg_access[reg].read) |
1952 | return 1; | 1952 | return 1; |
@@ -3635,7 +3635,7 @@ static void wm8962_gpio_set(struct gpio_chip *chip, unsigned offset, int value) | |||
3635 | struct snd_soc_codec *codec = wm8962->codec; | 3635 | struct snd_soc_codec *codec = wm8962->codec; |
3636 | 3636 | ||
3637 | snd_soc_update_bits(codec, WM8962_GPIO_BASE + offset, | 3637 | snd_soc_update_bits(codec, WM8962_GPIO_BASE + offset, |
3638 | WM8962_GP2_LVL, value << WM8962_GP2_LVL_SHIFT); | 3638 | WM8962_GP2_LVL, !!value << WM8962_GP2_LVL_SHIFT); |
3639 | } | 3639 | } |
3640 | 3640 | ||
3641 | static int wm8962_gpio_direction_out(struct gpio_chip *chip, | 3641 | static int wm8962_gpio_direction_out(struct gpio_chip *chip, |
@@ -3822,16 +3822,26 @@ static int wm8962_probe(struct snd_soc_codec *codec) | |||
3822 | } | 3822 | } |
3823 | 3823 | ||
3824 | /* Latch volume update bits */ | 3824 | /* Latch volume update bits */ |
3825 | reg_cache[WM8962_LEFT_INPUT_VOLUME] |= WM8962_IN_VU; | 3825 | snd_soc_update_bits(codec, WM8962_LEFT_INPUT_VOLUME, |
3826 | reg_cache[WM8962_RIGHT_INPUT_VOLUME] |= WM8962_IN_VU; | 3826 | WM8962_IN_VU, WM8962_IN_VU); |
3827 | reg_cache[WM8962_LEFT_ADC_VOLUME] |= WM8962_ADC_VU; | 3827 | snd_soc_update_bits(codec, WM8962_RIGHT_INPUT_VOLUME, |
3828 | reg_cache[WM8962_RIGHT_ADC_VOLUME] |= WM8962_ADC_VU; | 3828 | WM8962_IN_VU, WM8962_IN_VU); |
3829 | reg_cache[WM8962_LEFT_DAC_VOLUME] |= WM8962_DAC_VU; | 3829 | snd_soc_update_bits(codec, WM8962_LEFT_ADC_VOLUME, |
3830 | reg_cache[WM8962_RIGHT_DAC_VOLUME] |= WM8962_DAC_VU; | 3830 | WM8962_ADC_VU, WM8962_ADC_VU); |
3831 | reg_cache[WM8962_SPKOUTL_VOLUME] |= WM8962_SPKOUT_VU; | 3831 | snd_soc_update_bits(codec, WM8962_RIGHT_ADC_VOLUME, |
3832 | reg_cache[WM8962_SPKOUTR_VOLUME] |= WM8962_SPKOUT_VU; | 3832 | WM8962_ADC_VU, WM8962_ADC_VU); |
3833 | reg_cache[WM8962_HPOUTL_VOLUME] |= WM8962_HPOUT_VU; | 3833 | snd_soc_update_bits(codec, WM8962_LEFT_DAC_VOLUME, |
3834 | reg_cache[WM8962_HPOUTR_VOLUME] |= WM8962_HPOUT_VU; | 3834 | WM8962_DAC_VU, WM8962_DAC_VU); |
3835 | snd_soc_update_bits(codec, WM8962_RIGHT_DAC_VOLUME, | ||
3836 | WM8962_DAC_VU, WM8962_DAC_VU); | ||
3837 | snd_soc_update_bits(codec, WM8962_SPKOUTL_VOLUME, | ||
3838 | WM8962_SPKOUT_VU, WM8962_SPKOUT_VU); | ||
3839 | snd_soc_update_bits(codec, WM8962_SPKOUTR_VOLUME, | ||
3840 | WM8962_SPKOUT_VU, WM8962_SPKOUT_VU); | ||
3841 | snd_soc_update_bits(codec, WM8962_HPOUTL_VOLUME, | ||
3842 | WM8962_HPOUT_VU, WM8962_HPOUT_VU); | ||
3843 | snd_soc_update_bits(codec, WM8962_HPOUTR_VOLUME, | ||
3844 | WM8962_HPOUT_VU, WM8962_HPOUT_VU); | ||
3835 | 3845 | ||
3836 | wm8962_add_widgets(codec); | 3846 | wm8962_add_widgets(codec); |
3837 | 3847 | ||