Difference between revisions of "DeviceNames"

From AlsaProject
Jump to: navigation, search
(migrate from dev)
 
Line 39: Line 39:
 
because ???
 
because ???
 
----
 
----
[https://bugtrack.alsa-project.org/wiki/wikka.php?wakka=DeviceNames Original] created on [[2007-01-14]] by unknown.
+
[https://bugtrack.alsa-project.org/wiki/wikka.php?wakka=DeviceNames Original] created on 2007-01-14 by unknown.
 
[[Category:Development]] [[Category:MigratedFromDev]]
 
[[Category:Development]] [[Category:MigratedFromDev]]

Revision as of 14:05, 12 August 2007

Recommended play device names

default (this one will automatically use dmix for sound cards that do not support hardware mixing of multiple channels)
plug:front
plug:rear
plug:center_lfe
plug:side
plug:surround40
plug:surround51
plug:surround71
spdif or iec958 (This is a special one that routes sound to the digital output of the card, for AC3 and DTS etc.)

The "plug" part implements sample rate conversion and sample format conversion. If one does not wish either of these conversions, one can use the device name without the prefix "plug:" If one wishes to only have sample format conversion, there is an alsa api call to disable the resampling feature in the "plug" plugin.

#if SND_LIB_VERSION >= 0x010009
/* Restrict a configuration space to contain only real hardware rates */
err = snd_pcm_hw_params_set_rate_resample(this->audio_fd, params, 0);
#endif

If the user has more than one sound card, e.g:

0 [ICH5 ]: ICH4 - Intel ICH5
Intel ICH5 with ALC650F at irq 201
1 [Audigy2 ]: Audigy2 - Audigy 4 [SB0610]
Audigy 4 [SB0610] (rev.0, serial:0x10211102) at 0x8400, irq 209
2 [Audigy2_1 ]: Audigy2 - Audigy 4 PRO [SB0380]
Audigy 4 PRO [SB0380] (rev.4, serial:0x20071102) at 0x8800, irq 217

The application can select which sound card to use. e.g. to use card 2, one would use:

plug:default:Audigy2_1
plug:front:Audigy2_1

one could also use:

plug:front:2

but using the name is better, as it tracks the card name even if on the next reboot the card number changes, for example, due to USB audio devices.

Some device names should not be used by applications

hw
plughw

because ???


Original created on 2007-01-14 by unknown.

Custom Search
Personal tools
Namespaces

Variants
Actions
Navigation
wiki
Toolbox