public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Jelle de Jong <jelledejong@powercraft.nl>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: Afatech AF9013 DVB-T not working with mplayer radio streams
Date: Fri, 10 Jul 2009 15:09:34 +0300	[thread overview]
Message-ID: <4A572F7E.6010701@iki.fi> (raw)
In-Reply-To: <829197380907091805h10bcf548kbf5435feeb30e067@mail.gmail.com>

hei Devin,
Thank you for debugging this issue.

Devin Heitmueller wrote:
> Thanks to Jelle providing an environment to debug the issue in, I
> isolated the problem.  This is actually a combination of bugs in
> mplayer and the af9013 driver not handling the condition as gracefully
> as some other demods.
> 
> First the bugs in mplayer:
> 
> The following is the line from the channels.conf where tuning failed:
> 
> Frequency in question:
> 3FM(Digitenne):722000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_AUTO:FEC_AUTO:QAM_AUTO:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_AUTO:HIERARCHY_AUTO:0:7142:1114
> 
> Mplayer does not support "TRANSMISSION_MODE_AUTO",
> "GUARD_INTERVAL_AUTO" and "QAM_AUTO" (for the constellation).  In the
> case of the transmission mode and constellation, mplayer does not
> populate the field at all in the struct sent to the ioctl(), so you
> get whatever garbage is on the stack.  For the guard interval field,
> it defaults to GUARD_INTERVAL_1_4 if it is an unrecognized value.
> 
> I confirmed the mplayer behavior with the version Jelle has, as well
> as checking the source code in the svn trunk for the latest mplayer.
> 
> So, why does it work with some tuners but not the af9013?  Well, some
> demodulators check to see if *any* of the fields are "_AUTO" and if
> any of them are, then it puts the demod into auto mode and disregards
> whatever is in the other fields.  However, the af9013 looks at each
> field, and if any of them are an unrecognized value, the code bails
> out in af9013_set_ofdm_params().   As a result, the tuning never
> actually happens.
> 
> The behavior should be readily apparent if you were to put the above
> line into your channels.conf and try to tune (note I had to add
> printk() lines to af9013_set_ofdm_params() to see it bail out in the
> first switch statement.
> 
> Anitti, do you want to take it from here, or would you prefer I rework
> the routine to put the device into auto mode if any of the fields are
> auto?

af9013 is correct in my mind. af9013 will return -EINVAL (error invalid 
value) in case of first garbage value met (maybe better to switch auto 
mode when garbage value meet and print debug log?).

Of course there should be at least debug printing to inform that... but 
fix you suggest is better for compatibility. You can do that, it is ok 
for me.

> 
> Devin

Antti
-- 
http://palosaari.fi/

  parent reply	other threads:[~2009-07-10 12:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26  8:07 Afatech AF9013 DVB-T not working with mplayer radio streams Jelle de Jong
2009-06-30 20:12 ` Jelle de Jong
2009-07-02  8:43   ` Jelle de Jong
2009-07-02 16:09     ` Devin Heitmueller
2009-07-02 20:51       ` Jelle de Jong
2009-07-02 21:18         ` Devin Heitmueller
2009-07-02 22:44     ` Antti Palosaari
2009-07-02 22:29 ` Antti Palosaari
2009-07-03 16:01   ` Jelle de Jong
2009-07-10  1:05     ` Devin Heitmueller
2009-07-10  8:25       ` Jelle de Jong
2009-07-10 12:09       ` Antti Palosaari [this message]
2009-07-10 15:16         ` Devin Heitmueller
2009-07-10 15:40           ` Jelle de Jong
2009-07-10 17:09             ` Devin Heitmueller
2009-07-10 17:09             ` Devin Heitmueller
2009-07-10 21:12           ` Antti Palosaari
2009-07-10 23:11             ` Antti Palosaari
2009-07-11 10:31               ` Jelle de Jong
2009-07-11 11:48                 ` Jelle de Jong

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=4A572F7E.6010701@iki.fi \
    --to=crope@iki.fi \
    --cc=dheitmueller@kernellabs.com \
    --cc=jelledejong@powercraft.nl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox