aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/fm801.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andy@smile.org.ua>2008-01-24 18:11:53 +0100
committerJaroslav Kysela <perex@perex.cz>2008-01-31 17:30:14 +0100
commit69252128ec628e9d19739db0101e1826d993aecb (patch)
tree449a9fd1ec343a57a7ad7626e69c7b4bad37e11b /sound/pci/fm801.c
parent29a52c242d76deee155cb94756bcf7ebf58de4fe (diff)
[ALSA] fm801 - Add mute support for FM-only card with FM801 PCI to tuner bridge
This is improvement of the early support of the FM-only cards where the fm801 chip represents the PCI to tuner bridge. The tuner initialization isn't included the mute on as well as mute support via V4L request. Proposed patch should fix this at least for 64-PCR model. Signed-off-by: Andy Shevchenko <andy@smile.org.ua> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/fm801.c')
-rw-r--r--sound/pci/fm801.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index 25c1087d2c0..4c300e6149f 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -978,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 */
@@ -993,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