Switching Plugs according to the given input rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

After almost weeks of research and try-and-error I got my wish configured: MythTV (and other software that is using ALSA) is now switching the sample rate according to the given input samplerate. TV/DVD: 48000 Hz, mp3/CD: 44100 Hz. And thats even without some dmix-resampling, it goes straight to hardware. This I got managed because of the following asound.conf (Ubuntu 8.10, ALC880) and setting MythTV to Mixer "MyMainVol":

pcm!.default {
type plug
slave.pcm "softvol"
}

pcm.softvol {
type softvol
slave {
pcm "hw:0,0"
}
control {
name "MyMainVol"
card "0"
}

Afterwards it seems so logical, it's embarrasing it took me so long to get this straight ;-) Anyway, there is one thing that is worrying me now a little bit: How to handle a samplerate that is not supported by the hardware (in my case this would be any samplerate except for 44100 and 48000 Hz)? As testet with "speaker-test -r 32000" I can`t hear anything in such a case.

My idea to solve this is to create a new dmix-device that resamples everything except for 44100/48000Hz-material to e.g 48000 Hz. But how to get ALSA to automatically switch between "hw:0,0" (for 44100 and 48000 Hz) and "dmix" (for any other samplerate) according to the samplerate of the input stream.

I am not expecting a complete solution, but I am hoping at least for an answer if this is possible at all. Thanks in advance.

Greets!

H.Dampf
No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.0.237 / Virus Database: 270.10.23/1952 - Release Date: 02/13/09 18:29:00
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux