summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-06-20 05:37:27 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-06-20 05:37:27 -0300
commit8a2c474623f3a2d99b064b42c074becd6656495f (patch)
tree66e2d39deb6cec1afb7bc56765ef4ef81ab9450b
parentbfa0b519e11de46cb9f89c55924d1c4ecec0b9bb (diff)
downloadmediapointer-dvb-s2-8a2c474623f3a2d99b064b42c074becd6656495f.tar.gz
mediapointer-dvb-s2-8a2c474623f3a2d99b064b42c074becd6656495f.tar.bz2
Hardware MPEG audio fix for SAA7134 based "KNC One TV-Station DVR" card
From: Rafael Bilski <rafalbilski@interia.pl> With previous patch card is generating MPEG audio stream too. Unfortunatly I2S audio output is muted. Unmute it. Signed-off-by: Rafal Bilski <rafalbilski@interia.pl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-empress.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c
index dc4593fdd..398f36b98 100644
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c
@@ -106,6 +106,10 @@ static int ts_open(struct inode *inode, struct file *file)
if (dev->empress_users)
goto done_up;
+ /* Unmute audio */
+ saa_writeb(SAA7134_AUDIO_MUTE_CTRL,
+ saa_readb(SAA7134_AUDIO_MUTE_CTRL) & ~(1 << 6));
+
dev->empress_users++;
file->private_data = dev;
err = 0;
@@ -131,6 +135,10 @@ static int ts_release(struct inode *inode, struct file *file)
/* stop the encoder */
ts_reset_encoder(dev);
+ /* Mute audio */
+ saa_writeb(SAA7134_AUDIO_MUTE_CTRL,
+ saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1 << 6));
+
mutex_unlock(&dev->empress_tsq.lock);
return 0;
}