diff options
| -rw-r--r-- | sound/soc/codecs/stac9766.c | 16 | ||||
| -rw-r--r-- | sound/soc/codecs/stac9766.h | 5 |
2 files changed, 4 insertions, 17 deletions
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index 27f30d352867..e54e4a4ce296 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c | |||
| @@ -47,8 +47,8 @@ static const u16 stac9766_reg[] = { | |||
| 47 | 0x0000, 0x0000, 0x0003, 0xffff, /* 4e */ | 47 | 0x0000, 0x0000, 0x0003, 0xffff, /* 4e */ |
| 48 | 0x0000, 0x0000, 0x0000, 0x0000, /* 56 */ | 48 | 0x0000, 0x0000, 0x0000, 0x0000, /* 56 */ |
| 49 | 0x4000, 0x0000, 0x0000, 0x0000, /* 5e */ | 49 | 0x4000, 0x0000, 0x0000, 0x0000, /* 5e */ |
| 50 | 0x1201, 0xFFFF, 0xFFFF, 0x0000, /* 66 */ | 50 | 0x1201, 0x0000, 0x0000, 0x0000, /* 66 */ |
| 51 | 0x0000, 0x0000, 0x0000, 0x0000, /* 6e */ | 51 | 0x0000, 0x0000, 0x0000, 0x1000, /* 6e */ |
| 52 | 0x0000, 0x0000, 0x0000, 0x0006, /* 76 */ | 52 | 0x0000, 0x0000, 0x0000, 0x0006, /* 76 */ |
| 53 | 0x0000, 0x0000, 0x0000, 0x0000, /* 7e */ | 53 | 0x0000, 0x0000, 0x0000, 0x0000, /* 7e */ |
| 54 | }; | 54 | }; |
| @@ -145,12 +145,6 @@ static int stac9766_ac97_write(struct snd_soc_codec *codec, unsigned int reg, | |||
| 145 | struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); | 145 | struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); |
| 146 | u16 *cache = codec->reg_cache; | 146 | u16 *cache = codec->reg_cache; |
| 147 | 147 | ||
| 148 | if (reg > AC97_STAC_PAGE0) { | ||
| 149 | stac9766_ac97_write(codec, AC97_INT_PAGING, 0); | ||
| 150 | soc_ac97_ops->write(ac97, reg, val); | ||
| 151 | stac9766_ac97_write(codec, AC97_INT_PAGING, 1); | ||
| 152 | return 0; | ||
| 153 | } | ||
| 154 | if (reg / 2 >= ARRAY_SIZE(stac9766_reg)) | 148 | if (reg / 2 >= ARRAY_SIZE(stac9766_reg)) |
| 155 | return -EIO; | 149 | return -EIO; |
| 156 | 150 | ||
| @@ -165,12 +159,6 @@ static unsigned int stac9766_ac97_read(struct snd_soc_codec *codec, | |||
| 165 | struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); | 159 | struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); |
| 166 | u16 val = 0, *cache = codec->reg_cache; | 160 | u16 val = 0, *cache = codec->reg_cache; |
| 167 | 161 | ||
| 168 | if (reg > AC97_STAC_PAGE0) { | ||
| 169 | stac9766_ac97_write(codec, AC97_INT_PAGING, 0); | ||
| 170 | val = soc_ac97_ops->read(ac97, reg - AC97_STAC_PAGE0); | ||
| 171 | stac9766_ac97_write(codec, AC97_INT_PAGING, 1); | ||
| 172 | return val; | ||
| 173 | } | ||
| 174 | if (reg / 2 >= ARRAY_SIZE(stac9766_reg)) | 162 | if (reg / 2 >= ARRAY_SIZE(stac9766_reg)) |
| 175 | return -EIO; | 163 | return -EIO; |
| 176 | 164 | ||
diff --git a/sound/soc/codecs/stac9766.h b/sound/soc/codecs/stac9766.h index cb0d5505d571..e35cee82f416 100644 --- a/sound/soc/codecs/stac9766.h +++ b/sound/soc/codecs/stac9766.h | |||
| @@ -5,9 +5,8 @@ | |||
| 5 | #ifndef _STAC9766_H | 5 | #ifndef _STAC9766_H |
| 6 | #define _STAC9766_H | 6 | #define _STAC9766_H |
| 7 | 7 | ||
| 8 | #define AC97_STAC_PAGE0 0x1000 | 8 | #define AC97_STAC_DA_CONTROL 0x6A |
| 9 | #define AC97_STAC_DA_CONTROL (AC97_STAC_PAGE0 | 0x6A) | 9 | #define AC97_STAC_ANALOG_SPECIAL 0x6E |
| 10 | #define AC97_STAC_ANALOG_SPECIAL (AC97_STAC_PAGE0 | 0x6E) | ||
| 11 | #define AC97_STAC_STEREO_MIC 0x78 | 10 | #define AC97_STAC_STEREO_MIC 0x78 |
| 12 | 11 | ||
| 13 | #endif | 12 | #endif |
