diff options
author | James Courtier-Dutton <James@superbug.co.uk> | 2006-12-09 19:00:38 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-02-09 03:02:23 -0500 |
commit | 7c157069bc953c3cfb5926e92d358e46423bf942 (patch) | |
tree | 25465c6c42c73599b84e1be760a8092cdc2a9919 /sound/pci/ca0106/ca0106_main.c | |
parent | a5f65029ad5c5262ee3aff5165698e431415cf7c (diff) |
[ALSA] ca0106: Fix sound capture on Audigy LS via AC97.
Fixes ALSA bug#2286
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ca0106/ca0106_main.c')
-rw-r--r-- | sound/pci/ca0106/ca0106_main.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index f61f052f6d14..6f781b811876 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -1382,7 +1382,6 @@ static int __devinit snd_ca0106_create(int dev, struct snd_card *card, | |||
1382 | snd_ca0106_ptr_write(chip, SPDIF_SELECT1, 0, 0xf); | 1382 | snd_ca0106_ptr_write(chip, SPDIF_SELECT1, 0, 0xf); |
1383 | snd_ca0106_ptr_write(chip, SPDIF_SELECT2, 0, 0x000f0000); /* 0x0b000000 for digital, 0x000b0000 for analog, from win2000 drivers. Use 0x000f0000 for surround71 */ | 1383 | snd_ca0106_ptr_write(chip, SPDIF_SELECT2, 0, 0x000f0000); /* 0x0b000000 for digital, 0x000b0000 for analog, from win2000 drivers. Use 0x000f0000 for surround71 */ |
1384 | chip->spdif_enable = 0; /* Set digital SPDIF output off */ | 1384 | chip->spdif_enable = 0; /* Set digital SPDIF output off */ |
1385 | chip->capture_source = 3; /* Set CAPTURE_SOURCE */ | ||
1386 | //snd_ca0106_ptr_write(chip, 0x45, 0, 0); /* Analogue out */ | 1385 | //snd_ca0106_ptr_write(chip, 0x45, 0, 0); /* Analogue out */ |
1387 | //snd_ca0106_ptr_write(chip, 0x45, 0, 0xf00); /* Digital out */ | 1386 | //snd_ca0106_ptr_write(chip, 0x45, 0, 0xf00); /* Digital out */ |
1388 | 1387 | ||
@@ -1402,8 +1401,22 @@ static int __devinit snd_ca0106_create(int dev, struct snd_card *card, | |||
1402 | snd_ca0106_ptr_write(chip, PLAYBACK_VOLUME1, ch, 0xffffffff); /* Mute */ | 1401 | snd_ca0106_ptr_write(chip, PLAYBACK_VOLUME1, ch, 0xffffffff); /* Mute */ |
1403 | snd_ca0106_ptr_write(chip, PLAYBACK_VOLUME2, ch, 0xffffffff); /* Mute */ | 1402 | snd_ca0106_ptr_write(chip, PLAYBACK_VOLUME2, ch, 0xffffffff); /* Mute */ |
1404 | } | 1403 | } |
1405 | snd_ca0106_ptr_write(chip, CAPTURE_SOURCE, 0x0, 0x333300e4); /* Select MIC, Line in, TAD in, AUX in */ | 1404 | if (chip->details->i2c_adc == 1) { |
1406 | chip->capture_source = 3; /* Set CAPTURE_SOURCE */ | 1405 | /* Select MIC, Line in, TAD in, AUX in */ |
1406 | snd_ca0106_ptr_write(chip, CAPTURE_SOURCE, 0x0, 0x333300e4); | ||
1407 | /* Default to CAPTURE_SOURCE to i2s in */ | ||
1408 | chip->capture_source = 3; | ||
1409 | } else if (chip->details->ac97 == 1) { | ||
1410 | /* Default to AC97 in */ | ||
1411 | snd_ca0106_ptr_write(chip, CAPTURE_SOURCE, 0x0, 0x444400e4); | ||
1412 | /* Default to CAPTURE_SOURCE to AC97 in */ | ||
1413 | chip->capture_source = 4; | ||
1414 | } else { | ||
1415 | /* Select MIC, Line in, TAD in, AUX in */ | ||
1416 | snd_ca0106_ptr_write(chip, CAPTURE_SOURCE, 0x0, 0x333300e4); | ||
1417 | /* Default to Set CAPTURE_SOURCE to i2s in */ | ||
1418 | chip->capture_source = 3; | ||
1419 | } | ||
1407 | 1420 | ||
1408 | if (chip->details->gpio_type == 2) { /* The SB0438 use GPIO differently. */ | 1421 | if (chip->details->gpio_type == 2) { /* The SB0438 use GPIO differently. */ |
1409 | /* FIXME: Still need to find out what the other GPIO bits do. E.g. For digital spdif out. */ | 1422 | /* FIXME: Still need to find out what the other GPIO bits do. E.g. For digital spdif out. */ |