Skip to contentSkip to conversation

Occasional metallic sound when recording (cs46xx)

DISCUSSION Eloy A. Paris 9 participants 15 messages Oct 22, 2003 – Nov 23, 2003 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello,

I am trying to troubleshoot a very annoying problem I have with a Santa Cruz Turtle Beach (cs46xx). Sometimes, when recording, the recorded sound is very metallic. If when I get the metallic sound I run alsamixer and toggle the capture facility of the ADC on and off, sound is fixed and back to normal.

This problem happens randomly but is very annoying, specially if I program my PVR (MythTV) to automatically record a show - the show can get recorded with metallic sound, which makes it very hard to understand during playback.

This is not MythTV-specific since I have been able to reproduce the problem using other applications, like the Gnome sound recorder. It is unrelated to full-duplex operation since when recording a show MythTV doesn't open /dev/dsp for writing.

I really have no idea about how to troubleshoot this. I don't think the problem is hardware, but is driver-related instead.

Any suggestions? Are there any debug switches I can enable to get more information about the problem? I can recompile the drivers and try anything. I really want to see this fixed, so if anyone has any ideas to try just let me know.

Thanks,

Eloy.-

-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations Here's your chance to show off your extensive product knowledge We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54

#1 lore raw
Quoted 5 lines

This problem happens randomly but is very annoying, specially if I program my PVR (MythTV) to automatically record a show - the show can get recorded with metallic sound, which makes it very hard to understand during playback.

Quoted 7 lines

This is not MythTV-specific since I have been able to reproduce the problem using other applications, like the Gnome sound recorder. It is unrelated to full-duplex operation since when recording a show MythTV doesn't open /dev/dsp for writing.

I really have no idea about how to troubleshoot this. I don't think the problem is hardware, but is driver-related instead.

its almost certainly a software problem in mythTV and gnome sound recorder. i've written code that does this several times - every time it takes me ages to figure out why, and then i can never remember when i do it the next time. its related to off-by-1 errors in processing incoming audio.

not necessarily, of course, just a point of view.

-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations Here's your chance to show off your extensive product knowledge We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54

#2 lore raw

Hello,

Quoted 7 lines · Paul Davis

its almost certainly a software problem in mythTV and gnome sound recorder. i've written code that does this several times - every time it takes me ages to figure out why, and then i can never remember when i do it the next time. its related to off-by-1 errors in processing incoming audio.

not necessarily, of course, just a point of view.

Hhhmmmm, but wouldn't a problem like this cause the metallic sound everytime? In my case it works fine must of the time, but every now and then I get the darn metallic noise. Also, I can fix it by running the alsamixer and toggling on and off the capture setting of the ADC channel.

I forgot to mention that when I am hearing the metallic sound, if I increase the volume of the "line in" channel in the mixer, I hear the audio from the TV tuner just fine (this is the bypass, from line-in directly to the speakers). This confirms that the input signal is fine, I think.

What I'll try next is to connect the audio output from the TV tuner card to my sound card's microphone input, instead of the line-in input just to see if there are any differences, although I doubt it.

Other suggestions?

Thanks,

Eloy.-

-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/

#3 lore raw
In reply to Paul Davis
Quoted 14 lines · Paul Davis
Quoted 5 lines

This problem happens randomly but is very annoying, specially if I program my PVR (MythTV) to automatically record a show - the show can get recorded with metallic sound, which makes it very hard to understand during playback.

Quoted 7 lines

This is not MythTV-specific since I have been able to reproduce the problem using other applications, like the Gnome sound recorder. It is unrelated to full-duplex operation since when recording a show MythTV doesn't open /dev/dsp for writing.

I really have no idea about how to troubleshoot this. I don't think the problem is hardware, but is driver-related instead.

Quoted 5 lines

its almost certainly a software problem in mythTV and gnome sound recorder. i've written code that does this several times - every time it takes me ages to figure out why, and then i can never remember when i do it the next time. its related to off-by-1 errors in processing incoming audio.

i also have the same problem with speakfreely with my cs46xx. it does not look like the metallic sound is triggered by any specific event (load, I/O,...). out of the sudden somethings goes wrong. i think i also experienced it with the kde sound recorder. but i have not updated the alsa driver for a while (still 0.9.5 or so). toggleing the ADC sounds like a good idea. i have not tried that yet but reloading the modules works too.

Quoted 2 lines

not necessarily, of course, just a point of view.

hmm, what makes something sound metallic anyway? echo?

bye,
wilfried

-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/

#4 lore raw

Hello,

Quoted 1 line · Wilfried Weissmann

i also have the same problem with speakfreely with my cs46xx.

I'm sorry for you but am happy at the same time that I am not the only one experiencing this.

Quoted 2 lines

it does not look like the metallic sound is triggered by any specific event (load, I/O,...). out of the sudden somethings goes wrong.

Yes, I agree, doesn't seem related to anything in particular.

Quoted 2 lines

also experienced it with the kde sound recorder. but i have not updated the alsa driver for a while (still 0.9.5 or so).

I am running version 0.9.8 of the alsa-driver, and the problem is still there.

Quoted 2 lines

toggleing the ADC sounds like a good idea. i have not tried that yet but reloading the modules works too.

Well, try doing the ADC thing and let me know if it works for you. This has the advantage that you don't have to shut down the application you are using.

Quoted 1 line

hmm, what makes something sound metallic anyway? echo?

Good question, I wish I knew. I guess I'll try enabling debugging output in the cs46xx driver. I am particulary interested in knowing what happens when you toggle capture of the ADC channel in alsamixer.

Cheers,

Eloy.-

-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/

#5 lore raw

I have the same problem with my Turtle Beach Santa Cruz card (cs46xx). I haven't used the capture device yet, but the metallic sound happens in playback, also randomly. For example, in gaim, incoming IM sounds will be normal, and then all of a sudden, switch to that metallic sound (the source sound file is the same, but the playback is extremely different). It seems to be a problem that is triggered only when opening the device, because it happens in XMMS as well, when playing a song file -- if this anomaly is triggered when the song is started, it remains throughout he entire song, unless stopped and restarted, or going to the next track.

I hope this helps someone understand the problem, but I'm afraid I can't tell what is the actual trigger for it.

-Joe

Quoted 38 lines · Eloy A. Paris

Hello,

Quoted 1 line · Wilfried Weissmann

i also have the same problem with speakfreely with my cs46xx.

I'm sorry for you but am happy at the same time that I am not the only one experiencing this.

Quoted 2 lines

it does not look like the metallic sound is triggered by any specific event (load, I/O,...). out of the sudden somethings goes wrong.

Yes, I agree, doesn't seem related to anything in particular.

Quoted 2 lines

also experienced it with the kde sound recorder. but i have not updated the alsa driver for a while (still 0.9.5 or so).

I am running version 0.9.8 of the alsa-driver, and the problem is still there.

Quoted 2 lines

toggleing the ADC sounds like a good idea. i have not tried that yet but reloading the modules works too.

Well, try doing the ADC thing and let me know if it works for you. This has the advantage that you don't have to shut down the application you are using.

Quoted 1 line

hmm, what makes something sound metallic anyway? echo?

Good question, I wish I knew. I guess I'll try enabling debugging output in the cs46xx driver. I am particulary interested in knowing what happens when you toggle capture of the ADC channel in alsamixer.

Cheers,

Eloy.-

Quoted 9 lines

-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/

#15 lore raw
In reply to Eloy A. Paris
Quoted 8 lines · Eloy A. Paris

Hello,

I am trying to troubleshoot a very annoying problem I have with a Santa Cruz Turtle Beach (cs46xx). Sometimes, when recording, the recorded sound is very metallic. If when I get the metallic sound I run alsamixer and toggle the capture facility of the ADC on and off, sound is fixed and back to normal.

My personal experience (not with ALSA, but other things) is that you can get a horrid metallic sound when a signal is mixed with itself with a small (a few samples) delay. So, this could be some sort of out by one error causing the signal to get mixed with a delayed version of itself.

The other option that occurs to me is that perhaps there is a routing problem with the signals - ie... an audio output is being "monitored" and mixed back into the input. I have found it very easy to do this with some applications with the ALSA drivers - they unintentionally produce an output which gets mixed back into the input. The solution is to mute all the stuff you don't want using alsamixer.

A good thing to try would be to set up GnomeMeeting on your alsa card. It has a test mode that makes it easy to tell if you are getting an unintentional loopback.

Hope this helps,
Ray

-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/

#6 lore raw
In reply to Eloy A. Paris

Hello,

Quoted 5 lines
Quoted 1 line

hmm, what makes something sound metallic anyway? echo?

Good question, I wish I knew. I guess I'll try enabling debugging output in the cs46xx driver. I am particulary interested in knowing what happens when you toggle capture of the ADC channel in alsamixer.

It could be a stereo demultiplexer problem. I had such kind of problems on the Aureal driver while reverse engineering the Audio routing. If you mess the order of the samples, you can end up with the MSB in place of the LSB on such things, one piece of one channel swapped into the other... very weird things, and interesting special effects :D.

I would suggest trying with other formats, say 8 bit mono, since if the problem appears in such a format, where byte stream misalignment doesn't care (one frame = one byte), then maybe the problem is related to somewhat else, like DAC Antialiasing filter being setup wrong, or left unprogrammed.

Once you have the pattern, of which formats are affected and which don't its much easier to figure out where the problem lies.

Best Regards

-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/

#7 lore raw
In reply to Eloy A. Paris

At Thu, 23 Oct 2003 15:01:50 -0400,

Quoted 9 lines · Eloy A. Paris

Hello,

Quoted 1 line · Wilfried Weissmann

i also have the same problem with speakfreely with my cs46xx.

I'm sorry for you but am happy at the same time that I am not the only one experiencing this.

then it sounds like the specific problem for cs46xx driver. i guess some drift occured during the sample rate conversion or so. please check whether the same symptom happens on 48000Hz ?

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/

#8 lore raw

Hi Takashi,

This is from a thread about two weeks old. Didn't respond before because was trying the suggestion you provided (see below.)

Quoted 1 line · Takashi Iwai

then it sounds like the specific problem for cs46xx driver.

That's a possibility, although I don't have another card to test the theory.

Quoted 2 lines

i guess some drift occured during the sample rate conversion or so. please check whether the same symptom happens on 48000Hz ?

I set the sample rate to 48 KHz, and while the problem still happens sporadically it happens a *lot* less than when the rate was 32 KHz.

Does this offer any clues? Do you have any debugging suggestions to try to pinpoint the problem, like printk's in some places, etc.?

Cheers,

Eloy.-

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/

#9 lore raw
Quoted 8 lines · On Wed, 05 Nov 2003 10:08:33 -0500 [email protected] (Eloy A. Paris) wrote:

Hi Takashi,

This is from a thread about two weeks old. Didn't respond before because was trying the suggestion you provided (see below.)

Quoted 1 line · Takashi Iwai

then it sounds like the specific problem for cs46xx driver.

i don't know if i answered back then but i have the same problem with my terratec dmx xfire 1024 [cs46xx]. Occasionally the sound is metallic and distorted and a bit quiter than normal. Turning the Capture on the ADC device Off and On again usualy remedies the situation.

If it is any help i can try making a recording of the sound..

FLorian Schmidt

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/

#11 lore raw
In reply to a message not in the archive

At Thu, 06 Nov 2003 23:11:21 +0100,

Quoted 15 lines · Benny Sjostrand
Quoted 9 lines

then it sounds like the specific problem for cs46xx driver. i guess some drift occured during the sample rate conversion or so. please check whether the same symptom happens on 48000Hz ?

Sorry that I've been lost from the list from a long time ...

Your right this sympton may be specific for the cs46xx, I've been experiencing this sympton with JACK and Ardour several times.

Quoted 7 lines

The sample rate should not matter.
My guess is that internal buffers occasionally get unsynchronized inside the DSP,
may happen on playback too.

The only I've found to get around the problem when it happens is to restart the playback or capturing process.

does changing ADC volume (or so, sorry, i forgot the detail) fix? IIRC, one post mentioned that.

anyway, it'd be helpful for debugging if someone can reproduce this certainly under a fixed condition...

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/

#12 lore raw

Hi Takashi,

Quoted 8 lines · Takashi Iwai
Quoted 8 lines

Your right this sympton may be specific for the cs46xx, I've been experiencing this sympton with JACK and Ardour several times.

The sample rate should not matter. My guess is that internal buffers occasionally get unsynchronized inside the DSP, may happen on playback too.

Quoted 5 lines
Quoted 2 lines

The only I've found to get around the problem when it happens is to restart the playback or capturing process.

does changing ADC volume (or so, sorry, i forgot the detail) fix? IIRC, one post mentioned that.

Yes, when you start recording and get the darn metallic noise, if you run alsamixer and toggle off and back on the capturing facility of the ADC (hitting the space bar twice), sound comes back without the metallic noise. There is no need to restart the playback or capturing process, at least that's what I've found. Of course, this is less than ideal since most of the times I am not around when my MythTV PVR starts to record a show :-)

Quoted 2 lines

anyway, it'd be helpful for debugging if someone can reproduce this certainly under a fixed condition...

Well, about 3 times out of 7 I get the problem, so it's not hard to reproduce at all. What I'd have to know is where to place the debugging printk()'s or something like that :(

Cheers,

Eloy.-

-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/

#13 lore raw
Quoted 6 lines
Quoted 2 lines

anyway, it'd be helpful for debugging if someone can reproduce this certainly under a fixed condition...

Well, about 3 times out of 7 I get the problem, so it's not hard to reproduce at all. What I'd have to know is where to place the debugging printk()'s or something like that :(

just wanted to mention that i mis-remembered the situation under which this used to happen with the rme9652 driver. it was an error in the *driver*, not the application, and it was related to the logic for figuring out the hardware buffer pointer being incorrect. i forget the error, and its probably something a bit different anyway (because of the ASIO-style design of the rme9652), but i just wanted to mention it in case it provides any help.

once i fixed the driver to get this right, i could never (and have never) heard the problem again.

--p

-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/

#14 lore raw
In reply to Takashi Iwai
Quoted 10 lines · Takashi Iwai

At Thu, 23 Oct 2003 15:01:50 -0400,

Quoted 7 lines · Eloy A. Paris

Hello,

Quoted 1 line · Wilfried Weissmann

i also have the same problem with speakfreely with my cs46xx.

I'm sorry for you but am happy at the same time that I am not the only one experiencing this.

You are not alone. It happens on my CS46xx as well (Hercules GameTheaterXP7.1).

Quoted 1 line

then it sounds like the specific problem for cs46xx driver.

Sounds like it.

Chris

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/