From: Antti Palosaari <crope@iki.fi>
To: Gordon Hecker <ghecker@gmx.de>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] af9013: fix i2c failures for dual-tuner devices
Date: Sat, 21 Jan 2012 00:30:43 +0200 [thread overview]
Message-ID: <4F19EB13.7010502@iki.fi> (raw)
In-Reply-To: <1327094337-12483-1-git-send-email-ghecker@gmx.de>
On 01/20/2012 11:18 PM, Gordon Hecker wrote:
> This patch fixes the following error messages with a
> Terratec Cinergy T Stick Dual RC DVB-T device.
>
> af9013: i2c wr failed=-1 reg=d607 len=1
> af9015: command failed:2
> af9013: i2c rd failed=-1 reg=d607 len=1
> af9015: command failed:1
>
> It implements exclusive access to i2c for only one frontend at a time
> through a use-counter that is increased for each af9013_i2c_gate_ctrl-enable
> or i2c-read/write and decreased accordingly. The use-counter remains
> incremented after af9013_i2c_gate_ctrl-enable until the corresponding
> disable.
>
> Debug output was added.
>
> ToDo:
> * Replace frontend by adapter (the dual-tuner devices do actually
> provide two adapters with one frontend each)
> * move af9013_i2c_gate_mutex, locked_fe, af9013_i2c_gate_ctrl_usecnt
> to the usb device
Again that same issue. But after af9013 rewrote those should not be very
significant problem... If you looked, as I can guess, AF9015 code you
can see callbacks lock that are for resolving same issue. Almost all
callbacks are locked, but I left few rarely called callbacks without
lock due to performance point of view. You can guess it causes always
latency to wait other thread finish callback...
I think you may resolve that just adding one or two callback lock more,
likely for tuner init() and sleep().
I don't like that you are adding such code for the demod driver -
problem is USB-bridge, its I2C adapter and firmware. Due to that such
code should be in AF9015 driver. There has been originally two I2C
adapters in af9015 but I removed those. And there is actually only one
I2C adapter in AF9015.
See these for more info about I2C bus connections:
http://palosaari.fi/linux/v4l-dvb/controlling_tuner_af9015_dual_demod.txt
http://palosaari.fi/linux/v4l-dvb/controlling_tuner.txt
I think that piece of code is not very important and I dont like to see
it in current af9013 driver. Do needed changes for af9015 instead.
regards
Antti
--
http://palosaari.fi/
next prev parent reply other threads:[~2012-01-20 22:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 21:18 [PATCH] af9013: fix i2c failures for dual-tuner devices Gordon Hecker
2012-01-20 22:30 ` Antti Palosaari [this message]
2012-01-22 21:13 ` [PATCH] af9015: " Gordon Hecker
2012-03-07 15:51 ` poma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F19EB13.7010502@iki.fi \
--to=crope@iki.fi \
--cc=ghecker@gmx.de \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.