Merge branch 'fix/asoc' into for-linus

This commit is contained in:
Takashi Iwai 2009-02-13 15:06:04 +01:00
commit 99cbb86180
4 changed files with 16 additions and 8 deletions

View File

@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol);
int reg = kcontrol->private_value & 0xff; struct soc_mixer_control *mc =
int shift = (kcontrol->private_value >> 8) & 0x0f; (struct soc_mixer_control *)kcontrol->private_value;
int mask = (kcontrol->private_value >> 16) & 0xff; unsigned int reg = mc->reg;
int invert = (kcontrol->private_value >> 24) & 0x01; unsigned int shift = mc->shift;
int max = mc->max;
unsigned int mask = (1 << fls(max)) - 1;
unsigned int invert = mc->invert;
unsigned short val, val_mask; unsigned short val, val_mask;
int ret; int ret;
struct snd_soc_dapm_path *path; struct snd_soc_dapm_path *path;

View File

@ -176,7 +176,9 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
int reg = kcontrol->private_value & 0xff; struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
int reg = mc->reg;
int ret; int ret;
u16 val; u16 val;

View File

@ -91,7 +91,7 @@ static struct snd_soc_dai_link sdp3430_dai = {
}; };
/* Audio machine driver */ /* Audio machine driver */
static struct snd_soc_machine snd_soc_machine_sdp3430 = { static struct snd_soc_card snd_soc_sdp3430 = {
.name = "SDP3430", .name = "SDP3430",
.platform = &omap_soc_platform, .platform = &omap_soc_platform,
.dai_link = &sdp3430_dai, .dai_link = &sdp3430_dai,
@ -100,7 +100,7 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = {
/* Audio subsystem */ /* Audio subsystem */
static struct snd_soc_device sdp3430_snd_devdata = { static struct snd_soc_device sdp3430_snd_devdata = {
.machine = &snd_soc_machine_sdp3430, .card = &snd_soc_sdp3430,
.codec_dev = &soc_codec_dev_twl4030, .codec_dev = &soc_codec_dev_twl4030,
}; };

View File

@ -1385,7 +1385,10 @@ int snd_soc_init_card(struct snd_soc_device *socdev)
mutex_lock(&codec->mutex); mutex_lock(&codec->mutex);
#ifdef CONFIG_SND_SOC_AC97_BUS #ifdef CONFIG_SND_SOC_AC97_BUS
if (ac97) { /* Only instantiate AC97 if not already done by the adaptor
* for the generic AC97 subsystem.
*/
if (ac97 && strcmp(codec->name, "AC97") != 0) {
ret = soc_ac97_dev_register(codec); ret = soc_ac97_dev_register(codec);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "asoc: AC97 device register failed\n"); printk(KERN_ERR "asoc: AC97 device register failed\n");