10

just bought sound blaster X-Fi HD (USB) and i'm trying to understand what is the current output (sample rate and bit rate).

I've configured /etc/pulse/daemon.conf and set there the following values:

default-sample-rate = 96000 default-sample-format = s24le

How do i validate it?

idgar
  • 2,890

2 Answers2

14

Pulseaudio settings adhere to the sink they are made for. Hence we are able to read the values we gave with the following command:

pacmd list-sinks

This will give a rather lengthy list including the following information similar to this

sample spec: s16le 2ch 44100Hz

as this was set for my internal card.

Takkat
  • 142,284
  • Great thanks a lot! where can read about how pulseaudio works? (what is sink, source and all of this stuff, relevant files, what is the relationship with ALSA, etc.) – idgar May 24 '13 at 18:51
  • You may try to figure out things from http://www.freedesktop.org/wiki/Software/PulseAudio/ or from the nice Wiki maintained by Arch people: https://wiki.archlinux.org/index.php/PulseAudio – Takkat May 24 '13 at 18:55
6

You can also look under the hood of ALSA itself, to double check what sample rate your hardware is actually set to.

less /proc/asound/card0/pcm0p/sub0/hw_params

(numbers may vary, e.g. card1, and maybe a different playback channel on the card. xp are playback channels, xc are capture channels). Not 100% sure if the hw_params file is specific to hda_intel, or if it'll be there with whatever alsa driver you have.

In a typical setup, applications use the default ALSA output, which is actually a hook to send the audio through pulseaudio, which itself outputs to hardware through alsa, using the actual names of the hw device. (alsa devices are specified with text strings like hw:0, or default).

Peter Cordes
  • 2,197
  • /proc/asound doesn't exist anymore? – endolith Mar 05 '19 at 21:16
  • 1
    @endolith: it does for me on x86-64 Linux 4.20.3-arch1-1-ARCH, on a mobo which has sound hardware so the ALSA modules are loaded. IDK if Ubuntu might have applied any patches that change something. – Peter Cordes Mar 05 '19 at 21:27