summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-19 16:01:33 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 20:53:35 +0100
commit35643943be58aef82826e340761e86e0d37870ec (patch)
tree79ecb4cbc21075dcc8a9740021c6acf089564038 /drivers/media/video/em28xx/em28xx.h
parentV4L/DVB (9650): em28xx: replace magic numbers to something more meaningful (diff)
downloadlinux-35643943be58aef82826e340761e86e0d37870ec.tar.xz
linux-35643943be58aef82826e340761e86e0d37870ec.zip
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 {
EM28XX_RADIO,
};
-enum em28xx_audio_mode {
- EM28XX_NO_AUDIO,
- EM28XX_I2S_3_SAMPLE_RATES,
- EM28XX_I2S_5_SAMPLE_RATES,
- EM28XX_AC97,
+enum em28xx_ac97_mode {
+ EM28XX_NO_AC97 = 0,
+ EM28XX_AC97_EM202,
+ EM28XX_AC97_OTHER,
+};
+
+struct em28xx_audio_mode {
+ enum em28xx_ac97_mode ac97;
+
+ u16 ac97_feat;
+ u16 ac97_vendor_id1;
+ u16 ac97_vendor_id2;
+
+ unsigned int has_audio:1;
+
+ unsigned int i2s_3rates:1;
+ unsigned int i2s_5rates:1;
};
enum em28xx_amux {
EM28XX_AMUX_VIDEO,
EM28XX_AMUX_LINE_IN,
- EM28XX_AMUX_AC97_VIDEO,
- EM28XX_AMUX_AC97_LINE_IN,
};
struct em28xx_input {
@@ -410,7 +420,7 @@ struct em28xx {
u32 i2s_speed; /* I2S speed for audio digital stream */
enum em28xx_decoder decoder;
- enum em28xx_audio_mode audio_mode;
+ struct em28xx_audio_mode audio_mode;
int tuner_type; /* type of the tuner */
int tuner_addr; /* tuner address */
@@ -531,6 +541,7 @@ int em28xx_write_regs_req(struct em28xx *dev, u8 req, u16 reg, char *buf,
int len);
int em28xx_write_regs(struct em28xx *dev, u16 reg, char *buf, int len);
int em28xx_audio_analog_set(struct em28xx *dev);
+int em28xx_audio_setup(struct em28xx *dev);
int em28xx_colorlevels_set_default(struct em28xx *dev);
int em28xx_capture_start(struct em28xx *dev, int start);