diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-04-27 11:15:32 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-04-27 11:15:32 -0400 |
commit | f0787f62df516df6975d4325795ed02c495f3728 (patch) | |
tree | fdd3bddb1c70bec9a8d6d7f4710186fc0e27564a /sound | |
parent | ce8a7424d23a36f043d0de8484f888971c831119 (diff) | |
parent | a396e32ef0f3b98700abb9a6da3530c945e55908 (diff) |
Merge branch 'fix/asoc' into for-linus
* fix/asoc:
ASoC: s3c-i2s-v2 needs to declare a license for modular builds
ASoC: remove non-existing referece to CONFIG_SND_SOC_CODEC_WM8991
ASoC: Fix WM8580 volume update handling for large register changes
ASoC: Fix offset of freqmode in WM8580 PLL configuration
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/Makefile | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm8580.c | 16 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c-i2s-v2.c | 3 |
3 files changed, 12 insertions, 8 deletions
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index 030d2454725f..f2653803ede8 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile | |||
@@ -56,7 +56,6 @@ obj-$(CONFIG_SND_SOC_WM8900) += snd-soc-wm8900.o | |||
56 | obj-$(CONFIG_SND_SOC_WM8903) += snd-soc-wm8903.o | 56 | obj-$(CONFIG_SND_SOC_WM8903) += snd-soc-wm8903.o |
57 | obj-$(CONFIG_SND_SOC_WM8971) += snd-soc-wm8971.o | 57 | obj-$(CONFIG_SND_SOC_WM8971) += snd-soc-wm8971.o |
58 | obj-$(CONFIG_SND_SOC_WM8990) += snd-soc-wm8990.o | 58 | obj-$(CONFIG_SND_SOC_WM8990) += snd-soc-wm8990.o |
59 | obj-$(CONFIG_SND_SOC_WM8991) += snd-soc-wm8991.o | ||
60 | obj-$(CONFIG_SND_SOC_WM9705) += snd-soc-wm9705.o | 59 | obj-$(CONFIG_SND_SOC_WM9705) += snd-soc-wm9705.o |
61 | obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o | 60 | obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o |
62 | obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o | 61 | obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o |
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 442ea6f160fc..9f6be3d31ac0 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c | |||
@@ -268,9 +268,11 @@ static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1); | |||
268 | static int wm8580_out_vu(struct snd_kcontrol *kcontrol, | 268 | static int wm8580_out_vu(struct snd_kcontrol *kcontrol, |
269 | struct snd_ctl_elem_value *ucontrol) | 269 | struct snd_ctl_elem_value *ucontrol) |
270 | { | 270 | { |
271 | struct soc_mixer_control *mc = | ||
272 | (struct soc_mixer_control *)kcontrol->private_value; | ||
271 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 273 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
272 | int reg = kcontrol->private_value & 0xff; | 274 | unsigned int reg = mc->reg; |
273 | int reg2 = (kcontrol->private_value >> 24) & 0xff; | 275 | unsigned int reg2 = mc->rreg; |
274 | int ret; | 276 | int ret; |
275 | u16 val; | 277 | u16 val; |
276 | 278 | ||
@@ -292,15 +294,17 @@ static int wm8580_out_vu(struct snd_kcontrol *kcontrol, | |||
292 | return 0; | 294 | return 0; |
293 | } | 295 | } |
294 | 296 | ||
295 | #define SOC_WM8580_OUT_DOUBLE_R_TLV(xname, reg_left, reg_right, shift, max, invert, tlv_array) \ | 297 | #define SOC_WM8580_OUT_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, \ |
298 | xinvert, tlv_array) \ | ||
296 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | 299 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ |
297 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ | 300 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ |
298 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | 301 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ |
299 | .tlv.p = (tlv_array), \ | 302 | .tlv.p = (tlv_array), \ |
300 | .info = snd_soc_info_volsw_2r, \ | 303 | .info = snd_soc_info_volsw_2r, \ |
301 | .get = snd_soc_get_volsw_2r, .put = wm8580_out_vu, \ | 304 | .get = snd_soc_get_volsw_2r, .put = wm8580_out_vu, \ |
302 | .private_value = (reg_left) | ((shift) << 8) | \ | 305 | .private_value = (unsigned long)&(struct soc_mixer_control) \ |
303 | ((max) << 12) | ((invert) << 20) | ((reg_right) << 24) } | 306 | {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ |
307 | .max = xmax, .invert = xinvert} } | ||
304 | 308 | ||
305 | static const struct snd_kcontrol_new wm8580_snd_controls[] = { | 309 | static const struct snd_kcontrol_new wm8580_snd_controls[] = { |
306 | SOC_WM8580_OUT_DOUBLE_R_TLV("DAC1 Playback Volume", | 310 | SOC_WM8580_OUT_DOUBLE_R_TLV("DAC1 Playback Volume", |
@@ -522,7 +526,7 @@ static int wm8580_set_dai_pll(struct snd_soc_dai *codec_dai, | |||
522 | reg = wm8580_read(codec, WM8580_PLLA4 + offset); | 526 | reg = wm8580_read(codec, WM8580_PLLA4 + offset); |
523 | reg &= ~0x3f; | 527 | reg &= ~0x3f; |
524 | reg |= pll_div.prescale | pll_div.postscale << 1 | | 528 | reg |= pll_div.prescale | pll_div.postscale << 1 | |
525 | pll_div.freqmode << 4; | 529 | pll_div.freqmode << 3; |
526 | 530 | ||
527 | wm8580_write(codec, WM8580_PLLA4 + offset, reg); | 531 | wm8580_write(codec, WM8580_PLLA4 + offset, reg); |
528 | 532 | ||
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c index 689ffcd17e1f..ab680aac3fcb 100644 --- a/sound/soc/s3c24xx/s3c-i2s-v2.c +++ b/sound/soc/s3c24xx/s3c-i2s-v2.c | |||
@@ -636,5 +636,6 @@ int s3c_i2sv2_register_dai(struct snd_soc_dai *dai) | |||
636 | 636 | ||
637 | return snd_soc_register_dai(dai); | 637 | return snd_soc_register_dai(dai); |
638 | } | 638 | } |
639 | |||
640 | EXPORT_SYMBOL_GPL(s3c_i2sv2_register_dai); | 639 | EXPORT_SYMBOL_GPL(s3c_i2sv2_register_dai); |
640 | |||
641 | MODULE_LICENSE("GPL"); | ||