diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-21 17:06:09 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-21 17:06:09 +0400 |
commit | e66d90fb4abd0a27ee96f57a32fb561221c4d6ae (patch) | |
tree | 3337cba94c7444b06fdb0e8b487287d07b71f4a0 /drivers/media/video/saa7134/saa7134-tvaudio.c | |
parent | 55ca089e2579de90f048aca2a3030b8b2f864813 (diff) | |
parent | 14b395e35d1afdd8019d11b92e28041fad591b71 (diff) | |
download | linux-e66d90fb4abd0a27ee96f57a32fb561221c4d6ae.tar.xz |
Merge branch 'linus' into xen-64bit
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-tvaudio.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-tvaudio.c | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index 232af598d947..c5d0b44c179e 100644 --- a/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -477,7 +477,6 @@ static int tvaudio_thread(void *data) unsigned int i, audio, nscan; int max1,max2,carrier,rx,mode,lastmode,default_carrier; - set_freezable(); for (;;) { @@ -775,7 +774,6 @@ static int tvaudio_thread_ddep(void *data) struct saa7134_dev *dev = data; u32 value, norms; - set_freezable(); for (;;) { tvaudio_sleep(dev,-1); @@ -873,13 +871,34 @@ void saa7134_enable_i2s(struct saa7134_dev *dev) 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); + if (dev->pci->device == PCI_DEVICE_ID_PHILIPS_SAA7130) + return; + + /* configure GPIO for out */ + saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000); + + switch (dev->pci->device) { + case PCI_DEVICE_ID_PHILIPS_SAA7133: + case PCI_DEVICE_ID_PHILIPS_SAA7135: + /* Set I2S format (SONY) */ + saa_writeb(SAA7133_I2S_AUDIO_CONTROL, 0x00); + /* Start I2S */ + saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x11); + break; + + case PCI_DEVICE_ID_PHILIPS_SAA7134: + 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); + + default: + break; + } } int saa7134_tvaudio_rx2mode(u32 rx) |