Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29960
b: refs/heads/master
c: 2e2aef7
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jun 25, 2006
1 parent 08f4aee commit 3f68e8f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0c044a71f3d0a0a73c954b389cbc4b55ed4c2ba
refs/heads/master: 2e2aef7d5a8ac9d1c9b2c07a9fc96a7908d51d72
20 changes: 12 additions & 8 deletions trunk/drivers/media/video/cx25840/cx25840-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
if (freq != 32000 && freq != 44100 && freq != 48000)
return -EINVAL;

/* assert soft reset */
if (!state->is_cx25836)
cx25840_and_or(client, 0x810, ~0x1, 0x01);

/* common for all inputs and rates */
/* SA_MCLK_SEL=1, SA_MCLK_DIV=0x10 */
cx25840_write(client, 0x127, 0x50);
Expand Down Expand Up @@ -152,10 +148,6 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
}
}

/* deassert soft reset */
if (!state->is_cx25836)
cx25840_and_or(client, 0x810, ~0x1, 0x00);

state->audclk_freq = freq;

return 0;
Expand All @@ -168,6 +160,10 @@ void cx25840_audio_set_path(struct i2c_client *client)
/* stop microcontroller */
cx25840_and_or(client, 0x803, ~0x10, 0);

/* assert soft reset */
if (!state->is_cx25836)
cx25840_and_or(client, 0x810, ~0x1, 0x01);

/* Mute everything to prevent the PFFT! */
cx25840_write(client, 0x8d3, 0x1f);

Expand All @@ -185,6 +181,10 @@ void cx25840_audio_set_path(struct i2c_client *client)

set_audclk_freq(client, state->audclk_freq);

/* deassert soft reset */
if (!state->is_cx25836)
cx25840_and_or(client, 0x810, ~0x1, 0x00);

if (state->aud_input != CX25840_AUDIO_SERIAL) {
/* When the microcontroller detects the
* audio format, it will unmute the lines */
Expand Down Expand Up @@ -323,7 +323,11 @@ int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg)
cx25840_and_or(client, 0x803, ~0x10, 0);
cx25840_write(client, 0x8d3, 0x1f);
}
if (!state->is_cx25836)
cx25840_and_or(client, 0x810, ~0x1, 1);
retval = set_audclk_freq(client, *(u32 *)arg);
if (!state->is_cx25836)
cx25840_and_or(client, 0x810, ~0x1, 0);
if (state->aud_input != CX25840_AUDIO_SERIAL) {
cx25840_and_or(client, 0x803, ~0x10, 0x10);
}
Expand Down

0 comments on commit 3f68e8f

Please sign in to comment.