aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-19 10:01:33 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:35 -0500
commit35643943be58aef82826e340761e86e0d37870ec (patch)
tree79ecb4cbc21075dcc8a9740021c6acf089564038 /drivers/media/video/em28xx/em28xx.h
parent8a5caa6bcb03b72db6c19a11e7b2de7656bd3f26 (diff)
V4L/DVB (9651): em28xx: Improve audio handling
This patch properly implements audio handling on em28xx. Before this patch, it was assumed that every device has an Empia 202 audio chip. However, this is not true. After this patch, specific AC97 chipset setup and configurations can be done. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r--drivers/media/video/em28xx/em28xx.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index f47c8d34ec79..3e8e13a55f57 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -256,18 +256,28 @@ enum enum28xx_itype {
256 EM28XX_RADIO, 256 EM28XX_RADIO,
257}; 257};
258 258
259enum em28xx_audio_mode { 259enum em28xx_ac97_mode {
260 EM28XX_NO_AUDIO, 260 EM28XX_NO_AC97 = 0,
261 EM28XX_I2S_3_SAMPLE_RATES, 261 EM28XX_AC97_EM202,
262 EM28XX_I2S_5_SAMPLE_RATES, 262 EM28XX_AC97_OTHER,
263 EM28XX_AC97, 263};
264
265struct em28xx_audio_mode {
266 enum em28xx_ac97_mode ac97;
267
268 u16 ac97_feat;
269 u16 ac97_vendor_id1;
270 u16 ac97_vendor_id2;
271
272 unsigned int has_audio:1;
273
274 unsigned int i2s_3rates:1;
275 unsigned int i2s_5rates:1;
264}; 276};
265 277
266enum em28xx_amux { 278enum em28xx_amux {
267 EM28XX_AMUX_VIDEO, 279 EM28XX_AMUX_VIDEO,
268 EM28XX_AMUX_LINE_IN, 280 EM28XX_AMUX_LINE_IN,
269 EM28XX_AMUX_AC97_VIDEO,
270 EM28XX_AMUX_AC97_LINE_IN,
271}; 281};
272 282
273struct em28xx_input { 283struct em28xx_input {
@@ -410,7 +420,7 @@ struct em28xx {
410 u32 i2s_speed; /* I2S speed for audio digital stream */ 420 u32 i2s_speed; /* I2S speed for audio digital stream */
411 421
412 enum em28xx_decoder decoder; 422 enum em28xx_decoder decoder;
413 enum em28xx_audio_mode audio_mode; 423 struct em28xx_audio_mode audio_mode;
414 424
415 int tuner_type; /* type of the tuner */ 425 int tuner_type; /* type of the tuner */
416 int tuner_addr; /* tuner address */ 426 int tuner_addr; /* tuner address */
@@ -531,6 +541,7 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf,
531 int len); 541 int len);
532int em28xx_write_regs(struct em28xx *dev, u16 reg, char *buf, int len); 542int em28xx_write_regs(struct em28xx *dev, u16 reg, char *buf, int len);
533int em28xx_audio_analog_set(struct em28xx *dev); 543int em28xx_audio_analog_set(struct em28xx *dev);
544int em28xx_audio_setup(struct em28xx *dev);
534 545
535int em28xx_colorlevels_set_default(struct em28xx *dev); 546int em28xx_colorlevels_set_default(struct em28xx *dev);
536int em28xx_capture_start(struct em28xx *dev, int start); 547int em28xx_capture_start(struct em28xx *dev, int start);