diff options
author | Gerd Knorr <devnull@localhost> | 2004-11-24 11:55:24 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-11-24 11:55:24 +0000 |
commit | a359b1eb37c69d215d34125a15076f646e76c6d7 (patch) | |
tree | f4c39e1a4905a37777a7c82f4cadc427b2752d82 /linux/drivers/media/video/saa7134/saa7134-tvaudio.c | |
parent | 09f6ef93badf234d981c63f98bb1e36254243d31 (diff) | |
download | mediapointer-dvb-s2-a359b1eb37c69d215d34125a15076f646e76c6d7.tar.gz mediapointer-dvb-s2-a359b1eb37c69d215d34125a15076f646e76c6d7.tar.bz2 |
- empress fixes by Gert Vervoort.
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-tvaudio.c')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-tvaudio.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c index 251aa73d4..64c8ac288 100644 --- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-tvaudio.c,v 1.18 2004/11/10 11:07:24 kraxel Exp $ + * $Id: saa7134-tvaudio.c,v 1.19 2004/11/24 11:55:24 kraxel Exp $ * * device driver for philips saa7134 based TV cards * tv audio decoder (fm stereo, nicam, ...) @@ -237,7 +237,7 @@ static void mute_input_7134(struct saa7134_dev *dev) if (PCI_DEVICE_ID_PHILIPS_SAA7134 == dev->pci->device) /* 7134 mute */ - saa_writeb(SAA7134_AUDIO_MUTE_CTRL, mute ? 0xff : 0xbb); + saa_writeb(SAA7134_AUDIO_MUTE_CTRL, mute ? 0xbf : 0xbb); /* switch internal audio mux */ switch (in->amux) { @@ -885,6 +885,21 @@ static int tvaudio_thread_ddep(void *data) /* ------------------------------------------------------------------ */ /* common stuff + external entry points */ +static void saa7134_enable_i2s(struct saa7134_dev *dev) +{ + int i2s_format; + + if (!card_is_empress(dev)) + return; + i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01; + + /* enable I2S audio output for the mpeg encoder */ + saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80); + saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2s_format); + saa_writeb(SAA7134_I2S_OUTPUT_LEVEL, 0x0F); + saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x01); +} + int saa7134_tvaudio_rx2mode(u32 rx) { u32 mode; @@ -927,6 +942,7 @@ void saa7134_tvaudio_setinput(struct saa7134_dev *dev, mute_input_7133(dev); break; } + saa7134_enable_i2s(dev); } void saa7134_tvaudio_setvolume(struct saa7134_dev *dev, int level) @@ -962,18 +978,6 @@ int saa7134_tvaudio_init2(struct saa7134_dev *dev) DECLARE_MUTEX_LOCKED(sem); int (*my_thread)(void *data) = NULL; - /* enable I2S audio output */ - if (card_is_empress(dev)) { - int i2sform = (48000 == dev->oss.rate) - ? 0x01 : 0x00; - - /* enable I2S output */ - saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80); - saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2sform); - saa_writeb(SAA7134_I2S_OUTPUT_LEVEL, 0x0F); - saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x01); - } - switch (dev->pci->device) { case PCI_DEVICE_ID_PHILIPS_SAA7134: my_thread = tvaudio_thread; @@ -996,6 +1000,7 @@ int saa7134_tvaudio_init2(struct saa7134_dev *dev) saa7134_tvaudio_do_scan(dev); } + saa7134_enable_i2s(dev); return 0; } |