diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-20 09:56:19 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-20 09:56:19 -0200 |
commit | 636008228786f51a4b2aec945cd47f1e12c60ea4 (patch) | |
tree | 48f288f720346f2cd50d2729e2ea2c0b6076401b | |
parent | 882f0f5cc3bf4bcd00923aad0cacf002d8009e06 (diff) | |
download | mediapointer-dvb-s2-636008228786f51a4b2aec945cd47f1e12c60ea4.tar.gz mediapointer-dvb-s2-636008228786f51a4b2aec945cd47f1e12c60ea4.tar.bz2 |
em28xx: merge AC97 vendor id's into a single var
From: Mauro Carvalho Chehab <mchehab@redhat.com>
This makes easier to identify vendor ID, since AC97 vendors are
generally identified by 3 bytes. The remaining byte is used by the
vendor to identify its devices.
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-core.c | 11 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 3 |
2 files changed, 8 insertions, 6 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-core.c b/linux/drivers/media/video/em28xx/em28xx-core.c index 3a6252a8b..f2f3f7900 100644 --- a/linux/drivers/media/video/em28xx/em28xx-core.c +++ b/linux/drivers/media/video/em28xx/em28xx-core.c @@ -424,6 +424,7 @@ EXPORT_SYMBOL_GPL(em28xx_audio_analog_set); int em28xx_audio_setup(struct em28xx *dev) { int vid1, vid2, feat, cfg; + u32 vid; if (dev->chip_id == CHIP_ID_EM2874) { /* Digital only device - don't load any alsa module */ @@ -475,9 +476,10 @@ int em28xx_audio_setup(struct em28xx *dev) if (vid2 < 0) goto init_audio; - dev->audio_mode.ac97_vendor_id1 = vid1; - dev->audio_mode.ac97_vendor_id2 = vid2; - em28xx_warn("AC97 vendor ID = %04x:%04x\n", vid1, vid2); + vid = vid1 << 16 | vid2; + + dev->audio_mode.ac97_vendor_id = vid; + em28xx_warn("AC97 vendor ID = 0x%08x\n", vid); feat = em28xx_read_ac97(dev, AC97_RESET); if (feat < 0) @@ -486,7 +488,8 @@ int em28xx_audio_setup(struct em28xx *dev) dev->audio_mode.ac97_feat = feat; em28xx_warn("AC97 features = 0x%04x\n", feat); - if ((vid1 == 0xffff) && (vid2 == 0xffff) && (feat == 0x6a90)) + /* Try to identify what audio processor we have */ + if ((vid == 0xffffffff) && (feat == 0x6a90)) dev->audio_mode.ac97 = EM28XX_AC97_EM202; init_audio: diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index 06d5872f1..c3c36d691 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -267,8 +267,7 @@ struct em28xx_audio_mode { enum em28xx_ac97_mode ac97; u16 ac97_feat; - u16 ac97_vendor_id1; - u16 ac97_vendor_id2; + u32 ac97_vendor_id; unsigned int has_audio:1; |