From 08f4aeeeede26981fded496afe1145932e789a44 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 29 Apr 2006 12:11:18 -0300 Subject: [PATCH] --- yaml --- r: 29959 b: refs/heads/master c: c0c044a71f3d0a0a73c954b389cbc4b55ed4c2ba h: refs/heads/master i: 29957: f02523938ac3f15962b8a5e328caeb92d0d1b612 29955: f961c65d4ece1c27d3b1809432873c83a7d5a492 29951: 2ed8f961af936a8119a344cb1368c230b79b3ca8 v: v3 --- [refs] | 2 +- .../media/video/cx25840/cx25840-audio.c | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 1f3cf7cf9caf..3a29e47a3a22 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e2b8cf4ced47465b24d6fe911714827475fb0412 +refs/heads/master: c0c044a71f3d0a0a73c954b389cbc4b55ed4c2ba diff --git a/trunk/drivers/media/video/cx25840/cx25840-audio.c b/trunk/drivers/media/video/cx25840/cx25840-audio.c index f035f2b9ffd1..b67ad4deff8a 100644 --- a/trunk/drivers/media/video/cx25840/cx25840-audio.c +++ b/trunk/drivers/media/video/cx25840/cx25840-audio.c @@ -181,13 +181,15 @@ void cx25840_audio_set_path(struct i2c_client *client) } else { /* Set Path1 to Analog Demod Main Channel */ cx25840_write4(client, 0x8d0, 0x7038061f); + } + + set_audclk_freq(client, state->audclk_freq); + if (state->aud_input != CX25840_AUDIO_SERIAL) { /* When the microcontroller detects the * audio format, it will unmute the lines */ cx25840_and_or(client, 0x803, ~0x10, 0x10); } - - set_audclk_freq(client, state->audclk_freq); } static int get_volume(struct i2c_client *client) @@ -311,11 +313,21 @@ static void set_mute(struct i2c_client *client, int mute) int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg) { + struct cx25840_state *state = i2c_get_clientdata(client); struct v4l2_control *ctrl = arg; + int retval; switch (cmd) { case VIDIOC_INT_AUDIO_CLOCK_FREQ: - return set_audclk_freq(client, *(u32 *)arg); + if (state->aud_input != CX25840_AUDIO_SERIAL) { + cx25840_and_or(client, 0x803, ~0x10, 0); + cx25840_write(client, 0x8d3, 0x1f); + } + retval = set_audclk_freq(client, *(u32 *)arg); + if (state->aud_input != CX25840_AUDIO_SERIAL) { + cx25840_and_or(client, 0x803, ~0x10, 0x10); + } + return retval; case VIDIOC_G_CTRL: switch (ctrl->id) {