summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-05-21 03:16:52 +0000
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-05-21 03:16:52 +0000
commit78d3abf60e2a313a3ae4173b47d58a9e79c6d58e (patch)
treebeb048e0f32373d4a910bae626d47a7eabe68a5d /linux/drivers/media
parent5dc15f2aedd22c56635e73f55385cc6a23ed9eaa (diff)
downloadmediapointer-dvb-s2-78d3abf60e2a313a3ae4173b47d58a9e79c6d58e.tar.gz
mediapointer-dvb-s2-78d3abf60e2a313a3ae4173b47d58a9e79c6d58e.tar.bz2
I2S on for MPEG of saa7134_empress
From: Dmitri Belimov <d.belimov@gmail.com> 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 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-reg.h1
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-tvaudio.c24
2 files changed, 19 insertions, 6 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-reg.h b/linux/drivers/media/video/saa7134/saa7134-reg.h
index 86f5eefdb..258792c17 100644
--- a/linux/drivers/media/video/saa7134/saa7134-reg.h
+++ b/linux/drivers/media/video/saa7134/saa7134-reg.h
@@ -353,6 +353,7 @@
/* I2S output */
#define SAA7134_I2S_AUDIO_OUTPUT 0x1c0
+#define SAA7134_I2S_AUDIO_CONTROL 0x591
/* test modes */
#define SAA7134_SPECIAL_MODE 0x1d0
diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
index 0d24ab598..89f64f927 100644
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
@@ -928,13 +928,25 @@ 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);
+ 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;
+
+ /* 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)