[ALSA] ac97 - Clean up obsolete workarounds

Modules: AC97 Codec

Clean up obsolete workarounds provided only for nm256.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2006-03-15 14:08:20 +01:00 committed by Jaroslav Kysela
parent a23446c085
commit 0a589d8019
2 changed files with 0 additions and 11 deletions

View File

@ -446,8 +446,6 @@ struct snd_ac97_template {
unsigned short num; /* number of codec: 0 = primary, 1 = secondary */ unsigned short num; /* number of codec: 0 = primary, 1 = secondary */
unsigned short addr; /* physical address of codec [0-3] */ unsigned short addr; /* physical address of codec [0-3] */
unsigned int scaps; /* driver capabilities */ unsigned int scaps; /* driver capabilities */
unsigned int limited_regs; /* allow limited registers only */
DECLARE_BITMAP(reg_accessed, 0x80); /* bit flags */
const struct snd_ac97_res_table *res_table; /* static resolution */ const struct snd_ac97_res_table *res_table; /* static resolution */
}; };
@ -477,7 +475,6 @@ struct snd_ac97 {
unsigned int rates[6]; /* see AC97_RATES_* defines */ unsigned int rates[6]; /* see AC97_RATES_* defines */
unsigned int spdif_status; unsigned int spdif_status;
unsigned short regs[0x80]; /* register cache */ unsigned short regs[0x80]; /* register cache */
unsigned int limited_regs; /* allow limited registers only */
DECLARE_BITMAP(reg_accessed, 0x80); /* bit flags */ DECLARE_BITMAP(reg_accessed, 0x80); /* bit flags */
union { /* vendor specific code */ union { /* vendor specific code */
struct { struct {

View File

@ -192,9 +192,6 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
static int snd_ac97_valid_reg(struct snd_ac97 *ac97, unsigned short reg) static int snd_ac97_valid_reg(struct snd_ac97 *ac97, unsigned short reg)
{ {
if (ac97->limited_regs && ! test_bit(reg, ac97->reg_accessed))
return 0;
/* filter some registers for buggy codecs */ /* filter some registers for buggy codecs */
switch (ac97->id) { switch (ac97->id) {
case AC97_ID_AK4540: case AC97_ID_AK4540:
@ -1008,9 +1005,6 @@ static int snd_ac97_try_volume_mix(struct snd_ac97 * ac97, int reg)
break; break;
} }
if (ac97->limited_regs && test_bit(reg, ac97->reg_accessed))
return 1; /* allow without check */
val = snd_ac97_read(ac97, reg); val = snd_ac97_read(ac97, reg);
if (!(val & mask)) { if (!(val & mask)) {
/* nothing seems to be here - mute flag is not set */ /* nothing seems to be here - mute flag is not set */
@ -1866,8 +1860,6 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template,
ac97->num = template->num; ac97->num = template->num;
ac97->addr = template->addr; ac97->addr = template->addr;
ac97->scaps = template->scaps; ac97->scaps = template->scaps;
ac97->limited_regs = template->limited_regs;
memcpy(ac97->reg_accessed, template->reg_accessed, sizeof(ac97->reg_accessed));
ac97->res_table = template->res_table; ac97->res_table = template->res_table;
bus->codec[ac97->num] = ac97; bus->codec[ac97->num] = ac97;
mutex_init(&ac97->reg_mutex); mutex_init(&ac97->reg_mutex);