Re: Using hw device in presence of PulseAudio

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

 



What you want is impossible in principle, regardless of PulseAudio specifically (i.e my statement applies to any kind of sound server with similar functionality) and ALSA speicifically (i.e my statement applies to any kind of direct HW access interface).

The point is that for an HW device to function a stream of audio samples must be sent into it, and the device must be configured WRT sample rate. If a program takes control of a sound device, no other program can use it - how do you imagine one program sending 44100Hz samples and at the same time another program sending 96000Hz samples to the same device ?

So PulseAudio is among other things a sophisticated mixer doing sample rate conversion when necessary and adding streams with coefficients (i.e. k1 * s1 + k2 * s2 + ... + kN * sN)  from different sources, the coefficients representing volumes, and sending the resulting stream into the HW device.

I yet to have find out whether PulseAudio can be running using one sound card, and ALSA directly for another sound card (this is my setup - I have two physical sound cards).

Regards,
  Sergei.


Mon, 8 Sep 2014 16:32:27 -0700 от "Paul A. Steckler" <steck@xxxxxxxxxxxxx>:
Well, I meant, keep PulseAudio running, but still use ALSA without
using the PulseAudio server device, which
other applications may want to use.

-- Paul

On Mon, Sep 8, 2014 at 4:11 PM, Sergei Steshenko
<steshenko_sergei@xxxxxxx> wrote:
>
>
>
> Fri, 5 Sep 2014 09:38:54 -0700 от "Paul A. Steckler" <steck@xxxxxxxxxxxxx>:
>
> I have an app that uses the ALSA library on Linux.
>
> The app calls snd_pcm_open() to open the capture device. Currently,
> I use "default" as the name of the device. According to "arecord -L", the
> default device is the PulseAudio server.
>
> Is there a way to bypass PulseAudio, and communicate with the
> hardware directly?
>
> I've tried using "sysdefault" and "hw:0,0" as the name of the device,
> and in both cases, I get an error that the device is busy. Is that because
> PulseAudio has monopolized the device?
>
> -- Paul
>
>
> "Is there a way to bypass PulseAudio" - one can (simply) stop PulseAudio
> server, e.g.: http://jan.newmarch.name/LinuxSound/Sampled/PulseAudio/ ->
> http://www.linuxplanet.com/linuxplanet/tutorials/7130/2 .
>
> Regards,
> Sergei.

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
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