History

Merge branch 'fix/asoc' into for-linus

Takashi Iwai committed 17 years ago

Commit 99cbb862 parents 7c56c29 14fa43f4 files · +16 −8Browse files

Unified · Split

4 files
  1. sound/soc/codecs/tlv320aic3x.c +7 −4
  2. sound/soc/codecs/wm8990.c +3 −1
  3. sound/soc/omap/sdp3430.c +2 −2
  4. sound/soc/soc-core.c +4 −1
sound/soc/codecs/tlv320aic3x.c+7−4
@@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, · 164 unmodified lines
165165 struct snd_ctl_elem_value *ucontrol)
166166 {
167167 struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol);
168− int reg = kcontrol->private_value & 0xff;
169− int shift = (kcontrol->private_value >> 8) & 0x0f;
170− int mask = (kcontrol->private_value >> 16) & 0xff;
171− int invert = (kcontrol->private_value >> 24) & 0x01;
168+ struct soc_mixer_control *mc =
169+ (struct soc_mixer_control *)kcontrol->private_value;
170+ unsigned int reg = mc->reg;
171+ unsigned int shift = mc->shift;
172+ int max = mc->max;
173+ unsigned int mask = (1 << fls(max)) - 1;
174+ unsigned int invert = mc->invert;
172175 unsigned short val, val_mask;
173176 int ret;
174177 struct snd_soc_dapm_path *path;
sound/soc/codecs/wm8990.c+3−1
@@ -176,7 +176,9 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, · 175 unmodified lines
176176 struct snd_ctl_elem_value *ucontrol)
177177 {
178178 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
179− int reg = kcontrol->private_value & 0xff;
179+ struct soc_mixer_control *mc =
180+ (struct soc_mixer_control *)kcontrol->private_value;
181+ int reg = mc->reg;
180182 int ret;
181183 u16 val;
182184
sound/soc/omap/sdp3430.c+2−2
@@ -91,7 +91,7 @@ static struct snd_soc_dai_link sdp3430_dai = { · 90 unmodified lines
9191 };
9292
9393 /* Audio machine driver */
94−static struct snd_soc_machine snd_soc_machine_sdp3430 = {
94+static struct snd_soc_card snd_soc_sdp3430 = {
9595 .name = "SDP3430",
9696 .platform = &omap_soc_platform,
9797 .dai_link = &sdp3430_dai,
@@ -100,7 +100,7 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = { · 2 unmodified lines
100100
101101 /* Audio subsystem */
102102 static struct snd_soc_device sdp3430_snd_devdata = {
103− .machine = &snd_soc_machine_sdp3430,
103+ .card = &snd_soc_sdp3430,
104104 .codec_dev = &soc_codec_dev_twl4030,
105105 };
106106
sound/soc/soc-core.c+4−1
@@ -1385,7 +1385,10 @@ int snd_soc_init_card(struct snd_soc_device *socdev) · 1384 unmodified lines
13851385
13861386 mutex_lock(&codec->mutex);
13871387 #ifdef CONFIG_SND_SOC_AC97_BUS
1388− if (ac97) {
1388+ /* Only instantiate AC97 if not already done by the adaptor
1389+ * for the generic AC97 subsystem.
1390+ */
1391+ if (ac97 && strcmp(codec->name, "AC97") != 0) {
13891392 ret = soc_ac97_dev_register(codec);
13901393 if (ret < 0) {
13911394 printk(KERN_ERR "asoc: AC97 device register failed\n");