aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/au0828/au0828-cards.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/au0828/au0828-cards.c')
-rw-r--r--drivers/media/video/au0828/au0828-cards.c41
1 files changed, 37 insertions, 4 deletions
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c
index d60123b413f5..aa79e6b7ecab 100644
--- a/drivers/media/video/au0828/au0828-cards.c
+++ b/drivers/media/video/au0828/au0828-cards.c
@@ -21,6 +21,18 @@
21 21
22#include "au0828.h" 22#include "au0828.h"
23#include "au0828-cards.h" 23#include "au0828-cards.h"
24#include "au8522.h"
25
26void hvr950q_cs5340_audio(void *priv, int enable)
27{
28 /* Because the HVR-950q shares an i2s bus between the cs5340 and the
29 au8522, we need to hold cs5340 in reset when using the au8522 */
30 struct au0828_dev *dev = priv;
31 if (enable == 1)
32 au0828_set(dev, REG_000, 0x10);
33 else
34 au0828_clear(dev, REG_000, 0x10);
35}
24 36
25struct au0828_board au0828_boards[] = { 37struct au0828_board au0828_boards[] = {
26 [AU0828_BOARD_UNKNOWN] = { 38 [AU0828_BOARD_UNKNOWN] = {
@@ -31,6 +43,25 @@ struct au0828_board au0828_boards[] = {
31 }, 43 },
32 [AU0828_BOARD_HAUPPAUGE_HVR950Q] = { 44 [AU0828_BOARD_HAUPPAUGE_HVR950Q] = {
33 .name = "Hauppauge HVR950Q", 45 .name = "Hauppauge HVR950Q",
46 .input = {
47 {
48 .type = AU0828_VMUX_TELEVISION,
49 .vmux = AU8522_COMPOSITE_CH4_SIF,
50 .amux = AU8522_AUDIO_SIF,
51 },
52 {
53 .type = AU0828_VMUX_COMPOSITE,
54 .vmux = AU8522_COMPOSITE_CH1,
55 .amux = AU8522_AUDIO_NONE,
56 .audio_setup = hvr950q_cs5340_audio,
57 },
58 {
59 .type = AU0828_VMUX_SVIDEO,
60 .vmux = AU8522_SVIDEO_CH13,
61 .amux = AU8522_AUDIO_NONE,
62 .audio_setup = hvr950q_cs5340_audio,
63 },
64 },
34 }, 65 },
35 [AU0828_BOARD_HAUPPAUGE_HVR950Q_MXL] = { 66 [AU0828_BOARD_HAUPPAUGE_HVR950Q_MXL] = {
36 .name = "Hauppauge HVR950Q rev xxF8", 67 .name = "Hauppauge HVR950Q rev xxF8",
@@ -144,21 +175,23 @@ void au0828_gpio_setup(struct au0828_dev *dev)
144 * 4 - CS5340 175 * 4 - CS5340
145 * 5 - AU8522 Demodulator 176 * 5 - AU8522 Demodulator
146 * 6 - eeprom W/P 177 * 6 - eeprom W/P
178 * 7 - power supply
147 * 9 - XC5000 Tuner 179 * 9 - XC5000 Tuner
148 */ 180 */
149 181
150 /* Into reset */ 182 /* Into reset */
151 au0828_write(dev, REG_003, 0x02); 183 au0828_write(dev, REG_003, 0x02);
152 au0828_write(dev, REG_002, 0x88 | 0x20); 184 au0828_write(dev, REG_002, 0x80 | 0x20 | 0x10);
153 au0828_write(dev, REG_001, 0x0); 185 au0828_write(dev, REG_001, 0x0);
154 au0828_write(dev, REG_000, 0x0); 186 au0828_write(dev, REG_000, 0x0);
155 msleep(100); 187 msleep(100);
156 188
157 /* Out of reset */ 189 /* Out of reset (leave the cs5340 in reset until needed) */
158 au0828_write(dev, REG_003, 0x02); 190 au0828_write(dev, REG_003, 0x02);
159 au0828_write(dev, REG_001, 0x02); 191 au0828_write(dev, REG_001, 0x02);
160 au0828_write(dev, REG_002, 0x88 | 0x20); 192 au0828_write(dev, REG_002, 0x80 | 0x20 | 0x10);
161 au0828_write(dev, REG_000, 0x88 | 0x20 | 0x40); 193 au0828_write(dev, REG_000, 0x80 | 0x40 | 0x20);
194
162 msleep(250); 195 msleep(250);
163 break; 196 break;
164 case AU0828_BOARD_DVICO_FUSIONHDTV7: 197 case AU0828_BOARD_DVICO_FUSIONHDTV7: