All pastes #371075 Raw Edit

Anonymous

public text v1 · immutable
#371075 ·published 2007-02-25 02:17 UTC
rendered paste body
diff -r 3556fab363b5 linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c	Sat Feb 24 09:05:23 2007 -0200
+++ b/linux/drivers/media/video/cx88/cx88-cards.c	Sat Feb 24 21:01:04 2007 -0500
@@ -974,15 +974,22 @@ struct cx88_board cx88_boards[] = {
 		.tuner_addr	= ADDR_UNSET,
 		.radio_addr	= ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
+		.audio_chip     = AUDIO_CHIP_WM8775,
 		.input		= {{
 			.type   = CX88_VMUX_TELEVISION,
 			.vmux   = 0,
+			.gpio0  = 0x40bf,
+			.gpio1  = 0x00ff,
 		},{
 			.type	= CX88_VMUX_COMPOSITE1,
 			.vmux	= 1,
+			.gpio0  = 0x40bf,
+			.gpio1  = 0x00ff,
 		},{
 			.type	= CX88_VMUX_SVIDEO,
 			.vmux	= 2,
+			.gpio0  = 0x40bf,
+			.gpio1  = 0x00ff,
 		}},
 		/* fixme: Add radio support */
 		.mpeg           = CX88_MPEG_DVB,
diff -r 3556fab363b5 linux/drivers/media/video/cx88/cx88-video.c
--- a/linux/drivers/media/video/cx88/cx88-video.c	Sat Feb 24 09:05:23 2007 -0200
+++ b/linux/drivers/media/video/cx88/cx88-video.c	Sat Feb 24 21:01:04 2007 -0500
@@ -416,6 +416,22 @@ int cx88_video_mux(struct cx88_core *cor
 		else
 			cx_clear(AUD_CTL, EN_I2SIN_ENABLE);
 	}
+
+	/* If we're not using television, we want to route the audio
+	   from I2S, not the tuner */
+	if (INPUT(input)->type != CX88_VMUX_TELEVISION) {
+		/* ADC mode */
+		cx_write(AUD_I2SCNTL, 0x1);
+		cx_set(AUD_CTL, EN_I2SIN_ENABLE);
+		//cx_clear(AUD_CTL, EN_I2SOUT_ENABLE);
+	} else {
+		/* Normal mode */
+		cx_write(AUD_I2SCNTL, 0x0);
+		/*cx_clear(AUD_CTL, EN_I2SIN_ENABLE);
+		cx_clear(AUD_CTL, EN_I2SOUT_ENABLE);*/
+	}
+
+
 	return 0;
 }
 EXPORT_SYMBOL(cx88_video_mux);