diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-05 17:01:41 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 19:04:33 -0200 |
commit | 3abee53e4402b6ae39e1e610f9ef94eb74097138 (patch) | |
tree | bb96b460ebf6be07a127216dda86a1f896274afd /drivers/media/video/em28xx/em28xx-core.c | |
parent | 0f6dac18ccc6fb0c95f3e0269e60239661c9b4c5 (diff) | |
download | lwn-3abee53e4402b6ae39e1e610f9ef94eb74097138.tar.gz lwn-3abee53e4402b6ae39e1e610f9ef94eb74097138.zip |
V4L/DVB (6955): Properly implement 12MHz I2S support
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-core.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index 70c5ec268f6a..f6b78357f0e5 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c @@ -332,6 +332,7 @@ int em28xx_audio_analog_set(struct em28xx *dev) { int ret; char s[2] = { 0x00, 0x00 }; + u8 xclk = 0x07; s[0] |= 0x1f - dev->volume; s[1] |= 0x1f - dev->volume; @@ -342,10 +343,16 @@ int em28xx_audio_analog_set(struct em28xx *dev) if (ret < 0) return ret; - ret = em28xx_write_reg_bits(dev, XCLK_REG, - dev->mute ? 0x00 : 0x80, 0x80); + if (dev->has_12mhz_i2s) + xclk |= 0x20; + + if (!dev->mute) + xclk |= 0x80; + + ret = em28xx_write_reg_bits(dev, XCLK_REG, xclk, 0xa7); if (ret < 0) return ret; + msleep(10); /* Selects the proper audio input */ ret = em28xx_set_audio_source(dev); |