Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm trying to set up MythTV on my system, and I'm running into some problems getting the sound to work. I'm running Debian "Sarge" and I've installed ALSA version 1.0.5. I've been working with several versions of MythTV, including 0.15, 0.16, and now I'm running a CVS snapshot from a couple of days ago. My sound card is an old SoundBlaster Live Value card. My TV capture card is a Hauppauge WinTV Go2 card that uses the cx88 driver. I've patched the "sarge" kernel to include the latest version (0.0.4) of this driver.
When I run XawTV, I get video and sound to work fine. The MythTV troubleshooting docs say that XawTV isn't a good test because it patches the analog in to the analog out and bypasses the DSP. Instead, it suggests to start up XawTV, mute it, then use "aplay /dev/dsp" to check the "digitized" audio. Unfortunately, when I do this, I get:
Playing raw data '/dev/dsp' : Unsigned 8 bit, Rate 8000 Hz, Mono
underrun!!! (at least 10.664 ms long)
underrun!!! (at least 11.706 ms long)
underrun!!! (at least 11.763 ms long)
I think this means that /dev/dsp isn't getting the audio... I've made sure to use alsamixer to set the capture settings, line in, master volume, etc the way they said on the troubleshooting guide, although I admit I'm not 100% sure I got it right.
The security modes for /dev/dsp* and /dev/mixer* are all 777, so access shouldn't be a problem here. Also, when I do a "fuser -v /dev/dsp" I get nothing which I assume means that nobody has tied up the device.
Ok, just in case anyone is following this -- I'm sure someone is struggling with something like this -- here is an update.
I re-installed everything, again with the 2.6.7 kernel. This time I tried using alsa before I recompiled the kernel:
apt-get install alsa
which loaded alsa-base and alsa-utils, since the alsa-driver stuff is included in the kernel. Then I did alsaconf to configure things. This resulted in a mess: alsamixer couldn't find any mixers, and trying to aplay /dev/dsp resulted in "no such device" sort of errors. But sound worked, generally speaking.
So I recompiled the kernel, removing a whole bunch of stuff including the support for OSS. I didn't apply any patches to the source. I rebooted and installed alsa again. At this point I was back to the behavior I had before -- everything seemed to work fine, except when I try to work through /dev/dsp. Doing an "aplay /dev/dsp" results in buffer underruns, and trying a "cat <file> > /dev/dsp" results in no sound...
As I lay in bed last night waiting for sleep to come, I recalled that this motherboard has an on-board sound card. I normally have this disabled in BIOS, but I had an issue a few weeks ago that caused my CMOS settings to be reset. So this morning I went into the BIOS and disabled the onboard sound and re-ran alsaconf. Progress! Now I get static when I do "cat kernel-image > /dev/dsp" so at least I believe /dev/dsp (actually /dev/dsp0) is connected to the right place. But I still get buffer underruns when I try to do "aplay /dev/dsp".
So maybe I still don't have my mixer settings setup right... I'm tempted to do another complete re-install, this time with the onboard sound disabled, and see if that makes any difference.
Any other suggestions? These re-installs seem like an awefully big hammer to be using to troubleshoot this... but I don't know another way to be certain that alsa is completely "reset". Ah well, I'm learning quite a bit.
First, it's nice to finally find evidence that someone else is having the _exact_ same issue (same capture card, same audio card, same code builds -- including post 0.16 cvs). But I haven't resolved mine yet. Did you find a solution?
Well, I actually got pretty close. I have both sound systems (onboard and PCI) working, including /dev/dsp. XawTV worked fine. MythTV worked -- except for no audio!
So I tried upgrading to the CVS version of the cx88 drivers. After that, I can no longer change channels... So I'm taking a break from this project. Perhaps in the meantime some of these bugs will get fixed.
I have some notes I made on how to install a working system - or at least working as well as I could get it. If you want, I can post them. Let me know.
I don't have my notes with me (I'm at work) but try the following:
Make sure that you have some input to the card -- maybe you can unplug the "line-in" from the sound card and run it directly to a speaker.
Once you have verified that there is audio going into the "line-in", try running "aplay /dev/dsp"... but make sure you let it run for at least a second or two. I noticed at some point that even when things were working "right" I tended to get those buffer underrun errors for a second or two, then they would go away and I could hear the sound (assuming the mixer settings were right).
I'm afraid my memory is a bit fuzzy as I haven't really worked on this for several weeks, but I hope this helps. If not, I'll be travelling for the next couple of weeks but perhaps I can help out when I get back.
I've been having the same problems too. I thought it must have been something I done, but it seems not. I have a saa7134 based card, alsa 1.0.5, kernel 2.6.8, running debian unstable. If I use ffmpeg, it records fine and plays back fine. When using mythtv, records with no sound
Just posting this here so that it might help others with a similar problem...
I had a situation almost identical to the original poster's, since it involved a cx88 TV card (MSI TV@nywhere) and a Sound Blaster Live card (SBLive Gamer). The audio-out on the TV@nywhere is connected to the Line-in jack on the SBLive. I too was getting the long list of underrun errors from "aplay /dev/dsp" and had no sound in any of my MythTV recordings, though I had the added symptom of having the TV sounds playing constantly (though quietly) in the background. Even more frustrating was that if I opened Myth, I could hear audio, but it was a few seconds out of sync with the video while watching Live TV. So it seemed I was close to getting the correct setup, but still hadn't quite managed it.
As far as I can tell, the surprisingly simple solution was this: I opened alsamixer from the command line, then I muted the "Line" control and set it as the capture source (highlight "Line", then press 'm', then space bar). Next, I set the "Capture" control as the recording destination (press space while on "Capture") and increased it to 100. Finally, I set the "AC97" control to zero, but (very important!) set the adjacent "AC97 Capture" control to 100. Without the AC97 Capture control set to some non-zero value, no sound came through in Myth whatsoever. Once that's done, you'll still have to play with the various levels in order to get a satisfactory sound out of your setup, but you should at least be out of the woods.
Now, I still get the underrun errors with "aplay /dev/dsp", but the TV sound comes through just fine, and my Myth recordings finally have sound too. I don't think this will fix every problem mentioned in this thread, but certainly the issues involving the SBLive series (or other AC97 compatible sound cards) should be resolved.
Btw, I'm running Gentoo, kernel 2.6.9, alsa 1.0.6, cx88 0.0.4, and MythTV 0.16. Getting Myth running on this box took a week of off-and-on hacking, but it's finally done.