From 89a74f2f20177bd250ac98c27f0fda271d45ceef Mon Sep 17 00:00:00 2001 From: Steven Toth Date: Mon, 10 Oct 2011 11:09:55 -0300 Subject: [PATCH] --- yaml --- r: 271966 b: refs/heads/master c: 2ccdd9a59b3a1ff3bd1be6390c4b1989a008e61c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/video/cx25840/cx25840-audio.c | 10 +++++++++- trunk/drivers/media/video/cx25840/cx25840-core.c | 11 +++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index b6d883f23d9e..06403d790b39 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d9368da71804053a6f84d170c63c6cb86c8318b2 +refs/heads/master: 2ccdd9a59b3a1ff3bd1be6390c4b1989a008e61c diff --git a/trunk/drivers/media/video/cx25840/cx25840-audio.c b/trunk/drivers/media/video/cx25840/cx25840-audio.c index 34b96c7cfd62..005f11093642 100644 --- a/trunk/drivers/media/video/cx25840/cx25840-audio.c +++ b/trunk/drivers/media/video/cx25840/cx25840-audio.c @@ -480,6 +480,7 @@ void cx25840_audio_set_path(struct i2c_client *client) static void set_volume(struct i2c_client *client, int volume) { + struct cx25840_state *state = to_state(i2c_get_clientdata(client)); int vol; /* Convert the volume to msp3400 values (0-127) */ @@ -495,7 +496,14 @@ static void set_volume(struct i2c_client *client, int volume) } /* PATH1_VOLUME */ - cx25840_write(client, 0x8d4, 228 - (vol * 2)); + if (is_cx2388x(state)) { + /* for cx23885 volume doesn't work, + * the calculation always results in + * e4 regardless. + */ + cx25840_write(client, 0x8d4, volume); + } else + cx25840_write(client, 0x8d4, 228 - (vol * 2)); } static void set_balance(struct i2c_client *client, int balance) diff --git a/trunk/drivers/media/video/cx25840/cx25840-core.c b/trunk/drivers/media/video/cx25840/cx25840-core.c index 8896999ea6ca..0316e41b55cd 100644 --- a/trunk/drivers/media/video/cx25840/cx25840-core.c +++ b/trunk/drivers/media/video/cx25840/cx25840-core.c @@ -1074,6 +1074,17 @@ static int set_input(struct i2c_client *client, enum cx25840_video_input vid_inp cx25840_write(client, 0x919, 0x01); } + if (is_cx2388x(state) && (aud_input == CX25840_AUDIO7)) { + /* Configure audio from LR1 or LR2 input */ + cx25840_write4(client, 0x910, 0); + cx25840_write4(client, 0x8d0, 0x63073); + } else + if (is_cx2388x(state) && (aud_input == CX25840_AUDIO8)) { + /* Configure audio from tuner/sif input */ + cx25840_write4(client, 0x910, 0x12b000c9); + cx25840_write4(client, 0x8d0, 0x1f063870); + } + return 0; }