X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fpci%2Ffm801.c;h=4c300e6149fca554891ae85eb2685caf36d0b23b;hb=caea99ef339af8e07cda8d03fa415e4b8820f400;hp=11015178e2071004e101cfd59fceaaf62a0adae2;hpb=22aadf8a07067644e101267ed5003043f2ad05bf;p=linux-2.6-omap-h63xx.git diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 11015178e20..4c300e6149f 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -1,6 +1,6 @@ /* * The driver for the ForteMedia FM801 based soundcards - * Copyright (c) by Jaroslav Kysela + * Copyright (c) by Jaroslav Kysela * * Support FM only card by Andy Shevchenko * @@ -20,7 +20,6 @@ * */ -#include #include #include #include @@ -42,7 +41,7 @@ #define TEA575X_RADIO 1 #endif -MODULE_AUTHOR("Jaroslav Kysela "); +MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("ForteMedia FM801"); MODULE_LICENSE("GPL"); MODULE_SUPPORTED_DEVICE("{{ForteMedia,FM801}," @@ -979,6 +978,27 @@ static unsigned int snd_fm801_tea575x_64pcr_read(struct snd_tea575x *tea) return val; } +static void snd_fm801_tea575x_64pcr_mute(struct snd_tea575x *tea, + unsigned int mute) +{ + struct fm801 *chip = tea->private_data; + unsigned short reg; + + spin_lock_irq(&chip->reg_lock); + + reg = inw(FM801_REG(chip, GPIO_CTRL)); + if (mute) + /* 0xf800 (mute) */ + reg &= ~FM801_GPIO_GP(TEA_64PCR_WRITE_ENABLE); + else + /* 0xf802 (unmute) */ + reg |= FM801_GPIO_GP(TEA_64PCR_WRITE_ENABLE); + outw(reg, FM801_REG(chip, GPIO_CTRL)); + udelay(1); + + spin_unlock_irq(&chip->reg_lock); +} + static struct snd_tea575x_ops snd_fm801_tea_ops[3] = { { /* 1 = MediaForte 256-PCS */ @@ -994,6 +1014,7 @@ static struct snd_tea575x_ops snd_fm801_tea_ops[3] = { /* 3 = MediaForte 64-PCR */ .write = snd_fm801_tea575x_64pcr_write, .read = snd_fm801_tea575x_64pcr_read, + .mute = snd_fm801_tea575x_64pcr_mute, } }; #endif