Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set the appropriate SampleRate for caed with an AES/BU USB Audio Card #996

Open
hoccau opened this issue Nov 29, 2024 · 1 comment
Open

Comments

@hoccau
Copy link

hoccau commented Nov 29, 2024

Hi,

I have a YellowTech PUC2 audio card, which have an AES/BU output. Rivendell was unable to plug directly to Alsa (with the RdAlsaConfig generated one), because the sample depth is 24bits (not 16 nor 32). So, I have filled /etc/asound.conf with a "plug" alsa plugin :

pcm.hw0 {
type hw
card PUC2
device 0
}
ctl.hw0 {
type hw
card PUC2
}
pcm.rd0 {
type plug
slave {
pcm hw0
}
}
ctl.rd0 {
type hw
card PUC2
}

It's working well when i test it with aplay -vD rd0 sound.wav
caed start correctly, but with an approximate sample rate :

caed: Starting ALSA Play Device rd0:
caed: Format = 32 bit little-endian
caed: SampleRate = 47999
caed: Aggregate Channels = 48
caed: Periods = 4
caed: BufferSize = 4096 frames
caed: Device started successfully
caed: Starting ALSA Capture Device rd0:
caed: Format = 32 bit little-endian
caed: SampleRate = 47998
caed: Aggregate Channels = 48
caed: Periods = 4
caed: BufferSize = 4096 frames
caed: Device started successfully

It is sometimes 48001, but never 48000 (which is well configurated in rdadmin). I am not sure to understand everything but, the samplerate is voluntarily approximated ?
With RDAirPlay i can hear 1 seconde of sound, then a big white noise.
Or there is a better way to configure caed and/or alsa for an AES/BU output with Rivendell ?

Thx in advance!

@ElvishArtisan
Copy link
Owner

Try adding an explicit rate statement to the pcm stanzas, something like:

pcm.hw0 {
type hw
card PUC2
device 0
rate 48000
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants