aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/via82xx_modem.c
diff options
context:
space:
mode:
authorSasha Khapyorsky <sashak@smlink.com>2005-05-29 09:10:07 -0400
committerJaroslav Kysela <perex@suse.cz>2005-06-22 06:27:21 -0400
commit83a5b72ad7c7cbd0d155d922733b2429f46801bf (patch)
tree631cfda2bc042da17cfec15902fc6d4b735de07c /sound/pci/via82xx_modem.c
parent87d61c290b5de63cc18ed5ec8103e30fe297373e (diff)
[ALSA] PCI modem drivers update
ATIIXP-modem driver,Intel8x0-modem driver,VIA82xx-modem driver Modem drivers (atiixp-modem, intel8x0m, via82xx-modem) migration for using MC97 generic modem mixer for off-hook operation. Signed-off-by: Sasha Khapyorsky <sashak@smlink.com> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/via82xx_modem.c')
-rw-r--r--sound/pci/via82xx_modem.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c
index 276ce5299684..e10fceb3ede9 100644
--- a/sound/pci/via82xx_modem.c
+++ b/sound/pci/via82xx_modem.c
@@ -420,7 +420,10 @@ static void snd_via82xx_codec_write(ac97_t *ac97,
420{ 420{
421 via82xx_t *chip = ac97->private_data; 421 via82xx_t *chip = ac97->private_data;
422 unsigned int xval; 422 unsigned int xval;
423 423 if(reg == AC97_GPIO_STATUS) {
424 outl(val, VIAREG(chip, GPI_STATUS));
425 return;
426 }
424 xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY; 427 xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY;
425 xval <<= VIA_REG_AC97_CODEC_ID_SHIFT; 428 xval <<= VIA_REG_AC97_CODEC_ID_SHIFT;
426 xval |= reg << VIA_REG_AC97_CMD_SHIFT; 429 xval |= reg << VIA_REG_AC97_CMD_SHIFT;
@@ -544,25 +547,6 @@ static int snd_via82xx_pcm_trigger(snd_pcm_substream_t * substream, int cmd)
544 return 0; 547 return 0;
545} 548}
546 549
547static int snd_via82xx_modem_pcm_trigger(snd_pcm_substream_t * substream, int cmd)
548{
549 via82xx_t *chip = snd_pcm_substream_chip(substream);
550 unsigned int val = 0;
551 switch (cmd) {
552 case SNDRV_PCM_TRIGGER_START:
553 val = snd_ac97_read(chip->ac97, AC97_GPIO_STATUS);
554 outl(val|AC97_GPIO_LINE1_OH, VIAREG(chip, GPI_STATUS));
555 break;
556 case SNDRV_PCM_TRIGGER_STOP:
557 val = snd_ac97_read(chip->ac97, AC97_GPIO_STATUS);
558 outl(val&~AC97_GPIO_LINE1_OH, VIAREG(chip, GPI_STATUS));
559 break;
560 default:
561 break;
562 }
563 return snd_via82xx_pcm_trigger(substream, cmd);
564}
565
566/* 550/*
567 * pointer callbacks 551 * pointer callbacks
568 */ 552 */
@@ -806,7 +790,7 @@ static snd_pcm_ops_t snd_via686_playback_ops = {
806 .hw_params = snd_via82xx_hw_params, 790 .hw_params = snd_via82xx_hw_params,
807 .hw_free = snd_via82xx_hw_free, 791 .hw_free = snd_via82xx_hw_free,
808 .prepare = snd_via82xx_pcm_prepare, 792 .prepare = snd_via82xx_pcm_prepare,
809 .trigger = snd_via82xx_modem_pcm_trigger, 793 .trigger = snd_via82xx_pcm_trigger,
810 .pointer = snd_via686_pcm_pointer, 794 .pointer = snd_via686_pcm_pointer,
811 .page = snd_pcm_sgbuf_ops_page, 795 .page = snd_pcm_sgbuf_ops_page,
812}; 796};
@@ -819,7 +803,7 @@ static snd_pcm_ops_t snd_via686_capture_ops = {
819 .hw_params = snd_via82xx_hw_params, 803 .hw_params = snd_via82xx_hw_params,
820 .hw_free = snd_via82xx_hw_free, 804 .hw_free = snd_via82xx_hw_free,
821 .prepare = snd_via82xx_pcm_prepare, 805 .prepare = snd_via82xx_pcm_prepare,
822 .trigger = snd_via82xx_modem_pcm_trigger, 806 .trigger = snd_via82xx_pcm_trigger,
823 .pointer = snd_via686_pcm_pointer, 807 .pointer = snd_via686_pcm_pointer,
824 .page = snd_pcm_sgbuf_ops_page, 808 .page = snd_pcm_sgbuf_ops_page,
825}; 809};