From: Matthias Schwarzott <zzam@gentoo.org>
To: linux-dvb@linuxtv.org
Subject: Re: [linux-dvb] [FIXEd] Bug Report - Twinhan vp-1020, bt_8xx driver + frontend
Date: Tue, 2 Dec 2008 20:21:48 +0100 [thread overview]
Message-ID: <200812022021.49856.zzam@gentoo.org> (raw)
In-Reply-To: <007801c954b1$29b4d030$0000fea9@cr344472a>
On Dienstag, 2. Dezember 2008, Alain Turbide wrote:
> Well, it's not a difficult fix now that I see it. The issue was that the
> original default for FE_ALGO_SW was 0 while FE_ALGO_HW was 1.
> Since there is an older documented option for the dst module called
> dst_algo that some people might still be using to force the tuning algo to
> sofware by setting dst_algo=0, there is no choice but to also make the
> default of DVBFE_ALGO_SW to also be 0 so that the values will match and the
> new code will still function with users who force dst_algo=0 on the dst
> module load.. The fix would thus be to go from: this in dvb_frontend.h
> enum dvbfe_algo {
> DVBFE_ALGO_HW = (1 << 0),
> DVBFE_ALGO_SW = (1 << 1),
> DVBFE_ALGO_CUSTOM = (1 << 2),
> DVBFE_ALGO_RECOVERY = (1 << 31)
> };
>
> to this:
> enum dvbfe_algo {
> DVBFE_ALGO_HW = (1 << 0),
> DVBFE_ALGO_SW = 0,
> DVBFE_ALGO_CUSTOM = (1 << 2),
> DVBFE_ALGO_RECOVERY = (1 << 31)
> };
>
> This is what I've done now and works well. This is the only change required
> to fix the issue. In dst.c we could also default dst_algo to
> DVB_FRONTEND_SW instead of 0 to make it more robust. I can't see any code
> else where that depends on DVBFE_ALGO_SW being set to 2.
>
Why should we rely on exact values, and not just modify the only place where
these values are exposed to userspace, and change dst_get_tuning_algo to
something similar to:
static int dst_get_tuning_algo(struct dvb_frontend *fe)
{
return dst_algo ? DVBFE_ALGO_HW : DVBFE_ALGO_SW;
}
The other (not backward compatible) fix is to adjust the parameter description
and use 1 and 2 as allowed settings.
Regards
Matthias
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
next prev parent reply other threads:[~2008-12-02 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-01 17:18 [linux-dvb] Bug Report - Twinhan vp-1020, bt_8xx driver + frontend Alain
2008-12-01 21:31 ` [linux-dvb] [FIXEd] " Alain Turbide
2008-12-02 17:37 ` VDR User
2008-12-02 18:07 ` sinter
2008-12-02 19:05 ` Alain Turbide
2008-12-02 19:21 ` Alain Turbide
2008-12-02 19:21 ` Matthias Schwarzott [this message]
2008-12-02 19:37 ` Alain Turbide
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=200812022021.49856.zzam@gentoo.org \
--to=zzam@gentoo.org \
--cc=linux-dvb@linuxtv.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.