summaryrefslogtreecommitdiff
path: root/sound/pci/via82xx_modem.c
diff options
context:
space:
mode:
authorSasha Khapyorsky <sashak@smlink.com>2005-05-29 17:10:07 +0400
committerJaroslav Kysela <perex@suse.cz>2005-06-22 14:27:21 +0400
commit83a5b72ad7c7cbd0d155d922733b2429f46801bf (patch)
tree631cfda2bc042da17cfec15902fc6d4b735de07c /sound/pci/via82xx_modem.c
parent87d61c290b5de63cc18ed5ec8103e30fe297373e (diff)
downloadlinux-83a5b72ad7c7cbd0d155d922733b2429f46801bf.tar.xz
[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,
{
via82xx_t *chip = ac97->private_data;
unsigned int xval;
-
+ if(reg == AC97_GPIO_STATUS) {
+ outl(val, VIAREG(chip, GPI_STATUS));
+ return;
+ }
xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY;
xval <<= VIA_REG_AC97_CODEC_ID_SHIFT;
xval |= reg << VIA_REG_AC97_CMD_SHIFT;
@@ -544,25 +547,6 @@ static int snd_via82xx_pcm_trigger(snd_pcm_substream_t * substream, int cmd)
return 0;
}
-static int snd_via82xx_modem_pcm_trigger(snd_pcm_substream_t * substream, int cmd)
-{
- via82xx_t *chip = snd_pcm_substream_chip(substream);
- unsigned int val = 0;
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- val = snd_ac97_read(chip->ac97, AC97_GPIO_STATUS);
- outl(val|AC97_GPIO_LINE1_OH, VIAREG(chip, GPI_STATUS));
- break;
- case SNDRV_PCM_TRIGGER_STOP:
- val = snd_ac97_read(chip->ac97, AC97_GPIO_STATUS);
- outl(val&~AC97_GPIO_LINE1_OH, VIAREG(chip, GPI_STATUS));
- break;
- default:
- break;
- }
- return snd_via82xx_pcm_trigger(substream, cmd);
-}
-
/*
* pointer callbacks
*/
@@ -806,7 +790,7 @@ static snd_pcm_ops_t snd_via686_playback_ops = {
.hw_params = snd_via82xx_hw_params,
.hw_free = snd_via82xx_hw_free,
.prepare = snd_via82xx_pcm_prepare,
- .trigger = snd_via82xx_modem_pcm_trigger,
+ .trigger = snd_via82xx_pcm_trigger,
.pointer = snd_via686_pcm_pointer,
.page = snd_pcm_sgbuf_ops_page,
};
@@ -819,7 +803,7 @@ static snd_pcm_ops_t snd_via686_capture_ops = {
.hw_params = snd_via82xx_hw_params,
.hw_free = snd_via82xx_hw_free,
.prepare = snd_via82xx_pcm_prepare,
- .trigger = snd_via82xx_modem_pcm_trigger,
+ .trigger = snd_via82xx_pcm_trigger,
.pointer = snd_via686_pcm_pointer,
.page = snd_pcm_sgbuf_ops_page,
};