diff options
Diffstat (limited to 'drivers/media/video/au0828/au0828-cards.c')
-rw-r--r-- | drivers/media/video/au0828/au0828-cards.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c index 1aabaa7e55bb..053bbe8c8e3a 100644 --- a/drivers/media/video/au0828/au0828-cards.c +++ b/drivers/media/video/au0828/au0828-cards.c | |||
@@ -46,6 +46,7 @@ struct au0828_board au0828_boards[] = { | |||
46 | .name = "Hauppauge HVR850", | 46 | .name = "Hauppauge HVR850", |
47 | .tuner_type = TUNER_XC5000, | 47 | .tuner_type = TUNER_XC5000, |
48 | .tuner_addr = 0x61, | 48 | .tuner_addr = 0x61, |
49 | .i2c_clk_divider = AU0828_I2C_CLK_30KHZ, | ||
49 | .input = { | 50 | .input = { |
50 | { | 51 | { |
51 | .type = AU0828_VMUX_TELEVISION, | 52 | .type = AU0828_VMUX_TELEVISION, |
@@ -70,6 +71,13 @@ struct au0828_board au0828_boards[] = { | |||
70 | .name = "Hauppauge HVR950Q", | 71 | .name = "Hauppauge HVR950Q", |
71 | .tuner_type = TUNER_XC5000, | 72 | .tuner_type = TUNER_XC5000, |
72 | .tuner_addr = 0x61, | 73 | .tuner_addr = 0x61, |
74 | /* The au0828 hardware i2c implementation does not properly | ||
75 | support the xc5000's i2c clock stretching. So we need to | ||
76 | lower the clock frequency enough where the 15us clock | ||
77 | stretch fits inside of a normal clock cycle, or else the | ||
78 | au0828 fails to set the STOP bit. A 30 KHz clock puts the | ||
79 | clock pulse width at 18us */ | ||
80 | .i2c_clk_divider = AU0828_I2C_CLK_30KHZ, | ||
73 | .input = { | 81 | .input = { |
74 | { | 82 | { |
75 | .type = AU0828_VMUX_TELEVISION, | 83 | .type = AU0828_VMUX_TELEVISION, |
@@ -94,16 +102,19 @@ struct au0828_board au0828_boards[] = { | |||
94 | .name = "Hauppauge HVR950Q rev xxF8", | 102 | .name = "Hauppauge HVR950Q rev xxF8", |
95 | .tuner_type = UNSET, | 103 | .tuner_type = UNSET, |
96 | .tuner_addr = ADDR_UNSET, | 104 | .tuner_addr = ADDR_UNSET, |
105 | .i2c_clk_divider = AU0828_I2C_CLK_250KHZ, | ||
97 | }, | 106 | }, |
98 | [AU0828_BOARD_DVICO_FUSIONHDTV7] = { | 107 | [AU0828_BOARD_DVICO_FUSIONHDTV7] = { |
99 | .name = "DViCO FusionHDTV USB", | 108 | .name = "DViCO FusionHDTV USB", |
100 | .tuner_type = UNSET, | 109 | .tuner_type = UNSET, |
101 | .tuner_addr = ADDR_UNSET, | 110 | .tuner_addr = ADDR_UNSET, |
111 | .i2c_clk_divider = AU0828_I2C_CLK_250KHZ, | ||
102 | }, | 112 | }, |
103 | [AU0828_BOARD_HAUPPAUGE_WOODBURY] = { | 113 | [AU0828_BOARD_HAUPPAUGE_WOODBURY] = { |
104 | .name = "Hauppauge Woodbury", | 114 | .name = "Hauppauge Woodbury", |
105 | .tuner_type = UNSET, | 115 | .tuner_type = UNSET, |
106 | .tuner_addr = ADDR_UNSET, | 116 | .tuner_addr = ADDR_UNSET, |
117 | .i2c_clk_divider = AU0828_I2C_CLK_250KHZ, | ||
107 | }, | 118 | }, |
108 | }; | 119 | }; |
109 | 120 | ||
@@ -200,8 +211,8 @@ void au0828_card_setup(struct au0828_dev *dev) | |||
200 | /* Load the analog demodulator driver (note this would need to | 211 | /* Load the analog demodulator driver (note this would need to |
201 | be abstracted out if we ever need to support a different | 212 | be abstracted out if we ever need to support a different |
202 | demod) */ | 213 | demod) */ |
203 | sd = v4l2_i2c_new_subdev(&dev->i2c_adap, "au8522", "au8522", | 214 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
204 | 0x8e >> 1); | 215 | "au8522", "au8522", 0x8e >> 1); |
205 | if (sd == NULL) | 216 | if (sd == NULL) |
206 | printk(KERN_ERR "analog subdev registration failed\n"); | 217 | printk(KERN_ERR "analog subdev registration failed\n"); |
207 | } | 218 | } |
@@ -209,8 +220,8 @@ void au0828_card_setup(struct au0828_dev *dev) | |||
209 | /* Setup tuners */ | 220 | /* Setup tuners */ |
210 | if (dev->board.tuner_type != TUNER_ABSENT) { | 221 | if (dev->board.tuner_type != TUNER_ABSENT) { |
211 | /* Load the tuner module, which does the attach */ | 222 | /* Load the tuner module, which does the attach */ |
212 | sd = v4l2_i2c_new_subdev(&dev->i2c_adap, "tuner", "tuner", | 223 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
213 | dev->board.tuner_addr); | 224 | "tuner", "tuner", dev->board.tuner_addr); |
214 | if (sd == NULL) | 225 | if (sd == NULL) |
215 | printk(KERN_ERR "tuner subdev registration fail\n"); | 226 | printk(KERN_ERR "tuner subdev registration fail\n"); |
216 | 227 | ||