diff options
Diffstat (limited to 'sound/pci/ac97/ac97_codec.c')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 36a33ae9ae03..996fcfb09532 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -150,7 +150,7 @@ static const ac97_codec_id_t snd_ac97_codec_ids[] = { | |||
150 | { 0x4e534331, 0xffffffff, "LM4549", NULL, NULL }, | 150 | { 0x4e534331, 0xffffffff, "LM4549", NULL, NULL }, |
151 | { 0x4e534350, 0xffffffff, "LM4550", NULL, NULL }, | 151 | { 0x4e534350, 0xffffffff, "LM4550", NULL, NULL }, |
152 | { 0x50534304, 0xffffffff, "UCB1400", NULL, NULL }, | 152 | { 0x50534304, 0xffffffff, "UCB1400", NULL, NULL }, |
153 | { 0x53494c20, 0xffffffe0, "Si3036,8", NULL, mpatch_si3036 }, | 153 | { 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH }, |
154 | { 0x54524102, 0xffffffff, "TR28022", NULL, NULL }, | 154 | { 0x54524102, 0xffffffff, "TR28022", NULL, NULL }, |
155 | { 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, | 155 | { 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, |
156 | { 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99] | 156 | { 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99] |
@@ -666,6 +666,11 @@ AC97_SINGLE("LFE Playback Volume", AC97_CENTER_LFE_MASTER, 8, 31, 1) | |||
666 | static const snd_kcontrol_new_t snd_ac97_control_eapd = | 666 | static const snd_kcontrol_new_t snd_ac97_control_eapd = |
667 | AC97_SINGLE("External Amplifier", AC97_POWERDOWN, 15, 1, 1); | 667 | AC97_SINGLE("External Amplifier", AC97_POWERDOWN, 15, 1, 1); |
668 | 668 | ||
669 | static const snd_kcontrol_new_t snd_ac97_controls_modem_switches[2] = { | ||
670 | AC97_SINGLE("Off-hook Switch", AC97_GPIO_STATUS, 0, 1, 0), | ||
671 | AC97_SINGLE("Caller ID Switch", AC97_GPIO_STATUS, 2, 1, 0) | ||
672 | }; | ||
673 | |||
669 | /* change the existing EAPD control as inverted */ | 674 | /* change the existing EAPD control as inverted */ |
670 | static void set_inv_eapd(ac97_t *ac97, snd_kcontrol_t *kctl) | 675 | static void set_inv_eapd(ac97_t *ac97, snd_kcontrol_t *kctl) |
671 | { | 676 | { |
@@ -1526,13 +1531,25 @@ static int snd_ac97_mixer_build(ac97_t * ac97) | |||
1526 | 1531 | ||
1527 | static int snd_ac97_modem_build(snd_card_t * card, ac97_t * ac97) | 1532 | static int snd_ac97_modem_build(snd_card_t * card, ac97_t * ac97) |
1528 | { | 1533 | { |
1529 | /* TODO */ | 1534 | int err, idx; |
1535 | |||
1530 | //printk("AC97_GPIO_CFG = %x\n",snd_ac97_read(ac97,AC97_GPIO_CFG)); | 1536 | //printk("AC97_GPIO_CFG = %x\n",snd_ac97_read(ac97,AC97_GPIO_CFG)); |
1531 | snd_ac97_write(ac97, AC97_GPIO_CFG, 0xffff & ~(AC97_GPIO_LINE1_OH)); | 1537 | snd_ac97_write(ac97, AC97_GPIO_CFG, 0xffff & ~(AC97_GPIO_LINE1_OH)); |
1532 | snd_ac97_write(ac97, AC97_GPIO_POLARITY, 0xffff & ~(AC97_GPIO_LINE1_OH)); | 1538 | snd_ac97_write(ac97, AC97_GPIO_POLARITY, 0xffff & ~(AC97_GPIO_LINE1_OH)); |
1533 | snd_ac97_write(ac97, AC97_GPIO_STICKY, 0xffff); | 1539 | snd_ac97_write(ac97, AC97_GPIO_STICKY, 0xffff); |
1534 | snd_ac97_write(ac97, AC97_GPIO_WAKEUP, 0x0); | 1540 | snd_ac97_write(ac97, AC97_GPIO_WAKEUP, 0x0); |
1535 | snd_ac97_write(ac97, AC97_MISC_AFE, 0x0); | 1541 | snd_ac97_write(ac97, AC97_MISC_AFE, 0x0); |
1542 | |||
1543 | /* build modem switches */ | ||
1544 | for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_modem_switches); idx++) | ||
1545 | if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_modem_switches[idx], ac97))) < 0) | ||
1546 | return err; | ||
1547 | |||
1548 | /* build chip specific controls */ | ||
1549 | if (ac97->build_ops->build_specific) | ||
1550 | if ((err = ac97->build_ops->build_specific(ac97)) < 0) | ||
1551 | return err; | ||
1552 | |||
1536 | return 0; | 1553 | return 0; |
1537 | } | 1554 | } |
1538 | 1555 | ||