aboutsummaryrefslogtreecommitdiffstats
path: root/sound/i2c/other
diff options
context:
space:
mode:
authorPavel Hofman <dustin@seznam.cz>2008-03-17 03:45:33 -0400
committerTakashi Iwai <tiwai@suse.de>2008-04-24 06:00:25 -0400
commit841b23d4d7b554c8d74fc9c34a701f85abc04875 (patch)
tree64b7322112731405bcdd0c025b76514599e7d0b8 /sound/i2c/other
parent5949d2443d96f054d9a32d31edddb0be836968c6 (diff)
[ALSA] some fixes and cleanup for ICE1724 cards
* removing the hack with NON_AKM ak4xxx type * support for card-specific flags in ak4114_stats * definition of the flags for corresponding cards Signed-off-by: Pavel Hofman <dustin@seznam.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/i2c/other')
-rw-r--r--sound/i2c/other/ak4114.c2
-rw-r--r--sound/i2c/other/ak4xxx-adda.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c
index 9a90e830c423..d20d893b3b60 100644
--- a/sound/i2c/other/ak4114.c
+++ b/sound/i2c/other/ak4114.c
@@ -612,7 +612,7 @@ static void ak4114_stats(struct work_struct *work)
612 struct ak4114 *chip = container_of(work, struct ak4114, work.work); 612 struct ak4114 *chip = container_of(work, struct ak4114, work.work);
613 613
614 if (!chip->init) 614 if (!chip->init)
615 snd_ak4114_check_rate_and_errors(chip, 0); 615 snd_ak4114_check_rate_and_errors(chip, chip->check_flags);
616 616
617 schedule_delayed_work(&chip->work, HZ / 10); 617 schedule_delayed_work(&chip->work, HZ / 10);
618} 618}
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 */
73static void ak4355_reset(struct snd_akm4xxx *ak, int state) 73static 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}