aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sound/tea575x-tuner.h1
-rw-r--r--sound/i2c/other/tea575x-tuner.c8
-rw-r--r--sound/pci/fm801.c22
3 files changed, 31 insertions, 0 deletions
diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h
index e8eeb3a1ed2..b62ce3e077f 100644
--- a/include/sound/tea575x-tuner.h
+++ b/include/sound/tea575x-tuner.h
@@ -30,6 +30,7 @@ struct snd_tea575x;
struct snd_tea575x_ops {
void (*write)(struct snd_tea575x *tea, unsigned int val);
unsigned int (*read)(struct snd_tea575x *tea);
+ void (*mute)(struct snd_tea575x *tea, unsigned int mute);
};
struct snd_tea575x {
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
index 28a4af782f5..87e3aefeddc 100644
--- a/sound/i2c/other/tea575x-tuner.c
+++ b/sound/i2c/other/tea575x-tuner.c
@@ -158,6 +158,10 @@ static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
struct video_audio v;
if(copy_from_user(&v, arg, sizeof(v)))
return -EFAULT;
+ if (tea->ops->mute)
+ tea->ops->mute(tea,
+ (v.flags &
+ VIDEO_AUDIO_MUTE) ? 1 : 0);
if(v.audio)
return -EINVAL;
return 0;
@@ -205,6 +209,10 @@ void snd_tea575x_init(struct snd_tea575x *tea)
tea->freq = 90500 * 16; /* 90.5Mhz default */
snd_tea575x_set_freq(tea);
+
+ /* mute on init */
+ if (tea->ops->mute)
+ tea->ops->mute(tea, 1);
}
void snd_tea575x_exit(struct snd_tea575x *tea)
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