Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29958
b: refs/heads/master
c: e2b8cf4
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jun 25, 2006
1 parent f025239 commit 1d5bf3e
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 57 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: 3eb731705556b643df2cbae1bc98976335451548
refs/heads/master: e2b8cf4ced47465b24d6fe911714827475fb0412
24 changes: 22 additions & 2 deletions trunk/drivers/media/video/cx25840/cx25840-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
return -EINVAL;

/* assert soft reset */
cx25840_and_or(client, 0x810, ~0x1, 0x01);
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 */
Expand All @@ -46,6 +47,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
/* AUX_PLL_FRAC */
cx25840_write4(client, 0x110, 0xee39bb01);

if (state->is_cx25836)
break;

/* src3/4/6_ctl = 0x0801f77f */
cx25840_write4(client, 0x900, 0x7ff70108);
cx25840_write4(client, 0x904, 0x7ff70108);
Expand All @@ -59,6 +63,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
/* AUX_PLL_FRAC */
cx25840_write4(client, 0x110, 0xd66bec00);

if (state->is_cx25836)
break;

/* src3/4/6_ctl = 0x08016d59 */
cx25840_write4(client, 0x900, 0x596d0108);
cx25840_write4(client, 0x904, 0x596d0108);
Expand All @@ -72,6 +79,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
/* AUX_PLL_FRAC */
cx25840_write4(client, 0x110, 0xe5d69800);

if (state->is_cx25836)
break;

/* src3/4/6_ctl = 0x08014faa */
cx25840_write4(client, 0x900, 0xaa4f0108);
cx25840_write4(client, 0x904, 0xaa4f0108);
Expand All @@ -87,6 +97,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
/* AUX_PLL_FRAC */
cx25840_write4(client, 0x110, 0x69082a01);

if (state->is_cx25836)
break;

/* src1_ctl = 0x08010000 */
cx25840_write4(client, 0x8f8, 0x00000108);

Expand All @@ -106,6 +119,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
/* AUX_PLL_FRAC */
cx25840_write4(client, 0x110, 0xd66bec00);

if (state->is_cx25836)
break;

/* src1_ctl = 0x08010000 */
cx25840_write4(client, 0x8f8, 0xcd600108);

Expand All @@ -122,6 +138,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
/* AUX_PLL_FRAC */
cx25840_write4(client, 0x110, 0xe5d69800);

if (state->is_cx25836)
break;

/* src1_ctl = 0x08010000 */
cx25840_write4(client, 0x8f8, 0x00800108);

Expand All @@ -134,7 +153,8 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
}

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

state->audclk_freq = freq;

Expand Down
Loading

0 comments on commit 1d5bf3e

Please sign in to comment.