diff options
Diffstat (limited to 'sound/i2c/other/ak4xxx-adda.c')
-rw-r--r-- | sound/i2c/other/ak4xxx-adda.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c index 35fbbf2cb9fa..288926d2e205 100644 --- a/sound/i2c/other/ak4xxx-adda.c +++ b/sound/i2c/other/ak4xxx-adda.c | |||
@@ -70,7 +70,8 @@ static void ak4524_reset(struct snd_akm4xxx *ak, int state) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | /* reset procedure for AK4355 and AK4358 */ | 72 | /* reset procedure for AK4355 and AK4358 */ |
73 | static void ak4355_reset(struct snd_akm4xxx *ak, int state) | 73 | static void ak435X_reset(struct snd_akm4xxx *ak, int state, |
74 | unsigned char total_regs) | ||
74 | { | 75 | { |
75 | unsigned char reg; | 76 | unsigned char reg; |
76 | 77 | ||
@@ -78,7 +79,7 @@ static void ak4355_reset(struct snd_akm4xxx *ak, int state) | |||
78 | snd_akm4xxx_write(ak, 0, 0x01, 0x02); /* reset and soft-mute */ | 79 | snd_akm4xxx_write(ak, 0, 0x01, 0x02); /* reset and soft-mute */ |
79 | return; | 80 | return; |
80 | } | 81 | } |
81 | for (reg = 0x00; reg < 0x0b; reg++) | 82 | for (reg = 0x00; reg < total_regs; reg++) |
82 | if (reg != 0x01) | 83 | if (reg != 0x01) |
83 | snd_akm4xxx_write(ak, 0, reg, | 84 | snd_akm4xxx_write(ak, 0, reg, |
84 | snd_akm4xxx_get(ak, 0, reg)); | 85 | snd_akm4xxx_get(ak, 0, reg)); |
@@ -118,8 +119,10 @@ void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state) | |||
118 | /* FIXME: needed for ak4529? */ | 119 | /* FIXME: needed for ak4529? */ |
119 | break; | 120 | break; |
120 | case SND_AK4355: | 121 | case SND_AK4355: |
122 | ak435X_reset(ak, state, 0x0b); | ||
123 | break; | ||
121 | case SND_AK4358: | 124 | case SND_AK4358: |
122 | ak4355_reset(ak, state); | 125 | ak435X_reset(ak, state, 0x10); |
123 | break; | 126 | break; |
124 | case SND_AK4381: | 127 | case SND_AK4381: |
125 | ak4381_reset(ak, state); | 128 | ak4381_reset(ak, state); |
@@ -292,11 +295,6 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak) | |||
292 | case SND_AK5365: | 295 | case SND_AK5365: |
293 | /* FIXME: any init sequence? */ | 296 | /* FIXME: any init sequence? */ |
294 | return; | 297 | return; |
295 | case NON_AKM: | ||
296 | /* fake value for non-akm codecs using akm infrastructure | ||
297 | * (e.g. of ice1724) - certainly FIXME | ||
298 | */ | ||
299 | return; | ||
300 | default: | 298 | default: |
301 | snd_BUG(); | 299 | snd_BUG(); |
302 | return; | 300 | return; |
@@ -374,6 +372,8 @@ static int put_ak_reg(struct snd_kcontrol *kcontrol, int addr, | |||
374 | nval = mask - nval; | 372 | nval = mask - nval; |
375 | if (AK_GET_NEEDSMSB(kcontrol->private_value)) | 373 | if (AK_GET_NEEDSMSB(kcontrol->private_value)) |
376 | nval |= 0x80; | 374 | nval |= 0x80; |
375 | /* printk(KERN_DEBUG "DEBUG - AK writing reg: chip %x addr %x, | ||
376 | nval %x\n", chip, addr, nval); */ | ||
377 | snd_akm4xxx_write(ak, chip, addr, nval); | 377 | snd_akm4xxx_write(ak, chip, addr, nval); |
378 | return 1; | 378 | return 1; |
379 | } | 379 | } |