Skip to contentSkip to conversation

How to set idle S/PDIF sample rate?

DISCUSSION Demian Martin 2 participants 2 messages Feb 29, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

I noticed another big problem in my application relating to locking the system at 48 KHz in the background. If I set SPDIF to 44.1KHz on some playback software (Xine for example) between tracks the system briefly switches back to 48 KHz. This causes an audible pop as the external DAC tries to keep up with the rate change. I have not found a way to lock the system at a different rate (44100 for example) so this doesn't happen between tracks. This behavior is common to both the ICE1724 and the VT1708 drivers.
-Demian

Date: Thu, 28 Feb 2008 16:12:10 -0500
From: Matt Whitlock <[email protected]>
Subject: Re: [alsa-devel] How to set idle S/PDIF sample rate?
To: Takashi Iwai <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Quoted 5 lines · Takashi Iwai

The driver code resets the format verb of the relevant widgets at closing streams. This verb contains the sample rate, too. Maybe keeping this would prevent the reset.

The below is a test patch. Give it a try.

Wow, fantastic. I will give this patch a try. I'll have to rebuild my kernel to disable the in-kernel ALSA code and build the ALSA module separately from the latest sources, but if this patch fixes things, that would be worth the effort. I'll get back to you. Thanks.

-Matt

#2 lore raw
Quoted 9 lines · Demian Martin

I noticed another big problem in my application relating to locking the system at 48 KHz in the background. If I set SPDIF to 44.1KHz on some playback software (Xine for example) between tracks the system briefly switches back to 48 KHz. This causes an audible pop as the external DAC tries to keep up with the rate change. I have not found a way to lock the system at a different rate (44100 for example) so this doesn't happen between tracks. This behavior is common to both the ICE1724 and the VT1708 drivers.
-Demian

I have the same problem between tracks in my audio player of choice (Amarok), though fortunately my receiver doesn't pop when it resynchronizes with the new rate, but it does tend to drop the first second or so of each track because of the rate change. Sometimes I get lucky and there isn't enough of a pause between tracks for the receiver to come unlocked from 44100 Hz, but more often than not, it does, and therefore loses the first second of the next track.