diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-30 21:53:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-30 21:53:12 -0500 |
commit | 7bfeea05d9b1cc75c2d7410b92b7774870688379 (patch) | |
tree | 39627048b18ab9bd2e7437af046579ea67ea53e2 /sound/soc/codecs/wm_hubs.c | |
parent | f9a3d1d74bdacf8a5ef8025233e61546cb809dc8 (diff) | |
parent | dcc3c4c016481de3fdb99c1f6ecb04d4229513d4 (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:
ALSA: HDA: Fix automute on Thinkpad L412/L512
ALSA: HDA: Fix dmesg output of HDMI supported bits
ALSA: fix invalid hardware.h include in ac97c for AVR32 architecture
ASoC: correct link specifications for corgi, poodle and spitz
ASoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
ASoC: Fix codec device id format used by some dai_links
ALSA: azt3328 - fix broken AZF_FMT_XLATE macro
ALSA: Xonar, CS43xx: Don't overrun static array
ASoC: Handle low measured DC offsets for wm_hubs devices
ASoC: da8xx/omap-l1xx: match codec_name with i2c ids
ASoC: WM8994: fix wrong value in tristate function
ASoC: WM8995: Fix incorrect use of snd_soc_update_bits()
Diffstat (limited to 'sound/soc/codecs/wm_hubs.c')
-rw-r--r-- | sound/soc/codecs/wm_hubs.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index c466982eed23..613df5db0b32 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -91,6 +91,7 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec, unsigned int op) | |||
91 | static void calibrate_dc_servo(struct snd_soc_codec *codec) | 91 | static void calibrate_dc_servo(struct snd_soc_codec *codec) |
92 | { | 92 | { |
93 | struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); | 93 | struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); |
94 | s8 offset; | ||
94 | u16 reg, reg_l, reg_r, dcs_cfg; | 95 | u16 reg, reg_l, reg_r, dcs_cfg; |
95 | 96 | ||
96 | /* If we're using a digital only path and have a previously | 97 | /* If we're using a digital only path and have a previously |
@@ -149,16 +150,14 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec) | |||
149 | hubs->dcs_codes); | 150 | hubs->dcs_codes); |
150 | 151 | ||
151 | /* HPOUT1L */ | 152 | /* HPOUT1L */ |
152 | if (reg_l + hubs->dcs_codes > 0 && | 153 | offset = reg_l; |
153 | reg_l + hubs->dcs_codes < 0xff) | 154 | offset += hubs->dcs_codes; |
154 | reg_l += hubs->dcs_codes; | 155 | dcs_cfg = (u8)offset << WM8993_DCS_DAC_WR_VAL_1_SHIFT; |
155 | dcs_cfg = reg_l << WM8993_DCS_DAC_WR_VAL_1_SHIFT; | ||
156 | 156 | ||
157 | /* HPOUT1R */ | 157 | /* HPOUT1R */ |
158 | if (reg_r + hubs->dcs_codes > 0 && | 158 | offset = reg_r; |
159 | reg_r + hubs->dcs_codes < 0xff) | 159 | offset += hubs->dcs_codes; |
160 | reg_r += hubs->dcs_codes; | 160 | dcs_cfg |= (u8)offset; |
161 | dcs_cfg |= reg_r; | ||
162 | 161 | ||
163 | dev_dbg(codec->dev, "DCS result: %x\n", dcs_cfg); | 162 | dev_dbg(codec->dev, "DCS result: %x\n", dcs_cfg); |
164 | 163 | ||