diff options
author | Dmitri Belimov <d.belimov@gmail.com> | 2008-05-21 02:16:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:08:01 -0400 |
commit | f808a9e3cefd577d96d43d308685468c0a03185e (patch) | |
tree | b4a54ecff752ffde6d1d66408e05a658e85b5ea4 /drivers/media/video/saa7134/saa7134-tvaudio.c | |
parent | 53af158a901a32dd8639fbe03db5354ab711d8f0 (diff) |
V4L/DVB (7976): I2S on for MPEG of saa7134_empress
Rework saa7134_enable_i2s function. Add vendor specific data.
Add definition for I2S audio output control register.
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 | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index 232af598d947..460d4a35e5f1 100644 --- a/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c | |||
@@ -873,13 +873,25 @@ void saa7134_enable_i2s(struct saa7134_dev *dev) | |||
873 | 873 | ||
874 | if (!card_is_empress(dev)) | 874 | if (!card_is_empress(dev)) |
875 | return; | 875 | return; |
876 | i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01; | ||
877 | 876 | ||
878 | /* enable I2S audio output for the mpeg encoder */ | 877 | switch (dev->board) { |
879 | saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80); | 878 | case SAA7134_BOARD_BEHOLD_M6: |
880 | saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2s_format); | 879 | /* configure GPIO for out audio */ |
881 | saa_writeb(SAA7134_I2S_OUTPUT_LEVEL, 0x0F); | 880 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000); |
882 | saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x01); | 881 | /* Set I2S format */ |
882 | saa_writeb(SAA7134_I2S_AUDIO_CONTROL, 0x00); | ||
883 | /* Start I2S */ | ||
884 | saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x11); | ||
885 | break; | ||
886 | default: | ||
887 | i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01; | ||
888 | |||
889 | /* enable I2S audio output for the mpeg encoder */ | ||
890 | saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80); | ||
891 | saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2s_format); | ||
892 | saa_writeb(SAA7134_I2S_OUTPUT_LEVEL, 0x0F); | ||
893 | saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x01); | ||
894 | } | ||
883 | } | 895 | } |
884 | 896 | ||
885 | int saa7134_tvaudio_rx2mode(u32 rx) | 897 | int saa7134_tvaudio_rx2mode(u32 rx) |