diff options
author | Dmitry Belimov <d.belimov@gmail.com> | 2008-06-10 17:43:58 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 12:09:03 +0200 |
commit | 37df96d39eefd0c1db69a336895c4691d2bc63a1 (patch) | |
tree | de7e542e266a974d7493e343c782d84881f3c282 /drivers/media/video/saa7134/saa7134-tvaudio.c | |
parent | V4L/DVB (8014): gl861: coding style fixes (diff) | |
download | linux-37df96d39eefd0c1db69a336895c4691d2bc63a1.tar.xz linux-37df96d39eefd0c1db69a336895c4691d2bc63a1.zip |
V4L/DVB (8019): New for I2S on for MPEG of saa7134_empress
Rework saa7134_enable_i2s function. Remove vendor specific data.
Configure I2S output port specific for model of SAA7133/5-SAA7134.
I think it is more good.
Renamed definition of I2S audio output control register. It`s SAA7133/5 register
Start video port after configuring procedure.
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-tvaudio.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-tvaudio.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index 460d4a35e5f1..4cc3741c5472 100644 --- a/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -874,23 +874,32 @@ void saa7134_enable_i2s(struct saa7134_dev *dev) if (!card_is_empress(dev)) return; - switch (dev->board) { - case SAA7134_BOARD_BEHOLD_M6: - /* configure GPIO for out audio */ - saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000); - /* Set I2S format */ - saa_writeb(SAA7134_I2S_AUDIO_CONTROL, 0x00); + 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); + saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x11); break; - default: + + 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); + 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; } } |