From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Devin Heitmueller <dheitmueller@kernellabs.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Devin Heitmueller <dheitmueller@linuxtv.org>
Subject: Re: [media] duplicate code in media drivers
Date: Tue, 22 May 2018 12:11:26 -0500 [thread overview]
Message-ID: <eda3980d-0464-b030-448a-bc60fab75f97@embeddedor.com> (raw)
In-Reply-To: <CAGoCfiwHPPJZABCtMgPzqvHNprnLn8qG9R0aT0b3Y8VfR_ta+g@mail.gmail.com>
On 05/21/2018 03:44 PM, Devin Heitmueller wrote:
>>> diff -u -p drivers/media/dvb-frontends/au8522_decoder.c /tmp/nothing/media/dvb-frontends/au8522_decoder.c
>>> --- drivers/media/dvb-frontends/au8522_decoder.c
>>> +++ /tmp/nothing/media/dvb-frontends/au8522_decoder.c
>>> @@ -280,14 +280,9 @@ static void setup_decoder_defaults(struc
>>> AU8522_TOREGAAGC_REG0E5H_CVBS);
>>> au8522_writereg(state, AU8522_REG016H, AU8522_REG016H_CVBS);
>>>
>>> - if (is_svideo) {
>>> /* Despite what the table says, for the HVR-950q we still need
>>> to be in CVBS mode for the S-Video input (reason unknown). */
>>> /* filter_coef_type = 3; */
>>> - filter_coef_type = 5;
>>> - } else {
>>> - filter_coef_type = 5;
>>> - }
>>
>> Better ask Devin about this (c/c).
>
> This was a case where the implementation didn't match the datasheet,
> and it wasn't clear why the filter coefficients weren't working
> properly. Essentially I should have labeled that as a TODO or FIXME
> when I disabled the "right" value and forced it to always be five. It
> was also likely that the filter coefficients would need to differ if
> taking video over the IF interface as opposed to CVBS/S-video, which
> is why I didn't want to get rid of the logic entirely. That said, the
> only product I've ever seen with the tda18271 mated to the au8522 will
> likely never be supported for analog video under Linux for unrelated
> reasons.
>
> That said, it's worked "good enough" since I wrote the code nine years
> ago, so if somebody wants to submit a patch to either get rid of the
> if() statement or mark it as a FIXME that will likely never actually
> get fixed, I wouldn't have an objection to either.
>
Devin,
I've sent a patch based on your feedback.
Thanks!
--
Gustavo
next prev parent reply other threads:[~2018-05-22 17:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-21 19:39 [media] duplicate code in media drivers Gustavo A. R. Silva
2018-05-21 20:14 ` Mauro Carvalho Chehab
2018-05-21 20:44 ` Devin Heitmueller
2018-05-22 17:11 ` Gustavo A. R. Silva [this message]
2018-05-22 16:36 ` Gustavo A. R. Silva
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=eda3980d-0464-b030-448a-bc60fab75f97@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=dheitmueller@kernellabs.com \
--cc=dheitmueller@linuxtv.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=mchehab@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox