Re: The rate parameter in asound.conf

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

 



On Thursday, 08 May 2014 08:52:55 you wrote:
> Jeffrey Barish wrote:
> > Playing raw data '/dev/zero' : Signed 16 bit Little Endian, Rate 88200 Hz,
> > Stereo Warning: rate is not accurate (requested = 88200Hz, got = 96000Hz)> 
> >          please, try the plug plugin
> > 
> > Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
> > 
> > When I try the command with plughw, I get
> > 
> > aplay -D plughw:0 -t raw -f dat -r 88200 -d 3 -v /dev/zero
> > Playing raw data '/dev/zero' : Signed 16 bit Little Endian, Rate 88200 Hz,
> > Stereo Plug PCM: Rate conversion PCM (96000, sformat=S16_LE)
> > Converter: linear-interpolation
> > Slave: Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
> > 
> > If I have this right, when I use plughw, ALSA is performing the sample
> > rate
> > conversion;
> 
> Yes.
> 
> > otherwise, it is the DAC itself.
> 
> The DAC never converts the sample rate; it just runs at that rate.
> 
> > When I specify any other sample rate, the sample rate of the DAC is the
> > same as the sample rate specified in the aplay command.  Can I assume
> > that ALSA is doing nothing to the signal in those cases?
> 
> Yes.
> 
> > By the way, the DAC is Realtek ALC892.
> 
> This chip supports 88.2 kHz only on the digital output.
> 
> > When I run ALSA with plughw and ALSA invokes the sample-rate converter to
> > go from 88200 to 96000, I see from the output above that it uses linear
> > interpolation.  Is there a way to specify a better algorithm?
> 
> Install the alsa-plugins package.  (Which might have been split into several
> package by your distribution.)
> 
> 
> Regards,
> Clemens

Thanks for your guidance on this problem.  

For anyone who is interested, here is the asound.conf that seems to solve my 
problem playing sound files with a sample rate of 88.2 kHz:

pcm.!default {
    type plug
    slave {
        pcm hw
    }
}
ctl.!default {
    type hw
    card 0
}

defaults.pcm.rate_converter "speexrate"

The computational burden of the speexrate converter is only 3% on my system.  
By contrast, samplerate_best was 46%.


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
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