diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-22 18:06:44 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-22 18:06:44 -0200 |
commit | fceb8e0cafa24afb15f841c14fbe802e42c13dfe (patch) | |
tree | 7645da02cedb035f5f3b4883f59b529524070a32 /linux/drivers/media/video/cx25840/cx25840-core.c | |
parent | 8c0898eba0b293726f0d339021c14fcbcb7157af (diff) | |
parent | 8e61aa005719a9c2c7a8a1b8d0f99da2706b4030 (diff) | |
download | mediapointer-dvb-s2-fceb8e0cafa24afb15f841c14fbe802e42c13dfe.tar.gz mediapointer-dvb-s2-fceb8e0cafa24afb15f841c14fbe802e42c13dfe.tar.bz2 |
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-saa7146-2
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/cx25840/cx25840-core.c')
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-core.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index 479700c8c..6d324002a 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -1120,6 +1120,16 @@ static void log_audio_status(struct i2c_client *client) /* ----------------------------------------------------------------------- */ +/* This init operation must be called to load the driver's firmware. + Without this the audio standard detection will fail and you will + only get mono. + + Since loading the firmware is often problematic when the driver is + compiled into the kernel I recommend postponing calling this function + until the first open of the video device. Another reason for + postponing it is that loading this firmware takes a long time (seconds) + due to the slow i2c bus speed. So it will speed up the boot process if + you can avoid loading the fw as long as the video device isn't used. */ static int cx25840_init(struct v4l2_subdev *sd, u32 val) { struct cx25840_state *state = to_state(sd); @@ -1401,6 +1411,14 @@ static int cx25840_log_status(struct v4l2_subdev *sd) static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg) { + /* ignore this command */ + if (cmd == TUNER_SET_TYPE_ADDR) + return 0; + + /* Old-style drivers rely on initialization on first use, so + call the init whenever a command is issued to this driver. + New-style drivers using v4l2_subdev should call init explicitly. */ + cx25840_init(i2c_get_clientdata(client), 0); return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg); } |