Skip to contentSkip to conversation

HDSP 9652 sync problems cause loud noise in Alsa 0.9.6

DISCUSSION Mark Knecht 5 participants 8 messages Oct 6, 2003 – Oct 8, 2003

lore
Share & tools
lore
#0 lore raw

Hi,
I have a pretty frustrating problem with my Alsa setup. Right now I'm
just looking for guidance about what's messed up and how I might get it fixed. I'm not sure if it's a driver issue, an Alsa issue, or a hardware issue. I have not yet found anyone else that has this exact set of problems, but no one uses the same hardware either.

At the outset, let me say that the machine is dual boot and the
problem does not occur in Windows.

MY SYSTEM - HDSP 9652, Gentoo-2.4.20-r7, Alsa 0.9.6 patched with Thomas's HDSP patches from 8/27. ADAT1 out goes to an Alesis AI-3 D/A.

PROBLEM STATEMENT- When playing mp3's using mpg123 I get a horrible, loud and ugly high pitched static noise just before the audio starts to play. It lasts about 1 second. I have also noticed that using hdspconf to change the sample clock rate to 48K from 44.1K causes the same horrible noise, but usually for a shorter period of time.

One thing I've noticed by watching hdspconf is that when I start
playing the mp3 that hdspconf first says it loses sync, then goes to a lock condition, and then goes back to a sync condition when the noise stops. Also the sample frequency changes first to 32KHz and then back to 44.1K and then becomes synced again. This happens while the noise is occurring.

My speakers and headphones are driven from an AI-3 converter hooked
to to the ADAT1 port of the HDSP 9652. The AI-3 is ADAT, based but runs at 48K unless it receives a input clock of a different frequency. The 9652 is set up to generate 44.1K as the master device, and the AI-3 seems to track it except when this noise occurs.

One last thing. If I set my HDSP 9652 to 48KHz and attempt to play
and mp3, then the noise occurs, the frequency drops first to 32K And then goes to 44.1K. The mp3 plays, but the card is left at 44.1K And never goes back to 48K. Does this sound correct?

I've tried all sorts of different clocking schemes but none of them
seem to solve this problem.

I'm hoping that someone in the Alsa-Dev group will know something
about this and how I might fix it. If you want more technical data or have some test you think I should try please let me know.

Thanks in advance,
Mark

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#1 lore raw

I think this problem is related to what I mailed about a week ago (no reply). An HDSP master/slave sync problem in current CVS. Thus you are not alone with this type of problem.

Quoted 50 lines · Mark Knecht

Hi,
I have a pretty frustrating problem with my Alsa setup. Right now
I'm just looking for guidance about what's messed up and how I might get it fixed. I'm not sure if it's a driver issue, an Alsa issue, or a hardware issue. I have not yet found anyone else that has this exact set of problems, but no one uses the same hardware either.

At the outset, let me say that the machine is dual boot and the
problem does not occur in Windows.

MY SYSTEM - HDSP 9652, Gentoo-2.4.20-r7, Alsa 0.9.6 patched with Thomas's HDSP patches from 8/27. ADAT1 out goes to an Alesis AI-3 D/A.

PROBLEM STATEMENT- When playing mp3's using mpg123 I get a horrible, loud and ugly high pitched static noise just before the audio starts to play. It lasts about 1 second. I have also noticed that using hdspconf to change the sample clock rate to 48K from 44.1K causes the same horrible noise, but usually for a shorter period of time.

One thing I've noticed by watching hdspconf is that when I start
playing the mp3 that hdspconf first says it loses sync, then goes to a lock condition, and then goes back to a sync condition when the noise stops. Also the sample frequency changes first to 32KHz and then back to 44.1K and then becomes synced again. This happens while the noise is occurring.

My speakers and headphones are driven from an AI-3 converter
hooked to to the ADAT1 port of the HDSP 9652. The AI-3 is ADAT, based but runs at 48K unless it receives a input clock of a different frequency. The 9652 is set up to generate 44.1K as the master device, and the AI-3 seems to track it except when this noise occurs.

One last thing. If I set my HDSP 9652 to 48KHz and attempt to play
and mp3, then the noise occurs, the frequency drops first to 32K And then goes to 44.1K. The mp3 plays, but the card is left at 44.1K And never goes back to 48K. Does this sound correct?

I've tried all sorts of different clocking schemes but none of
them seem to solve this problem.

I'm hoping that someone in the Alsa-Dev group will know something
about this and how I might fix it. If you want more technical data or have some test you think I should try please let me know.

Thanks in advance,
Mark

Quoted 8 lines

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#2 lore raw
Quoted 3 lines · Anders Torger

I think this problem is related to what I mailed about a week ago (no reply). An HDSP master/slave sync problem in current CVS. Thus you are not alone with this type of problem.

Anders,
Hi. I went back and looked at your post. Sorry I didn't have anything
to offer when you wrote it. Possibly the problems are related. I'm not sure. I'm not on the latest CVS, so I wasn't at all sure that you were speaking of anything other than the latest CVS.

I agree that they may be related. Possibly my noise only happens
continuously when trying to sync to an external 48K source, and possibly this is just a sign of it never syncing. When I set the Pref. Sync. Ref. to ADAT1 and use AutoSync I get the noise continuously and the Sync indicator just goes back and forth between lock and no lock. It never gets to sync which I presume it should.

So, Alsa developers, what's this about?

Thanks,
Mark

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#3 lore raw
Quoted 8 lines

I agree that they may be related. Possibly my noise only happens
continuously when trying to sync to an external 48K source, and possibly this is just a sign of it never syncing. When I set the Pref. Sync. Ref. to ADAT1 and use AutoSync I get the noise continuously and the Sync indicator just goes back and forth between lock and no lock. It never gets to sync which I presume it should.

So, Alsa developers, what's this about?

does the input to ADAT1 contain a valid clock signal? the symptoms you have basically say that it doesn't.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#4 lore raw
Quoted 11 lines · Paul Davis
Quoted 8 lines

I agree that they may be related. Possibly my noise only happens
continuously when trying to sync to an external 48K source, and possibly this is just a sign of it never syncing. When I set the Pref. Sync. Ref. to ADAT1 and use AutoSync I get the noise continuously and the Sync indicator just goes back and forth between lock and no lock. It never gets to sync which I presume it should.

So, Alsa developers, what's this about?

does the input to ADAT1 contain a valid clock signal? the symptoms you have basically say that it doesn't.

I agree. It does sound that way, but read the thread please. In my machine's case I am dual boot and in my description I said this does not happen under Windows.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#5 lore raw
Quoted 8 lines · Paul Davis
Quoted 7 lines
Quoted 7 lines

I agree that they may be related. Possibly my noise only happens
continuously when trying to sync to an external 48K source, and possibly this is just a sign of it never syncing. When I set the Pref. Sync. Ref. to ADAT1 and use AutoSync I get the noise continuously and the Sync indicator just goes back and forth between lock and no lock. It never gets to sync which I presume it should.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

So, Alsa developers, what's this about?

does the input to ADAT1 contain a valid clock signal? the symptoms you have basically say that it doesn't.

I agree. It does sound that way, but read the thread please. In my machine's case I am dual boot and in my description I said this does not happen under Windows.

that would suggest that the driver is not setting the clock source correctly. sync/lock/nolock is done by the h/w, and if the same config works under windows, my guess it that the hardware has not been setup under linux the way it is claimed to be.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#6 lore raw
Quoted 10 lines
Quoted 4 lines

I agree. It does sound that way, but read the thread please. In my machine's case I am dual boot and in my description I said this does not happen under Windows.

that would suggest that the driver is not setting the clock source correctly. sync/lock/nolock is done by the h/w, and if the same config works under windows, my guess it that the hardware has not been setup under linux the way it is claimed to be.

Well, I agree, in the sense that we seem to be stating the obvious.

To the question at hand, how do we solve the problem and get the driver to set the card up correctly?

Have I not set something up correctly? Is there something I can correct in my Alsa setup that will fix this?

Or has the driver not correctly comprehended something about the HDSP 9652?

What is strange in my case is that the frequency is actually correct BEFORE I start playing an mp3, for instance, and then when the mp3 starts playing the frequency is set incorrectly for a short time, apparently causing the noise, but it is eventually set back to the right frequency after a while. In this case the frequency seems to get changed through other settings before it comes to rest at the right frequency.

In the case of syncing to my 48K AI-3 source it never works, while it will sync to other ADAT inputs, albeit they are typically at 44.1K.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#7 lore raw

At Tue, 7 Oct 2003 08:26:47 -0700,

Quoted 28 lines · Mark Knecht
Quoted 11 lines
Quoted 5 lines

I agree. It does sound that way, but read the thread please. In my machine's case I am dual boot and in my description I said this does not happen under Windows.

that would suggest that the driver is not setting the clock source correctly. sync/lock/nolock is done by the h/w, and if the same config works under windows, my guess it that the hardware has not been setup under linux the way it is claimed to be.

Well, I agree, in the sense that we seem to be stating the obvious.

To the question at hand, how do we solve the problem and get the driver to set the card up correctly?

Have I not set something up correctly? Is there something I can correct in my Alsa setup that will fix this?

Or has the driver not correctly comprehended something about the HDSP 9652?

What is strange in my case is that the frequency is actually correct BEFORE I start playing an mp3, for instance, and then when the mp3 starts playing the frequency is set incorrectly for a short time, apparently causing the noise, but it is eventually set back to the right frequency after a while. In this case the frequency seems to get changed through other settings before it comes to rest at the right frequency.

Quoted 2 lines

In the case of syncing to my 48K AI-3 source it never works, while it will sync to other ADAT inputs, albeit they are typically at 44.1K.

it would be helpful if you show the contents of hdsp proc file before and after playback (or at each action). if Paul's guess is right, the register values should be inconsistent.

now i'm looking at hdsp.c, and found that the system clock is changed only when you do hw_params call explicitly, even if you set the sample clock source as autosync. (that's why it shows "master" as "system clock mode" in Anders' last post. if the current system rate and the external rate are different, it shows as if "master".)

maybe we need to reset the system rate immediately when the sample source is set to autosync.

well, i'm not an HDSP owner, so just a guess...

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php