[pvrusb2] FM tuner support...?

Hans Verkuil hverkuil at xs4all.nl
Tue Nov 14 13:13:27 CST 2006


On Tuesday 14 November 2006 19:12, Felix Lighter wrote:
> On 11/14/06, Mike Isely <isely at isely.net> wrote:
> > On Sun, 12 Nov 2006, Felix Lighter wrote:
> >
> > Unfortunately I don't have any specific pointers.  But I'd probably
> > start with
> > a reading of the V4L2 API specification.  Next I'd probably go look
> > at a V4L driver which includes radio support.
> >
> > My gut feeling is that the V4L side of this implementation should
> > be pretty straight-forward.  The hardware side also should not be
> > too bad either; it should be just a matter of reprogramming the
> > cx23416 to spit out straight MP3
> > audio and adjust the pathway in front of it to decode FM radio. 
> > What makes that relatively easy is that the USB snoop log you've
> > got contains the magic sequence you need to do that.
> >
> > If you haven't already done so, use decode_log (a utility included
> > with the standalone driver) to further dissect that log output. 
> > With decode_log you'll
> > be able to translate the sequence of USB transactions in the log
> > into the actual chip register read / writes and the cx23416
> > commands that are being issued to the part.  The pvrusb2 web
> > documentation has information on how to do this (though now that I
> > think of it, this might be slightly though not fatally out of
> > date).
> >
> > If you figure out what's needed specifically to enable the radio,
> > I'd be willing to work with you to update the driver appropriately.
>
> Sounds great. That'll get me started quite nicely. I'll definitely
> start on the hauppauge end of things. Thanks for the offer to help,
> and thanks Roger, for the offer to debug. You'll be hearing from me
> 8-)

I expect that under Windows the tuner is switched to FM mode and that 
the radio app then starts capturing. It is generic MPEG with just black 
video and sound as a standard audio track within the MPEG file. Just 
like capturing from the TV. To get black video instead of the default 
of just static you can issue a CX2341X_ENC_MUTE_VIDEO API call (that's 
what ivtv uses).

Switching the tuner to FM mode is done through an AUDC_SET_RADIO ioctl. 
What is left is to figure out the correct audio inputs for the msp3400 
or cx25840/wm8775 since these are different from normal TV input. Start 
with the ivtv values for the PVR250 (msp3400 based) and PVR150 (cx25840 
based). Very likely to be the correct values.

While it is also possible to get raw PCM audio from the cx23416 chip I 
doubt it is possible to do that for a pvrusb, or if it is possible then 
I'm not sure it is worth the effort. I think it is unlikely that 
Hauppauge has implemented that, but it would be an interesting test.

But basic radio support by capturing MPEG with only audio and muted 
video should be easy to implement. It's just like capturing from TV 
with slightly different inputs and tuner settings.

Hope this helps,

	Hans


More information about the pvrusb2 mailing list