diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:14:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:14:42 -0400 |
commit | f894d18380e7e7ff05f6622ccb75d2881922c6e9 (patch) | |
tree | e3c11b831b68096239a49dec539a49e49c1d90b7 /drivers/media/video/cx18/cx18-audio.c | |
parent | d13ff0559fea73f237a01669887d2c10e11d7662 (diff) | |
parent | d20b27478d6ccf7c4c8de4f09db2bdbaec82a6c0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (277 commits)
V4L/DVB (8415): gspca: Infinite loop in i2c_w() of etoms.
V4L/DVB (8414): videodev/cx18: fix get_index bug and error-handling lock-ups
V4L/DVB (8411): videobuf-dma-contig.c: fix 64-bit build for pre-2.6.24 kernels
V4L/DVB (8410): sh_mobile_ceu_camera: fix 64-bit compiler warnings
V4L/DVB (8397): video: convert select VIDEO_ZORAN_ZR36060 into depends on
V4L/DVB (8396): video: Fix Kbuild dependency for VIDEO_IR_I2C
V4L/DVB (8395): saa7134: Fix Kbuild dependency of ir-kbd-i2c
V4L/DVB (8394): ir-common: CodingStyle fix: move EXPORT_SYMBOL_GPL to their proper places
V4L/DVB (8393): media/video: Fix depencencies for VIDEOBUF
V4L/DVB (8392): media/Kconfig: Convert V4L1_COMPAT select into "depends on"
V4L/DVB (8390): videodev: add comment and remove magic number.
V4L/DVB (8389): videodev: simplify get_index()
V4L/DVB (8387): Some cosmetic changes
V4L/DVB (8381): ov7670: fix compile warnings
V4L/DVB (8380): saa7115: use saa7115_auto instead of saa711x as the autodetect driver name.
V4L/DVB (8379): saa7127: Make device detection optional
V4L/DVB (8378): cx18: move cx18_av_vbi_setup to av-core.c and rename to cx18_av_std_setup
V4L/DVB (8377): ivtv/cx18: ensure the default control values are correct
V4L/DVB (8376): cx25840: move cx25840_vbi_setup to core.c and rename to cx25840_std_setup
V4L/DVB (8374): gspca: No conflict of 0c45:6011 with the sn9c102 driver.
...
Diffstat (limited to 'drivers/media/video/cx18/cx18-audio.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-audio.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-audio.c b/drivers/media/video/cx18/cx18-audio.c index 1adc404d955e..6d5b94fc7087 100644 --- a/drivers/media/video/cx18/cx18-audio.c +++ b/drivers/media/video/cx18/cx18-audio.c | |||
@@ -26,13 +26,17 @@ | |||
26 | #include "cx18-cards.h" | 26 | #include "cx18-cards.h" |
27 | #include "cx18-audio.h" | 27 | #include "cx18-audio.h" |
28 | 28 | ||
29 | #define CX18_AUDIO_ENABLE 0xc72014 | ||
30 | |||
29 | /* Selects the audio input and output according to the current | 31 | /* Selects the audio input and output according to the current |
30 | settings. */ | 32 | settings. */ |
31 | int cx18_audio_set_io(struct cx18 *cx) | 33 | int cx18_audio_set_io(struct cx18 *cx) |
32 | { | 34 | { |
33 | struct v4l2_routing route; | 35 | struct v4l2_routing route; |
34 | u32 audio_input; | 36 | u32 audio_input; |
37 | u32 val; | ||
35 | int mux_input; | 38 | int mux_input; |
39 | int err; | ||
36 | 40 | ||
37 | /* Determine which input to use */ | 41 | /* Determine which input to use */ |
38 | if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) { | 42 | if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) { |
@@ -51,8 +55,17 @@ int cx18_audio_set_io(struct cx18 *cx) | |||
51 | cx18_i2c_hw(cx, cx->card->hw_muxer, VIDIOC_INT_S_AUDIO_ROUTING, &route); | 55 | cx18_i2c_hw(cx, cx->card->hw_muxer, VIDIOC_INT_S_AUDIO_ROUTING, &route); |
52 | 56 | ||
53 | route.input = audio_input; | 57 | route.input = audio_input; |
54 | return cx18_i2c_hw(cx, cx->card->hw_audio_ctrl, | 58 | err = cx18_i2c_hw(cx, cx->card->hw_audio_ctrl, |
55 | VIDIOC_INT_S_AUDIO_ROUTING, &route); | 59 | VIDIOC_INT_S_AUDIO_ROUTING, &route); |
60 | if (err) | ||
61 | return err; | ||
62 | |||
63 | val = read_reg(CX18_AUDIO_ENABLE) & ~0x30; | ||
64 | val |= (audio_input > CX18_AV_AUDIO_SERIAL2) ? 0x20 : | ||
65 | (audio_input << 4); | ||
66 | write_reg(val | 0xb00, CX18_AUDIO_ENABLE); | ||
67 | cx18_vapi(cx, CX18_APU_RESETAI, 1, 0); | ||
68 | return 0; | ||
56 | } | 69 | } |
57 | 70 | ||
58 | void cx18_audio_set_route(struct cx18 *cx, struct v4l2_routing *route) | 71 | void cx18_audio_set_route(struct cx18 *cx, struct v4l2_routing *route) |