Christophe Massiot wrote:

>On Tue, Jul 26, 2005, Miwer wrote:
>
>  
>
>>That didn't work either... All I get is static. One thing though... When
>>I use the utils/radio tool to tune in the station - it sets the audio
>>input to 4, and there's no sound. When I manually change the input to 1
>>(ivtvctl -q 1) I get the static. I don't know if any of my attempts make
>>any sense... I'm new at this ivtv-stuff, so I may be shooting flies with
>>a shotgun here, but I don't know what else to do.
>>    
>>
>
>It's interesting, could you try with 2 ? 1 should be the video tuner,
>but 2 used to be the radio in the PVR-350, maybe it's the same.
>
>  
>

(Ok. I'm not gonna wait anymore for the moderators to approve my >20KB
mail sent two days ago, so here's part 1 of 2)

Hi Christophe, get ready for this  :)


I've done even more testing on this radio stuff, I also tested your
suggestion (I allready had tried that, actually). I've also tried
setting the tuner to input 7 instead of the default input 6 but they
produce the same output - I don't know if theres any difference at all?!
I managed to get some sound out of the radio, but not in a correct
manner. I've attached a kind of step-by-step of my actions, and with
some debugging options to the various modules, I've also sampled some
output from various commands and from /var/log/messages

Hope it makes sense.

/Miwer



After booting the PC:

myth utils # ./ivtvctl -d /dev/v4l/video0 -a
ioctl IVTV_IOC_G_CODEC ok
Codec parameters
aspect      : 2
audio       : 0x00e9
bframes     : 3
bitrate_mode: 0
bitrate     : 8000000
bitrate_peak: 9600000
dnr_mode    : 0
dnr_spatial : 0
dnr_temporal: 8
dnr_type    : 0
framerate   : 0
framespergop: 12
gop_closure : 1
pulldown    : 0
stream_type : 14
ioctl VIDIOC_G_FMT ok
        Type   : Video Capture
        Width  : 720
        Height : 576
ioctl VIDIOC_QUERYCAP ok
        Driver name   : ivtv
        Card type     : WinTV PVR 150
        Bus info      : 0
        Driver version: 775
        Capabilities  : 0x01070011
ioctl: VIDIOC_ENUMINPUT
        Input   : 0
        Name    : S-Video 0
        Type    : 0x00000002
        Audioset: 0x00000003
        Tuner   : 0x00000000
        Standard: 0x00000000007F3FFF ( PAL NTSC SECAM )
        Status  : 0

        Input   : 1
        Name    : S-Video 1
        Type    : 0x00000002
        Audioset: 0x00000003
        Tuner   : 0x00000000
        Standard: 0x00000000007F3FFF ( PAL NTSC SECAM )
        Status  : 0

        Input   : 2
        Name    : Composite 0
        Type    : 0x00000002
        Audioset: 0x00000003
        Tuner   : 0x00000000
        Standard: 0x00000000007F3FFF ( PAL NTSC SECAM )
        Status  : 0

        Input   : 3
        Name    : Composite 1
        Type    : 0x00000002
        Audioset: 0x00000003
        Tuner   : 0x00000000
        Standard: 0x00000000007F3FFF ( PAL NTSC SECAM )
        Status  : 0

        Input   : 4
        Name    : Composite 2
        Type    : 0x00000002
        Audioset: 0x00000003
        Tuner   : 0x00000000
        Standard: 0x00000000007F3FFF ( PAL NTSC SECAM )
        Status  : 0

        Input   : 5
        Name    : Composite 3
        Type    : 0x00000002
        Audioset: 0x00000003
        Tuner   : 0x00000000
        Standard: 0x00000000007F3FFF ( PAL NTSC SECAM )
        Status  : 0

        Input   : 6
        Name    : Tuner 0
        Type    : 0x00000001
        Audioset: 0x00000003
        Tuner   : 0x00000000
        Standard: 0x00000000000000FF ( PAL )
        Status  : 0

        Input   : 7
        Name    : Tuner 1
        Type    : 0x00000001
        Audioset: 0x00000003
        Tuner   : 0x00000000
        Standard: 0x00000000000000FF ( PAL )
        Status  : 0
ioctl VIDIOC_G_INPUT ok
Video input = 6
ioctl: VIDIOC_ENUMOUTPUT
ioctl VIDIOC_G_OUTPUT failed: Invalid argument
ioctl: VIDIOC_ENUMAUDIO
        Input   : 0
        Name    : Tuner Audio In

        Input   : 1
        Name    : Audio Line 1

        Input   : 2
        Name    : Audio Line 2

        Input   : 3
        Name    : Audio Line 3

        Input   : 4
        Name    : Audio Line 4
ioctl VIDIOC_G_AUDIO ok
Audio input = 0: Tuner Audio In
ioctl VIDIOC_G_FREQUENCY ok
Frequency = 10356
ioctl: VIDIOC_ENUMSTD
        index       : 0
        ID          : 0x0000000000003000
        Name        : NTSC
        Frame period: 1001/30000
        Frame lines : 525

        index       : 1
        ID          : 0x00000000000000FF
        Name        : PAL
        Frame period: 1/25
        Frame lines : 625

        index       : 2
        ID          : 0x00000000007F0000
        Name        : SECAM
        Frame period: 1/25
        Frame lines : 625
ioctl VIDIOC_G_STD ok
Video standard = 0x000000ff
ioctl: VIDIOC_QUERYCTRL
Brightness = 127
Contrast = 63
Saturation = 63
Hue = 0
Volume = 65535
Mute = 0
myth utils #


myth utils # ./radio -d /dev/v4l/radio0 -i /dev/v4l/video24 -f 96.1
set to freq 96.06
Running: aplay -f dat < /dev/v4l/video24
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz,
Stereo


(from /var/log/messages with some debug output:)
Jul 26 18:46:49 myth ivtv: Allocate encoder radio stream
Jul 26 18:46:50 myth cx25840: decoder disable output
Jul 26 18:46:50 myth tuner: tv 0x1b 0x6f 0xce 0x02
Jul 26 18:46:50 myth tda9885/6/7: configure for: Radio Stereo
Jul 26 18:46:50 myth tda9885/6/7: writing: b=0xcc c=0x90 e=0x1d
Jul 26 18:46:50 myth tuner: radio freq set to 0.00
Jul 26 18:46:50 myth tuner: radio freq (0.00) out of range (65-108)
Jul 26 18:46:50 myth cx25840: set audio input (4)
Jul 26 18:46:50 myth cx25840: decoder enable output
Jul 26 18:46:50 myth cx25840: decoder set norm PAL
Jul 26 18:46:50 myth cx25840: decoder set input (6)
Jul 26 18:46:50 myth cx25840: now setting Tuner input
Jul 26 18:46:50 myth cx25840: set audio input (4)
Jul 26 18:46:50 myth cx25840: decoder disable output
Jul 26 18:46:50 myth tuner: radio freq set to 96.06
Jul 26 18:46:50 myth tuner: radio 0x08 0x57 0x80 0x19
Jul 26 18:46:50 myth tda9885/6/7: switching to v4l2
Jul 26 18:46:50 myth cx25840: decoder enable output
Jul 26 18:46:50 myth cx25840: decoder set norm PAL
Jul 26 18:46:50 myth cx25840: decoder set input (6)
Jul 26 18:46:50 myth cx25840: now setting Tuner input
Jul 26 18:46:50 myth cx25840: set audio input (4)
Jul 26 18:46:50 myth ivtv: Allocate DMA encoder PCM audio stream: 455 x
4608 buffers (2048KB total)
Jul 26 18:46:50 myth ivtv: Setup VBI API header 0x0000bd0c pkts 1 buffs
48 ln 34 sz 64
Jul 26 18:46:50 myth ivtv: Setup VBI start 0x002fea04 frames 48 fpi 1
lines 0x00000140
Jul 26 18:46:51 myth cx25840: decoder disable output
Jul 26 18:46:51 myth cx25840: decoder enable output
Jul 26 18:46:51 myth cx25840: decoder set norm PAL
Jul 26 18:46:51 myth cx25840: decoder set input (6)
Jul 26 18:46:51 myth cx25840: now setting Tuner input
Jul 26 18:46:51 myth cx25840: set audio input (4)

myth utils # ./ivtvctl -d /dev/v4l/video0 -a
   (snipped.. only change is this:)
ioctl VIDIOC_G_AUDIO ok
Audio input = 4: Audio Line 4
ioctl VIDIOC_G_FREQUENCY ok
Frequency = 1537
myth utils #

   (no sound)


myth utils # ./ivtvctl -q 1
ioctl VIDIOC_S_AUDIO ok
Audio input set to 1
myth utils #

cx25840: set audio input (1)

   (static)


myth utils # ./ivtvctl -q 2
ioctl VIDIOC_S_AUDIO ok
Audio input set to 2
myth utils #

cx25840: set audio input (2)

   (no sound)


myth utils # ./ivtvctl -q 3
ioctl VIDIOC_S_AUDIO ok
Audio input set to 3
myth utils #

cx25840: set audio input (3)

   (audio from 2nd tuner, TV - not interesting i guess)


THIS ONE IS STRANGE:

myth utils # ./ivtvctl -q 0
ioctl VIDIOC_S_AUDIO ok
Audio input set to 0
myth utils #

cx25840: set audio input (2)   <--  W00T!!! (Miwer scratches his head)

   (no sound either)


Ok, on cleanup, when I CTRL-C the radio app:

cx25840: decoder disable output
tuner: tv 0x08 0x70 0xce 0x01
tuner: tv freq set to 0.00
tuner: TV freq (0.00) out of range (44-958)
tda9885/6/7: configure for: PAL-BG
tda9885/6/7: writing: b=0xd4 c=0x70 e=0x09
cx25840: set audio input (1)
cx25840: decoder enable output
cx25840: decoder set norm PAL
cx25840: decoder set input (6)
cx25840: now setting Tuner input
cx25840: set audio input (1)


Watching TV in mythtv after testing radio stuff:

cx25840: decoder set picture bright=127 contrast=63 saturation=63 hue=0
cx25840: decoder set picture bright=127 contrast=63 saturation=63 hue=0
cx25840: decoder set picture bright=127 contrast=63 saturation=63 hue=0
cx25840: decoder set picture bright=127 contrast=63 saturation=63 hue=0
cx25840: decoder set size 720x544 (from 720x580) -> scale  0x8163, filter 0
ivtv: Sliced VBI not supported for cx25840 so no vbi re-insertion
possible yet
ivtv: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)
ivtv: Setup VBI API header 0x0000bd0c pkts 1 buffs 48 ln 34 sz 64
ivtv: Setup VBI start 0x002fea04 frames 48 fpi 1 lines 0x00000140
cx25840: decoder disable output
cx25840: decoder enable output
cx25840: decoder set norm PAL
cx25840: decoder set input (6)
cx25840: now setting Tuner input
cx25840: set audio input (1)

ioctl VIDIOC_G_FREQUENCY ok
Frequency = 0

This last step produces some interesting results. Theres snow on the
screen. It sounds like there's a mix of two or more radio channels, but
not the one I was trying to tune to. After listening to the noisy mix of
channels, I've identified channels located at FM 97.0Mhz, 97.7Mhz, and
102.7Mhz. I can't make any sense of this but maybe someone else can.
This plays until I change channels in mythtv, where it correctly tune in
to the tv station's frequency. This is reproducible.









-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
ivtv-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ivtv-devel

Reply via email to