 |
|
 |
Posted: Wed Oct 18, 2006 8:32 am |
|
|
nybbler |
|
|
|
Joined: 06 Jul 2006 |
Posts: 125 |
|
|
|
 |
 |
 |
|
There is a bug and a race condition in the drivers which cause your analog sound problems. I have fixes/workarounds for them.
Bug 1: In cx88-tvaudio
Code: |
#ifndef CONFIG_VIDEO_CX88_ALSA
/* restart dma; This avoids buzz in NICAM and is good in others */
cx88_stop_audio_dma(core);
#endif
cx_write(AUD_RATE_THRES_DMD, 0x000000C0);
#ifndef CONFIG_VIDEO_CX88_ALSA
cx88_start_audio_dma(core);
#endif
|
Despite the fact that the DMA lines appear to be #ifdef'ed out, they actually aren't. So just comment them out (just the dma lines, not the cx_write)
Race condition workaround, in cx88-alsa.c:
In snd_cx88_pointer, add this as the second line of the function:
Code: |
struct cx88_core *core=chip->core;
|
And add this right before the return statement:
Code: |
cx_set(MO_PCI_INTMSK,0x02);
|
This doesn't really fix the problem, which is some sort of race condition when switching from digital to analog, causing spurious interrupts. But it does fix the symptoms. |
|
|
|
|
 |
 |
|
 |
Posted: Thu Oct 26, 2006 9:16 am |
|
|
mhitchens |
|
|
|
Joined: 23 Oct 2006 |
Posts: 8 |
|
|
|
 |
 |
 |
|
cfr131 wrote: | I have the analog sound working, but the quality is very bad. It sounds like a 56kbs MP3, with lots of compression artificts. I don't know where to look to see why there is compresion occuring.
|
Not sure if you've solved this one yet, but I had a similar issue. It ended up being that the default sampling rate for live TV in MythTV was 32000, and not 48000. Changing made it clear as day.
To get there, it's in Recording Profiles -> Software Encoders -> LiveTV, then just set up the encoding options, audio is on the second page.
Hope that fixes it for you! |
|
|
|
|
 |
 |
|
 |
Posted: Thu Oct 26, 2006 9:20 am |
|
|
mhitchens |
|
|
|
Joined: 23 Oct 2006 |
Posts: 8 |
|
|
|
 |
 |
 |
|
nybbler wrote: | There is a bug and a race condition in the drivers which cause your analog sound problems. I have fixes/workarounds for them.
This doesn't really fix the problem, which is some sort of race condition when switching from digital to analog, causing spurious interrupts. But it does fix the symptoms. |
If you get the chance, could you go into a little extra detail regarding this issue? I'm currently seeing the symptom of losing analog audio after a Digital -> Analog switch and sometimes during Analog channel changes. I had assumed that it was MythTV's fault for racing the tuner change. Are you saying that it's actually a driver issue?
If these changes make the symptom go away I'll be pretty excited. It's the last real dealbreaker going on in my setup! |
|
|
|
|
 |
 |
|
 |
Posted: Thu Oct 26, 2006 1:24 pm |
|
|
nybbler |
|
|
|
Joined: 06 Jul 2006 |
Posts: 125 |
|
|
|
 |
 |
 |
|
There are two different issues. One issue is that during a channel change, the cx88 driver stops and starts the audio DMA on the card, to avoid an audible buzz when using the NICAM standard. This ends up putting the wrong value in the audio DMA control register thereby killing ALSA audio.
There are #ifdefs in the driver which are intended to prevent this, but they don't work if you compile as modules (which is the normal case). My patch simply comments the offending code out.
The other issue is that during a switch from digital to analog or a channel change, the card sometimes just spews audio interrupts. The driver has code intended to prevent the system from locking up in this case, and that code shuts off the audio interrupt. This causes broken-up audio because audio interrupts then only get serviced when some other card interrupt occurs. I don't have a fix for the condition which causes the interrupts to spew, but I do have a workaround. The workaround re-enables the audio interrupt each time ALSA asks for new audio.
I have patches for both conditions:
http://www.speakeasy.net/~russotto/cx88-irq-loss-workaround.diff
http://www.speakeasy.net/~russotto/nodmarestart.diff |
|
|
|
|
 |
 |
|
 |
Posted: Thu Oct 26, 2006 10:31 pm |
|
|
mhitchens |
|
|
|
Joined: 23 Oct 2006 |
Posts: 8 |
|
|
|
 |
 |
 |
|
nybbler wrote: | There are two different issues.
...
I have patches for both conditions: |
Nybbler, if you're around the Houston area, I'd like to buy you a beer. Your patches worked magnificently! I can now seamlessly change between digital and analog, and change channels from one analog station to another and not worry about losing audio. I also threw in the infamous dvb_shutdown_timeout=0 to kill another little crash.
I'm SO CLOSE to turning off the TiVo. I've got HD playing back without XvMC, audio playback and passthrough over SPDIF, TV out, and soon to be DVI out (when I pick up my new TV next week). The last things I have to sort out are; getting a remote going (I've seen some of your other patches dealing with the IR receiver port, I may play with that) and figuring out how to scale the analog channels so I can't see the vertical blanking interval, while leaving the digital and HD stations uncropped. You wouldn't happen to have any advice for me there, would you? |
|
|
|
|
 |
 |
|
 |
Posted: Fri Oct 27, 2006 10:36 am |
|
|
animefreak3 |
|
|
|
Joined: 14 Jul 2006 |
Posts: 41 |
|
|
|
 |
 |
 |
|
|
|
|
|
 |
MythTV and not using the loopback audio cable |
 |
Posted: Sun Nov 26, 2006 12:47 pm |
|
|
eneilsen |
|
|
|
Joined: 21 Nov 2006 |
Posts: 3 |
|
|
|
 |
 |
 |
|
Has anyone confirmed that everything works using the 5500 and w/o using the audio cable and MythTV. Can you record, change channels, etc without any problems? |
|
|
|
|
 |
Worked! |
 |
Posted: Tue Dec 05, 2006 8:34 pm |
|
|
ErikSev |
|
|
|
Joined: 03 Dec 2006 |
Posts: 1 |
|
|
|
 |
 |
 |
|
nybbler - I also owe you a beer. Any chance you're in chicagoland?
That seemed to work for me - thanks! |
|
|
|
|
 |
not broken for recorded tv |
 |
Posted: Wed Jan 03, 2007 10:20 pm |
|
|
stel |
|
|
|
Joined: 03 Jan 2007 |
Posts: 1 |
|
|
|
 |
 |
 |
|
hey i'm in chicago!
anyway looks like it's only broken for livetv channel changes and since i don't care about livetv basically at all i'm going to leave it alone. does anybody know if this is fixed in upcoming versions? i'm on kernel 2.6.17. |
|
|
|
|
 |
 |
|
 |
Posted: Thu Jan 11, 2007 12:49 pm |
|
|
tomf |
|
|
|
Joined: 11 Jan 2007 |
Posts: 2 |
Location: Falls Church, VA |
|
|
 |
 |
 |
|
I just picked up the 5500, and so far have only tried analog cable tuning. I am using tvtime for tv viewing and the cx88-alsa driver for audio reception. with tvtime it seems i cannot set the audio device to read from (hw:1,0 in my case).
I tried with sox.. something like "sox -c 2 -t alsa hw:1,0 -t alsa hw:default" which produces sound, but its all screwed up. the pitch sounds right, but it is very choppy as if the audio stream is shutting off and on at a high frequency. changing the sample rate didn't seem to do anything.
Using the "arecord -f dat -D hw:1,0 | aplay" method worked in that the sound quality was great, but as noted in the Saa7134 post linked above, this method introduces an audio delay which seems to vary but is generally unwatchable.
any suggestions on what I might be doing wrong with sox or a better method for getting audio from one card to another?
I cannot use the external audio cable because I am sending all audio data to my receiver via a spdif output and I cannot seem to digitize analog audio inputs. |
|
|
|
|
 |
 |
|
 |
Posted: Sat Jan 13, 2007 11:40 am |
|
|
Malibyte |
|
|
|
Joined: 28 Aug 2006 |
Posts: 46 |
Location: Simi Valley, CA, USA |
|
|
 |
 |
 |
|
pcHDTV_tech wrote: | Actually, since this was brought up pcHDTV has begun shipping the HD5500 with the digital sound enabled. cx88-alsa is the driver you would want. For those few who got a card prior to this change (/sbin/lspci will tell you if you have an [Audio Port] device on your card or not) You can contact pcHDTV and they will swap your card for one with the change. Thanks to xyzzy for pushing the issue a little harder here. |
[root@vader: /home/rcs]$ lspci | grep udio
00:09.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)
00:09.1 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] (rev 05) <<-----------
00:09.2 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05)
00:09.4 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [IR Port] (rev 05)
00:0a.0 Multimedia audio controller: Creative Labs SB Audigy (rev 04)
Tech:
I assume this means I have the newer card, with the change made?
Thanks
Bob |
|
_________________ "Software is like sex. It's better when it's free." - Linus Torvalds |
|
|
|
 |
 |
|
 |
Posted: Sat Jan 13, 2007 6:19 pm |
|
|
pcHDTV_tech |
|
|
|
Joined: 16 Dec 2004 |
Posts: 295 |
|
|
|
 |
 |
 |
|
You assumed correctly. BTW - there is an 1/8th in jack on the card under the breakout cable connector that is the "audio-in" for s-video. That input should automatically be routed back to the audio out on the breakout cable.
HTH,
Rusty |
|
|
|
|
 |
Patches committed? |
 |
Posted: Sun Jan 21, 2007 3:20 pm |
|
|
mik |
|
|
|
Joined: 31 Dec 2006 |
Posts: 16 |
|
|
|
 |
 |
 |
|
Thanks from another for these patches. Question: Have these (or others) been committed to the driver codebase? They would seem to be needed... |
|
|
|
|
 |
Re: Patches committed? |
 |
Posted: Mon Apr 09, 2007 12:25 am |
|
|
Malibyte |
|
|
|
Joined: 28 Aug 2006 |
Posts: 46 |
Location: Simi Valley, CA, USA |
|
|
 |
 |
 |
|
mik wrote: |
Thanks from another for these patches. Question: Have these (or others) been committed to the driver codebase? They would seem to be needed... |
Nybbler -
Thanks also from me for these patches. I put a new motherboard in my Myth box, and I started having all of these problems with analog audio, which I didn't have on the old mobo. These patches fixed the analog audio issue on both 5500 cards. Now, I just need to get my STB's audio to work with one of them. When I pipe it into 5500 Card 0, and then from there to Line In on the mobo's sound card, I don't get any audio at all. Bah.
BTW, I'm also wondering if the fixes have been made in the driver codebase. |
|
_________________ "Software is like sex. It's better when it's free." - Linus Torvalds |
|
|
|
 |
 |
|
 |
Posted: Mon Apr 23, 2007 8:40 am |
|
|
Staudie |
|
|
|
Joined: 19 Apr 2007 |
Posts: 1 |
|
|
|
 |
 |
 |
|
Nybbler
I tried to patch the pcHDTV driver over the weekend and the nodmarestart patch failed. For now Im using the stock cx88-dvb driver in Ubuntu 7.04 (2.6.20), When I change chanels from digital to analog Myth will crash/restart or I get snow for a few second and it will go into crackle audio. Would the irq loss patch only fix this or would it be better to stick with the stock kernal driver? Unless you have an idea why I get the file not found error?
Thanks,
Staudie |
|
|
|
|
pcHDTV Forum Index -> Installation/Setup
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT - 7 Hours
Page 2 of 3
Goto page Previous 1, 2, 3 Next
|
|
|
|