Unified · Split
| @@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, · 164 unmodified lines | ||
| 165 | 165 | struct snd_ctl_elem_value *ucontrol) |
| 166 | 166 | { |
| 167 | 167 | 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; | |
| 172 | 175 | unsigned short val, val_mask; |
| 173 | 176 | int ret; |
| 174 | 177 | struct snd_soc_dapm_path *path; |
| @@ -176,7 +176,9 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, · 175 unmodified lines | ||
| 176 | 176 | struct snd_ctl_elem_value *ucontrol) |
| 177 | 177 | { |
| 178 | 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 | 182 | int ret; |
| 181 | 183 | u16 val; |
| 182 | 184 | |
| @@ -91,7 +91,7 @@ static struct snd_soc_dai_link sdp3430_dai = { · 90 unmodified lines | ||
| 91 | 91 | }; |
| 92 | 92 | |
| 93 | 93 | /* Audio machine driver */ |
| 94 | −static struct snd_soc_machine snd_soc_machine_sdp3430 = { | |
| 94 | +static struct snd_soc_card snd_soc_sdp3430 = { | |
| 95 | 95 | .name = "SDP3430", |
| 96 | 96 | .platform = &omap_soc_platform, |
| 97 | 97 | .dai_link = &sdp3430_dai, |
| @@ -100,7 +100,7 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = { · 2 unmodified lines | ||
| 100 | 100 | |
| 101 | 101 | /* Audio subsystem */ |
| 102 | 102 | static struct snd_soc_device sdp3430_snd_devdata = { |
| 103 | − .machine = &snd_soc_machine_sdp3430, | |
| 103 | + .card = &snd_soc_sdp3430, | |
| 104 | 104 | .codec_dev = &soc_codec_dev_twl4030, |
| 105 | 105 | }; |
| 106 | 106 | |
| @@ -1385,7 +1385,10 @@ int snd_soc_init_card(struct snd_soc_device *socdev) · 1384 unmodified lines | ||
| 1385 | 1385 | |
| 1386 | 1386 | mutex_lock(&codec->mutex); |
| 1387 | 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 | 1392 | ret = soc_ac97_dev_register(codec); |
| 1390 | 1393 | if (ret < 0) { |
| 1391 | 1394 | printk(KERN_ERR "asoc: AC97 device register failed\n"); |