diff options
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-audio.c')
-rw-r--r-- | drivers/media/video/cx25840/cx25840-audio.c | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/drivers/media/video/cx25840/cx25840-audio.c b/drivers/media/video/cx25840/cx25840-audio.c index 93d74bee292..d2faeaa7975 100644 --- a/drivers/media/video/cx25840/cx25840-audio.c +++ b/drivers/media/video/cx25840/cx25840-audio.c @@ -32,7 +32,7 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) /* common for all inputs and rates */ /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x10 */ - if (!state->is_cx23885) + if (!state->is_cx23885 && !state->is_cx231xx) cx25840_write(client, 0x127, 0x50); if (state->aud_input != CX25840_AUDIO_SERIAL) { @@ -43,11 +43,15 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) * so avoid destroying registers. */ break; } - /* VID_PLL and AUX_PLL */ - cx25840_write4(client, 0x108, 0x1006040f); - /* AUX_PLL_FRAC */ - cx25840_write4(client, 0x110, 0x01bb39ee); + if (!state->is_cx231xx) { + + /* VID_PLL and AUX_PLL */ + cx25840_write4(client, 0x108, 0x1006040f); + + /* AUX_PLL_FRAC */ + cx25840_write4(client, 0x110, 0x01bb39ee); + } if (state->is_cx25836) break; @@ -64,11 +68,15 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) * so avoid destroying registers. */ break; } - /* VID_PLL and AUX_PLL */ - cx25840_write4(client, 0x108, 0x1009040f); - /* AUX_PLL_FRAC */ - cx25840_write4(client, 0x110, 0x00ec6bd6); + if (!state->is_cx231xx) { + + /* VID_PLL and AUX_PLL */ + cx25840_write4(client, 0x108, 0x1009040f); + + /* AUX_PLL_FRAC */ + cx25840_write4(client, 0x110, 0x00ec6bd6); + } if (state->is_cx25836) break; @@ -85,11 +93,15 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) * so avoid destroying registers. */ break; } + + if (!state->is_cx231xx) { + /* VID_PLL and AUX_PLL */ cx25840_write4(client, 0x108, 0x100a040f); /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0x0098d6e5); + } if (state->is_cx25836) break; @@ -108,11 +120,15 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) * so avoid destroying registers. */ break; } + + if (!state->is_cx231xx) { + /* VID_PLL and AUX_PLL */ cx25840_write4(client, 0x108, 0x1e08040f); /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0x012a0869); + } if (state->is_cx25836) break; @@ -136,11 +152,15 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) break; } + + if (!state->is_cx231xx) { + /* VID_PLL and AUX_PLL */ cx25840_write4(client, 0x108, 0x1809040f); /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0x00ec6bd6); + } if (state->is_cx25836) break; @@ -155,7 +175,7 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) break; case 48000: - if (!state->is_cx23885) { + if (!state->is_cx23885 && !state->is_cx231xx) { /* VID_PLL and AUX_PLL */ cx25840_write4(client, 0x108, 0x180a040f); @@ -166,7 +186,7 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) if (state->is_cx25836) break; - if (!state->is_cx23885) { + if (!state->is_cx23885 && !state->is_cx231xx) { /* src1_ctl */ cx25840_write4(client, 0x8f8, 0x08018000); @@ -227,7 +247,7 @@ void cx25840_audio_set_path(struct i2c_client *client) /* deassert soft reset */ cx25840_and_or(client, 0x810, ~0x1, 0x00); - if (state->is_cx23885) { + if (state->is_cx23885 || state->is_cx231xx) { /* Ensure the controller is running when we exit */ cx25840_and_or(client, 0x803, ~0x10, 0x10); } |