diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/wm8990.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/sdp3430.c | 4 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 5 |
4 files changed, 16 insertions, 8 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index b47a749c5ea2..aea0cb72d80a 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, | |||
165 | struct snd_ctl_elem_value *ucontrol) | 165 | struct snd_ctl_elem_value *ucontrol) |
166 | { | 166 | { |
167 | struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); | 167 | struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); |
168 | int reg = kcontrol->private_value & 0xff; | 168 | struct soc_mixer_control *mc = |
169 | int shift = (kcontrol->private_value >> 8) & 0x0f; | 169 | (struct soc_mixer_control *)kcontrol->private_value; |
170 | int mask = (kcontrol->private_value >> 16) & 0xff; | 170 | unsigned int reg = mc->reg; |
171 | int invert = (kcontrol->private_value >> 24) & 0x01; | 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; | ||
172 | unsigned short val, val_mask; | 175 | unsigned short val, val_mask; |
173 | int ret; | 176 | int ret; |
174 | struct snd_soc_dapm_path *path; | 177 | struct snd_soc_dapm_path *path; |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 1cbb7b9b51ce..a5731faa150c 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -176,7 +176,9 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, | |||
176 | struct snd_ctl_elem_value *ucontrol) | 176 | struct snd_ctl_elem_value *ucontrol) |
177 | { | 177 | { |
178 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 178 | 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; | ||
180 | int ret; | 182 | int ret; |
181 | u16 val; | 183 | u16 val; |
182 | 184 | ||
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index ad97836818b1..e226fa75669c 100644 --- a/sound/soc/omap/sdp3430.c +++ b/sound/soc/omap/sdp3430.c | |||
@@ -91,7 +91,7 @@ static struct snd_soc_dai_link sdp3430_dai = { | |||
91 | }; | 91 | }; |
92 | 92 | ||
93 | /* Audio machine driver */ | 93 | /* Audio machine driver */ |
94 | static struct snd_soc_machine snd_soc_machine_sdp3430 = { | 94 | static struct snd_soc_card snd_soc_sdp3430 = { |
95 | .name = "SDP3430", | 95 | .name = "SDP3430", |
96 | .platform = &omap_soc_platform, | 96 | .platform = &omap_soc_platform, |
97 | .dai_link = &sdp3430_dai, | 97 | .dai_link = &sdp3430_dai, |
@@ -100,7 +100,7 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = { | |||
100 | 100 | ||
101 | /* Audio subsystem */ | 101 | /* Audio subsystem */ |
102 | static struct snd_soc_device sdp3430_snd_devdata = { | 102 | static struct snd_soc_device sdp3430_snd_devdata = { |
103 | .machine = &snd_soc_machine_sdp3430, | 103 | .card = &snd_soc_sdp3430, |
104 | .codec_dev = &soc_codec_dev_twl4030, | 104 | .codec_dev = &soc_codec_dev_twl4030, |
105 | }; | 105 | }; |
106 | 106 | ||
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 55fdb4abb179..ec3f8bb4b51d 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1385,7 +1385,10 @@ int snd_soc_init_card(struct snd_soc_device *socdev) | |||
1385 | 1385 | ||
1386 | mutex_lock(&codec->mutex); | 1386 | mutex_lock(&codec->mutex); |
1387 | #ifdef CONFIG_SND_SOC_AC97_BUS | 1387 | #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) { | ||
1389 | ret = soc_ac97_dev_register(codec); | 1392 | ret = soc_ac97_dev_register(codec); |
1390 | if (ret < 0) { | 1393 | if (ret < 0) { |
1391 | printk(KERN_ERR "asoc: AC97 device register failed\n"); | 1394 | printk(KERN_ERR "asoc: AC97 device register failed\n"); |