On Fri, 2011-10-14 at 22:15 +0200, Mauro Carvalho Chehab wrote: > This is an automatic generated email to let you know that the following patch were queued at the > http://git.linuxtv.org/media_tree.git tree: > > Subject: [media] cx25840: Enable support for non-tuner LR1/LR2 audio inputs > Author: Steven Toth <stoth@xxxxxxxxxxxxxx> > Date: Mon Oct 10 11:09:55 2011 -0300 > > The change effects cx23885 boards only and preserves support for existing > boards. Essentially, if we're using baseband audio into the cx23885 AV > core then we have to patch registers. The cx23885 driver will call > with either CX25840_AUDIO8 to signify tuner audio or AUDIO7 to > signify baseband audio. If/When we become more comfortable with this change > across a series of products then we may decide to relax the cx23885 only > restriction. > > [liplianin@xxxxxxxx: fix missing state declaration] > > Signed-off-by: Steven Toth <stoth@xxxxxxxxxxxxxx> > Signed-off-by: Igor M. Liplianin <liplianin@xxxxxxxx> > Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> > > drivers/media/video/cx25840/cx25840-audio.c | 10 +++++++++- > drivers/media/video/cx25840/cx25840-core.c | 11 +++++++++++ > 2 files changed, 20 insertions(+), 1 deletions(-) > > --- > > http://git.linuxtv.org/media_tree.git?a=commitdiff;h=2ccdd9a59b3a1ff3bd1be6390c4b1989a008e61c > > diff --git a/drivers/media/video/cx25840/cx25840-audio.c b/drivers/media/video/cx25840/cx25840-audio.c > index 34b96c7..005f110 100644 > --- a/drivers/media/video/cx25840/cx25840-audio.c > +++ b/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); Sigh. All the comments I made in this thread still seem to apply: http://www.mail-archive.com/linux-media@xxxxxxxxxxxxxxx/msg21049.html In the case of this conditional code branch: "IIRC the change set also does not have a complementary conditional code branch when reading out the volume value from the register. (But I don't have time to double check that right now [...]" Regards, Andy > + } else > + cx25840_write(client, 0x8d4, 228 - (vol * 2)); > } > > static void set_balance(struct i2c_client *client, int balance) > diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c > index 8896999..0316e41 100644 > --- a/drivers/media/video/cx25840/cx25840-core.c > +++ b/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; > } > > > _______________________________________________ > linuxtv-commits mailing list > linuxtv-commits@xxxxxxxxxxx > http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html