diff options
author | Maciej S. Szmigiero <mail@maciej.szmigiero.name> | 2015-03-06 10:59:00 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-03-06 11:01:30 -0500 |
commit | d6482288aadcf19e348cbccff7a605790a3b3875 (patch) | |
tree | 6f4418ab84157ac3f5078907c4278a3a59200da8 /sound/pci/ac97 | |
parent | a52afea68f94d2501b7fe1fa18cc6acf84e35a76 (diff) |
ALSA: ac97: Add VT1613 AC97 codec support
Patch to add an VT1613 AC97 codec support.
This codec has additional DC offset removal control,
headphone output and no video input.
Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ac97')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 1 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_patch.c | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 5ee2f17c287c..5bca1a33fed6 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -177,6 +177,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = { | |||
177 | { 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)] | 177 | { 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)] |
178 | { 0x54584e03, 0xffffffff, "TLV320AIC27", NULL, NULL }, | 178 | { 0x54584e03, 0xffffffff, "TLV320AIC27", NULL, NULL }, |
179 | { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, | 179 | { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, |
180 | { 0x56494120, 0xfffffff0, "VIA1613", patch_vt1613, NULL }, | ||
180 | { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF | 181 | { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF |
181 | { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF | 182 | { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF |
182 | { 0x56494182, 0xffffffff, "VIA1618", patch_vt1618, NULL }, | 183 | { 0x56494182, 0xffffffff, "VIA1618", patch_vt1618, NULL }, |
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index ceaac1c41906..eca22100f70d 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -3352,6 +3352,39 @@ static int patch_cm9780(struct snd_ac97 *ac97) | |||
3352 | } | 3352 | } |
3353 | 3353 | ||
3354 | /* | 3354 | /* |
3355 | * VIA VT1613 codec | ||
3356 | */ | ||
3357 | static const struct snd_kcontrol_new snd_ac97_controls_vt1613[] = { | ||
3358 | AC97_SINGLE("DC Offset removal", 0x5a, 10, 1, 0), | ||
3359 | }; | ||
3360 | |||
3361 | static int patch_vt1613_specific(struct snd_ac97 *ac97) | ||
3362 | { | ||
3363 | int err; | ||
3364 | |||
3365 | err = patch_build_controls(ac97, &snd_ac97_controls_vt1613[0], | ||
3366 | ARRAY_SIZE(snd_ac97_controls_vt1613)); | ||
3367 | if (err) | ||
3368 | return err; | ||
3369 | |||
3370 | return 0; | ||
3371 | }; | ||
3372 | |||
3373 | static const struct snd_ac97_build_ops patch_vt1613_ops = { | ||
3374 | .build_specific = patch_vt1613_specific | ||
3375 | }; | ||
3376 | |||
3377 | static int patch_vt1613(struct snd_ac97 *ac97) | ||
3378 | { | ||
3379 | ac97->build_ops = &patch_vt1613_ops; | ||
3380 | |||
3381 | ac97->flags |= AC97_HAS_NO_VIDEO; | ||
3382 | ac97->caps |= AC97_BC_HEADPHONE; | ||
3383 | |||
3384 | return 0; | ||
3385 | } | ||
3386 | |||
3387 | /* | ||
3355 | * VIA VT1616 codec | 3388 | * VIA VT1616 codec |
3356 | */ | 3389 | */ |
3357 | static const struct snd_kcontrol_new snd_ac97_controls_vt1616[] = { | 3390 | static const struct snd_kcontrol_new snd_ac97_controls_vt1616[] = { |