Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ivtv: devel

CX18 - No Audio on HVR-1600

 

 

ivtv devel RSS feed   Index | Next | Previous | View Threaded


zedoriah at gmail

May 20, 2008, 12:10 PM

Post #1 of 10 (5010 views)
Permalink
CX18 - No Audio on HVR-1600

The cx18 driver seems to be working wonderfully, other than I get no audio.

$ cat /dev/video0 > test.mpg
$ mplayer test.mpg
[snip]
Audio: no sound
[snip]

So it's looking like it's not finding any audio at all, it's not low or anything.

I read it only supports mono so far, so let's check that:

~$ v4l2-ctl -IT
Video input : 0 (Tuner 1)
Tuner:
Capabilities : 62.5 kHz multi-standard stereo lang1 lang2
Frequency range : 44.0 MHz - 958.0 MHz
Signal strength : 100%
Current audio mode : mono
Available subchannels: mono

~$ v4l2-ctl -D
Driver Info:
Driver name : cx18
Card type : Hauppauge HVR-1600
Bus info : 0000:02:00.0
Driver version: 65536
Capabilities : 0x01070001
Video Capture
Tuner
Audio
Radio
Read/Write

~$ v4l2-ctl -l | grep -i audio
audio_sampling_frequency (menu) : min=0 max=2 default=1 value=2
audio_encoding_layer (menu) : min=1 max=1 default=1 value=1 flags=update
audio_layer_ii_bitrate (menu) : min=9 max=13 default=10 value=13
audio_stereo_mode (menu) : min=0 max=3 default=0 value=0 flags=update
audio_stereo_mode_extension (menu) : min=0 max=3 default=0 value=0 flags=inactive
audio_emphasis (menu) : min=0 max=2 default=0 value=0
audio_crc (menu) : min=0 max=1 default=0 value=0
audio_mute (bool) : default=0 value=0


The only strange thing showing up in dmesg is:
[158086.417606] cx18-0: i2c ID 0x00000000 (gpio) not found for cmd 0xc0185650!

repeatedly.

This is on Ubuntu 8.04, 2.6.24-16-generic #1 SMP Thu Apr 10 12:47:45 UTC 2008 x86_64 GNU/Linux

Any help would be greatly appreciated.

Zed

--
This message was sent on behalf of zedoriah [at] gmail at openSubscriber.com
http://www.opensubscriber.com/messages/ivtv-devel [at] ivtvdriver/topic.html

_______________________________________________
ivtv-devel mailing list
ivtv-devel [at] ivtvdriver
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


s at ourada

May 21, 2008, 5:46 AM

Post #2 of 10 (4725 views)
Permalink
Re: CX18 - No Audio on HVR-1600 [In reply to]

Zed,
> The cx18 driver seems to be working wonderfully, other than I get no audio.
>
> $ cat /dev/video0 > test.mpg
> $ mplayer test.mpg
> [snip]
> Audio: no sound
> [snip]
>
> So it's looking like it's not finding any audio at all, it's not low or anything.
>
Though I'm not sure the problem matches completely, I had a problem with
no audio stream and it turned out to be that I needed in load the cs5345
module ('modprobe cs5345').

Steven


_______________________________________________
ivtv-devel mailing list
ivtv-devel [at] ivtvdriver
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


awalls at radix

May 21, 2008, 6:43 AM

Post #3 of 10 (4710 views)
Permalink
Re: CX18 - No Audio on HVR-1600 [In reply to]

On Wed, 2008-05-21 at 07:46 -0500, Steven Ourada wrote:
> Zed,
> > The cx18 driver seems to be working wonderfully, other than I get no audio.
> >
> > $ cat /dev/video0 > test.mpg
> > $ mplayer test.mpg
> > [snip]
> > Audio: no sound
> > [snip]
> >
> > So it's looking like it's not finding any audio at all, it's not low or anything.
> >
> Though I'm not sure the problem matches completely, I had a problem with
> no audio stream and it turned out to be that I needed in load the cs5345
> module ('modprobe cs5345').

Hmmm. No cs5345 module being loaded would be a cause for no audio,
since cx18 uses baseband mono audio from the tuner (right now).

But the cx18 driver should be automatically requesting the cs5345 module
be loaded. See
linux/drivers/media/video/cx18/cx18-driver.c:cx18_load_and_init_modules()


Do you have to manually load this module every time? If so, what does
the dmesg out look like for load of the cx18 module?

Regards,
Andy


_______________________________________________
ivtv-devel mailing list
ivtv-devel [at] ivtvdriver
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


awalls at radix

May 21, 2008, 8:24 AM

Post #4 of 10 (4716 views)
Permalink
Re: CX18 - No Audio on HVR-1600 [In reply to]

On Tue, 2008-05-20 at 15:10 -0400, zedoriah [at] gmail wrote:
> The cx18 driver seems to be working wonderfully, other than I get no audio.
>
> $ cat /dev/video0 > test.mpg
> $ mplayer test.mpg
> [snip]
> Audio: no sound
> [snip]
>
> So it's looking like it's not finding any audio at all, it's not low or anything.

There is a known bug related to firmware loading after the modporbe of
cx18, the first analog capture may not have audio.

Do you get audio with the second capture?


> I read it only supports mono so far, so let's check that:
>
> ~$ v4l2-ctl -IT

> ~$ v4l2-ctl -D

> ~$ v4l2-ctl -l | grep -i audio

These commands may not tell you the whole truth when it comes to audio.
Some are reporting from the CX23418's encoder settings and some are
reporting from the CX25843 core in the CX23418. For tuner audio, the
CX28543 core is currently being bypassed even though it's still being
configured (improperly) for tuner SIF audio processing. So it may
report stereo even though it's not the encoder's current baseband audio
source.

Fixing tuner audio to get stereo is on my pet peeve list of things to
do. But right now I only have data to fix most of the problem (i.e. the
cx25843 setup), but not all of the problem (i.e. how to tell the
encoder what to use for audio input).




> The only strange thing showing up in dmesg is:
> [158086.417606] cx18-0: i2c ID 0x00000000 (gpio) not found for cmd 0xc0185650!
>
> repeatedly.


1. The function that emits this message in your case is:
cx18-i2c.c:cx18_i2c_id() is currently only called for handling debug
ioctls. Your attempts at troubleshooting may have stimulated them. If
you:

# modprobe -r cx18
# modprobe cx18 debug=83

To turn on i2c, ioctl, warn, and info debugging, you may be able to
better see what user actions you are taking to stimulate the message.


2. cmd 0xc01855650 decodes to dir = IOWR, size = 0x18 (24 decimal), type
= 0x56 'V', number = 0x50 (80 decimal). This appears to be
VIDIOC_DBG_G_REGISTER defined in linux/include/videodev2.h.

Whatever command line utility you are using for debug is making this
ioctl() call on cx18 with a bad argument. There is no real device with
an I2C id of 0.

The cx18 driver internally assigns 0 to the GPIO and the CX23418 as
"dummy" i2c devices. In the name lookup, it finds gpio first, so that's
why that's in the message.




> This is on Ubuntu 8.04, 2.6.24-16-generic #1 SMP Thu Apr 10 12:47:45 UTC 2008 x86_64 GNU/Linux
>
> Any help would be greatly appreciated.

If you have compiled v4l2-dbg you may want to try the following commands
to check the state of the cs5345 registers, and see if they are close to
mine:

# v4l2-dbg -d /dev/video1 -C
host 0x0: cx23418 revision 0x00000000
i2c 0x4c: cs5345 revision 0x00000000

# v4l2-dbg -d /dev/video1 -R type=i2cdrv,chip=cs5345
ioctl: VIDIOC_DBG_G_REGISTER

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000: e2 00 08 01 10 40 00 00 01 00 00 c0 00 00 00
00000010: 00


(/dev/video1 is my HVR-1600, yours may be at /dev/video0.)

The cs5345 is responsible for digitizing, amplifying, muting, and
multiplexing baseband audio sources. If it isn't set up right, then no
baseband audio would be a symptom.


Regards,
Andy


_______________________________________________
ivtv-devel mailing list
ivtv-devel [at] ivtvdriver
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


s at ourada

May 21, 2008, 8:32 AM

Post #5 of 10 (4700 views)
Permalink
Re: CX18 - No Audio on HVR-1600 [In reply to]

Andy,
> Hmmm. No cs5345 module being loaded would be a cause for no audio,
> since cx18 uses baseband mono audio from the tuner (right now).
>
> But the cx18 driver should be automatically requesting the cs5345 module
> be loaded. See
> linux/drivers/media/video/cx18/cx18-driver.c:cx18_load_and_init_modules()
>
>
> Do you have to manually load this module every time? If so, what does
> the dmesg out look like for load of the cx18 module?
>
Huh, I can't reproduce it, now. I'm not sure quite how this happened
earlier; must have been before I had everything installed properly (I'm
not all that good with compiling my own kernel modules). But now this
module loads at boot, and it's not present in /etc/modules (and it still
loads if I remove ivtv from /etc/modules, too).

So, huh. I definitely had no audio streams in my .mpgs at one point, and
it seemed like the fix was just loading that module, but since I can't
reproduce it now, I dunno.

Steven


_______________________________________________
ivtv-devel mailing list
ivtv-devel [at] ivtvdriver
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


sander.sweers at gmail

May 21, 2008, 1:54 PM

Post #6 of 10 (4694 views)
Permalink
Re: CX18 - No Audio on HVR-1600 [In reply to]

On wo, 2008-05-21 at 10:32 -0500, Steven Ourada wrote:
> > Do you have to manually load this module every time? If so, what
> does
> > the dmesg out look like for load of the cx18 module?
> >
> Huh, I can't reproduce it, now. I'm not sure quite how this happened
> earlier; must have been before I had everything installed properly
> (I'm
> not all that good with compiling my own kernel modules).

You *might* have had automatic module loading disabled in the kernel.
Unlikely but worth checking.

Greets
Sander


_______________________________________________
ivtv-devel mailing list
ivtv-devel [at] ivtvdriver
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


zedoriah at gmail

May 21, 2008, 10:47 PM

Post #7 of 10 (4690 views)
Permalink
Re: CX18 - No Audio on HVR-1600 [In reply to]

There is a known bug related to firmware loading after the modporbe of
cx18, the first analog capture may not have audio.

Do you get audio with the second capture?

Alrighty, so after much more googling and trouble shooting I'm up to this
bug now. At least it's progress!

It appears so my driver was a bit out of date, so I loaded up the latest
ones. So yes, now I get funky audio problems on the first record attempt,
but after that it works like a charm. I can ivtv-tune to change channels
and the sound is coming through loud and clear. So I'm getting really
hopeful now.

If I load up mythtv it gives me video but sound. If I quit then cat
/dev/video0 > test.mpg gives me the same "no audio" warning. Unloading the
cx18 and cs5345 modules and reloading them (and v4l2-ctl -s 10 to set it to
NTSC and ivtv-tune to pick a channel) makes cat /dev/video0 work again. My
current thinking is that myth trying to initialize the card is screwing up
some setting, but dmesg shows nothing.

So close, and yet so far.

# v4l2-dbg -d /dev/video1 -C
host 0x0: cx23418 revision 0x00000000
i2c 0x4c: cs5345 revision 0x00000000

$ v4l2-dbg -d /dev/video0 -C
host 0x0: 418 revision 0x00000000
i2c 0x4c: 5345 revision 0x00000000

Interesting that mine only shows "418" and "5345" instead of "cx23418" and
"cs5345".


# v4l2-dbg -d /dev/video1 -R type=i2cdrv,chip=cs5345
ioctl: VIDIOC_DBG_G_REGISTER

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000: e2 00 08 01 10 40 00 00 01 00 00 c0 00 00 00
00000010: 00

$ v4l2-dbg -d /dev/video0 -R type=i2cdrv,chip=cs5345
ioctl: VIDIOC_DBG_G_REGISTER

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
ioctl: VIDIOC_DBG_G_REGISTER failed for 0x2000000
[ - snip all the way down to - ]
ioctl: VIDIOC_DBG_G_REGISTER failed for 0x20000ff


That didn't look so good.

The cs5345 is responsible for digitizing, amplifying, muting, and
multiplexing baseband audio sources. If it isn't set up right, then no
baseband audio would be a symptom.

This was very helpful is determining that this driver needed to be reloaded
to get audio working again. Once I got audio working once I had to reboot
every time the audio went away. That got old fast. Thank you very much.

Now to figure out why audio goes away, and stays away, when myth loads.

Thank you very much for you help. I appreciate it immensely.

--Zed


jahagan at comcast

May 22, 2008, 7:47 AM

Post #8 of 10 (4720 views)
Permalink
Re: CX18 - No Audio on HVR-1600 [In reply to]

-------------- Original message ----------------------
From: "Zed O'riah" <zedoriah [at] gmail>
> There is a known bug related to firmware loading after the modporbe of
> cx18, the first analog capture may not have audio.
>
> Do you get audio with the second capture?
>
> Alrighty, so after much more googling and trouble shooting I'm up to this
> bug now. At least it's progress!
>
> It appears so my driver was a bit out of date, so I loaded up the latest
> ones. So yes, now I get funky audio problems on the first record attempt,
> but after that it works like a charm. I can ivtv-tune to change channels
> and the sound is coming through loud and clear. So I'm getting really
> hopeful now.
>
> If I load up mythtv it gives me video but sound. If I quit then cat
> /dev/video0 > test.mpg gives me the same "no audio" warning. Unloading the
> cx18 and cs5345 modules and reloading them (and v4l2-ctl -s 10 to set it to
> NTSC and ivtv-tune to pick a channel) makes cat /dev/video0 work again. My
> current thinking is that myth trying to initialize the card is screwing up
> some setting, but dmesg shows nothing.
>
> So close, and yet so far.
>
> # v4l2-dbg -d /dev/video1 -C
> host 0x0: cx23418 revision 0x00000000
> i2c 0x4c: cs5345 revision 0x00000000
>
> $ v4l2-dbg -d /dev/video0 -C
> host 0x0: 418 revision 0x00000000
> i2c 0x4c: 5345 revision 0x00000000
>
> Interesting that mine only shows "418" and "5345" instead of "cx23418" and
> "cs5345".
>
>
> # v4l2-dbg -d /dev/video1 -R type=i2cdrv,chip=cs5345
> ioctl: VIDIOC_DBG_G_REGISTER
>
> 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
> 00000000: e2 00 08 01 10 40 00 00 01 00 00 c0 00 00 00
> 00000010: 00
>
> $ v4l2-dbg -d /dev/video0 -R type=i2cdrv,chip=cs5345
> ioctl: VIDIOC_DBG_G_REGISTER
>
> 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
> ioctl: VIDIOC_DBG_G_REGISTER failed for 0x2000000
> [ - snip all the way down to - ]
> ioctl: VIDIOC_DBG_G_REGISTER failed for 0x20000ff
>
>
> That didn't look so good.
>
> The cs5345 is responsible for digitizing, amplifying, muting, and
> multiplexing baseband audio sources. If it isn't set up right, then no
> baseband audio would be a symptom.
>
> This was very helpful is determining that this driver needed to be reloaded
> to get audio working again. Once I got audio working once I had to reboot
> every time the audio went away. That got old fast. Thank you very much.
>
> Now to figure out why audio goes away, and stays away, when myth loads.
>

I cracked this nut last night. I just started with MythTV 0.21 and this card so I don't know anything about the earlier versions. Out of the (Debian stable w/multimedia) box, MythTV will change the audio sampling and bit rates when it attaches to the capture device. I haven't been able to experiment beyond getting things back to the cx18 module load defaults, so I don't know who is the offender.

I can't get into my MythTV machine at the moment, so I'm going from memory.

MythTV sets the sampling frequency to 32kHz and the bit rate to something higher than the default. One or both of these will stop the audio.

You can restore sound by issuing two commands while the capture card is idle.
v4l2-ctl -c audio_sampling_frequency=1
v4l2-ctl -c audio_layer_ii_bitrate=10

This will return the card to the values used at load time and save you the whole load/unload procedure.

Through the MythTV front end you need to adjust your liveTV and recording profiles. I set them all to 48kHz and a bitrate that translates to 10 (I think it was around 224kb/s).

That's all I have for now.

Enjoy,
\Jeff/

> Thank you very much for you help. I appreciate it immensely.
>
> --Zed
Attachments: message-rfc822.eml (7.06 KB)


jahagan at comcast

May 22, 2008, 7:47 AM

Post #9 of 10 (4681 views)
Permalink
Re: CX18 - No Audio on HVR-1600 [In reply to]

-------------- Original message ----------------------
From: "Zed O'riah" <zedoriah [at] gmail>
> There is a known bug related to firmware loading after the modporbe of
> cx18, the first analog capture may not have audio.
>
> Do you get audio with the second capture?
>
> Alrighty, so after much more googling and trouble shooting I'm up to this
> bug now. At least it's progress!
>
> It appears so my driver was a bit out of date, so I loaded up the latest
> ones. So yes, now I get funky audio problems on the first record attempt,
> but after that it works like a charm. I can ivtv-tune to change channels
> and the sound is coming through loud and clear. So I'm getting really
> hopeful now.
>
> If I load up mythtv it gives me video but sound. If I quit then cat
> /dev/video0 > test.mpg gives me the same "no audio" warning. Unloading the
> cx18 and cs5345 modules and reloading them (and v4l2-ctl -s 10 to set it to
> NTSC and ivtv-tune to pick a channel) makes cat /dev/video0 work again. My
> current thinking is that myth trying to initialize the card is screwing up
> some setting, but dmesg shows nothing.
>
> So close, and yet so far.
>
> # v4l2-dbg -d /dev/video1 -C
> host 0x0: cx23418 revision 0x00000000
> i2c 0x4c: cs5345 revision 0x00000000
>
> $ v4l2-dbg -d /dev/video0 -C
> host 0x0: 418 revision 0x00000000
> i2c 0x4c: 5345 revision 0x00000000
>
> Interesting that mine only shows "418" and "5345" instead of "cx23418" and
> "cs5345".
>
>
> # v4l2-dbg -d /dev/video1 -R type=i2cdrv,chip=cs5345
> ioctl: VIDIOC_DBG_G_REGISTER
>
> 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
> 00000000: e2 00 08 01 10 40 00 00 01 00 00 c0 00 00 00
> 00000010: 00
>
> $ v4l2-dbg -d /dev/video0 -R type=i2cdrv,chip=cs5345
> ioctl: VIDIOC_DBG_G_REGISTER
>
> 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
> ioctl: VIDIOC_DBG_G_REGISTER failed for 0x2000000
> [ - snip all the way down to - ]
> ioctl: VIDIOC_DBG_G_REGISTER failed for 0x20000ff
>
>
> That didn't look so good.
>
> The cs5345 is responsible for digitizing, amplifying, muting, and
> multiplexing baseband audio sources. If it isn't set up right, then no
> baseband audio would be a symptom.
>
> This was very helpful is determining that this driver needed to be reloaded
> to get audio working again. Once I got audio working once I had to reboot
> every time the audio went away. That got old fast. Thank you very much.
>
> Now to figure out why audio goes away, and stays away, when myth loads.
>

I cracked this nut last night. I just started with MythTV 0.21 and this card so I don't know anything about the earlier versions. Out of the (Debian stable w/multimedia) box, MythTV will change the audio sampling and bit rates when it attaches to the capture device. I haven't been able to experiment beyond getting things back to the cx18 module load defaults, so I don't know who is the offender.

I can't get into my MythTV machine at the moment, so I'm going from memory.

MythTV sets the sampling frequency to 32kHz and the bit rate to something higher than the default. One or both of these will stop the audio.

You can restore sound by issuing two commands while the capture card is idle.
v4l2-ctl -c audio_sampling_frequency=1
v4l2-ctl -c audio_layer_ii_bitrate=10

This will return the card to the values used at load time and save you the whole load/unload procedure.

Through the MythTV front end you need to adjust your liveTV and recording profiles. I set them all to 48kHz and a bitrate that translates to 10 (I think it was around 224kb/s).

That's all I have for now.

Enjoy,
\Jeff/

> Thank you very much for you help. I appreciate it immensely.
>
> --Zed
Attachments: message-rfc822.eml (7.06 KB)


zedoriah at gmail

May 22, 2008, 7:21 PM

Post #10 of 10 (4683 views)
Permalink
Re: CX18 - No Audio on HVR-1600 [In reply to]

> MythTV sets the sampling frequency to 32kHz and the bit rate to something
higher than the default. One or both of these will stop the audio.

> You can restore sound by issuing two commands while the capture card is
idle.
> v4l2-ctl -c audio_sampling_frequency=1
> v4l2-ctl -c audio_layer_ii_bitrate=10
> This will return the card to the values used at load time and save you the
whole load/unload procedure.

That did reset the values to the load time, but I still do not have sound on
any subsequent capture. The "no audio" message is what I get. modprobe -r
cx18 ; modprobe cx18 and audio comes back.

> Through the MythTV front end you need to adjust your liveTV and recording
profiles. I set them all to 48kHz and a bitrate that translates to 10 (I
think it was around 224kb/s).

When I go to the recording profiles I am given no options at all. It simply
says "Profile name: " with the profile named grayed out and "Enable
auto-transcode after recording" as a check box. No other options. Odd.

> That's all I have for now.

> Enjoy,
>\Jeff/

Thanks for you help. I'll let you know if if I find a solution.

--Zed

ivtv devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.