Re: "hw" or "plughw"

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

 



Hi paul blakeley!

 On 2007.11.20 at 12:26:29 +0000, paul blakeley wrote next:

> Can someone please explain the differences between these?  What impact
> they have on the application?

plughw supports much more sample formats / channel configurations
than underlying hardware supports natively, and performs conversion if
needed. hw performs no conversion, but supports less configuration,
sometimes only very obscure ones, but when used you can rest assured
that no conversion takes place.

Mostly you'd want these conversions to take place, like mono->stereo
conversion or S16LE->S32LE conversion etc (all depending on your
hardware)

> If I need to drive the sound card directly should I use 'hw'?

You can use hw, but it isn't really recommended unless you REALLY know
how to use it and have support of every weird format in all possible
combinations. That's about underlying hardware details, and most
applications don't want to deal with them.

For example my soundcard supports only S24_3BE format; you can't open hw
device in any other mode, if you want to output S16LE (most applications
never heard of S24_3 formats, let alone BE variations), you must use
plughw, there is no other choice. Or p16v device on audigy2 supports
only 8-channel modes; you can't output stereo signal to it, no matter
how you try. So you either can output 8 channels to hw device or let
plughw to do stereo->8ch conversion for you automatically.

Unless you want to take care of all these little details, using hw is
probably not a good idea. Though it's required for some applications
because you don't actually know if/what kind of conversion takes place
when you use plughw, most application would trouble users much less if
they were to use plughw instead of hw. Actually, almost all application
shouldn't even use plughw, sticking to "default" device, to allow
software mixing, jack/pulse routing plugins, user choosen conversions to
take place. If you do anything else, you create problems for users, so
you must have really good reasons to do so..

-- 

Vladimir

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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