diff options
Diffstat (limited to 'sound/pci/fm801.c')
-rw-r--r-- | sound/pci/fm801.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 9939109f05a2..4c300e6149fc 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <sound/driver.h> | ||
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
25 | #include <linux/init.h> | 24 | #include <linux/init.h> |
26 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
@@ -979,6 +978,27 @@ static unsigned int snd_fm801_tea575x_64pcr_read(struct snd_tea575x *tea) | |||
979 | return val; | 978 | return val; |
980 | } | 979 | } |
981 | 980 | ||
981 | static void snd_fm801_tea575x_64pcr_mute(struct snd_tea575x *tea, | ||
982 | unsigned int mute) | ||
983 | { | ||
984 | struct fm801 *chip = tea->private_data; | ||
985 | unsigned short reg; | ||
986 | |||
987 | spin_lock_irq(&chip->reg_lock); | ||
988 | |||
989 | reg = inw(FM801_REG(chip, GPIO_CTRL)); | ||
990 | if (mute) | ||
991 | /* 0xf800 (mute) */ | ||
992 | reg &= ~FM801_GPIO_GP(TEA_64PCR_WRITE_ENABLE); | ||
993 | else | ||
994 | /* 0xf802 (unmute) */ | ||
995 | reg |= FM801_GPIO_GP(TEA_64PCR_WRITE_ENABLE); | ||
996 | outw(reg, FM801_REG(chip, GPIO_CTRL)); | ||
997 | udelay(1); | ||
998 | |||
999 | spin_unlock_irq(&chip->reg_lock); | ||
1000 | } | ||
1001 | |||
982 | static struct snd_tea575x_ops snd_fm801_tea_ops[3] = { | 1002 | static struct snd_tea575x_ops snd_fm801_tea_ops[3] = { |
983 | { | 1003 | { |
984 | /* 1 = MediaForte 256-PCS */ | 1004 | /* 1 = MediaForte 256-PCS */ |
@@ -994,6 +1014,7 @@ static struct snd_tea575x_ops snd_fm801_tea_ops[3] = { | |||
994 | /* 3 = MediaForte 64-PCR */ | 1014 | /* 3 = MediaForte 64-PCR */ |
995 | .write = snd_fm801_tea575x_64pcr_write, | 1015 | .write = snd_fm801_tea575x_64pcr_write, |
996 | .read = snd_fm801_tea575x_64pcr_read, | 1016 | .read = snd_fm801_tea575x_64pcr_read, |
1017 | .mute = snd_fm801_tea575x_64pcr_mute, | ||
997 | } | 1018 | } |
998 | }; | 1019 | }; |
999 | #endif | 1020 | #endif |