Commit f808a9e3 authored by Dmitri Belimov's avatar Dmitri Belimov Committed by Mauro Carvalho Chehab

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: default avatarBeholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 53af158a
...@@ -353,6 +353,7 @@ ...@@ -353,6 +353,7 @@
/* I2S output */ /* I2S output */
#define SAA7134_I2S_AUDIO_OUTPUT 0x1c0 #define SAA7134_I2S_AUDIO_OUTPUT 0x1c0
#define SAA7134_I2S_AUDIO_CONTROL 0x591
/* test modes */ /* test modes */
#define SAA7134_SPECIAL_MODE 0x1d0 #define SAA7134_SPECIAL_MODE 0x1d0
......
...@@ -873,6 +873,17 @@ void saa7134_enable_i2s(struct saa7134_dev *dev) ...@@ -873,6 +873,17 @@ void saa7134_enable_i2s(struct saa7134_dev *dev)
if (!card_is_empress(dev)) if (!card_is_empress(dev))
return; 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);
/* Start I2S */
saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x11);
break;
default:
i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01; i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
/* enable I2S audio output for the mpeg encoder */ /* enable I2S audio output for the mpeg encoder */
...@@ -880,6 +891,7 @@ void saa7134_enable_i2s(struct saa7134_dev *dev) ...@@ -880,6 +891,7 @@ void saa7134_enable_i2s(struct saa7134_dev *dev)
saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2s_format); saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2s_format);
saa_writeb(SAA7134_I2S_OUTPUT_LEVEL, 0x0F); saa_writeb(SAA7134_I2S_OUTPUT_LEVEL, 0x0F);
saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x01); saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x01);
}
} }
int saa7134_tvaudio_rx2mode(u32 rx) int saa7134_tvaudio_rx2mode(u32 rx)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment