alsa_only_audio
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
alsa_only_audio [2025/07/08 00:28] – created ethan | alsa_only_audio [2025/07/09 07:48] (current) – ethan | ||
---|---|---|---|
Line 3: | Line 3: | ||
I will be showing changes to /// | I will be showing changes to /// | ||
- | =====dmix===== | + | |
+ | =====devices===== | ||
+ | multiple commands can list available audio cards and devices. | ||
+ | |||
+ | **alsactl** can be used: | ||
+ | <code bash> | ||
+ | $ alsactl info 1 | ||
+ | # | ||
+ | # Sound card | ||
+ | # | ||
+ | - card: 1 # card number. | ||
+ | id: sofhdadsp | ||
+ | name: sof-hda-dsp | ||
+ | longname: | ||
+ | driver_name: | ||
+ | mixer_name: Realtek ALC233 | ||
+ | components: | ||
+ | controls_count: | ||
+ | pcm: | ||
+ | - stream: PLAYBACK | ||
+ | devices: | ||
+ | - device: 1 # device number. | ||
+ | id: HDA Analog (*) # name. | ||
+ | name: | ||
+ | subdevices: | ||
+ | - subdevice: 0 | ||
+ | name: subdevice #0 | ||
+ | ... | ||
+ | </ | ||
+ | by default //alsactl info// will show card 0. you most likely have multiple cards. | ||
+ | |||
+ | **aplay** will also list sound cards and devices. | ||
+ | <code bash> | ||
+ | $ aplay -l | ||
+ | **** List of PLAYBACK Hardware Devices **** | ||
+ | card 0: HDMI [HDA ATI HDMI], device 0: HDMI 0 [HDMI 0] | ||
+ | Subdevices: 1/1 | ||
+ | Subdevice #0: subdevice #0 | ||
+ | ... | ||
+ | card 1: sofhdadsp [sof-hda-dsp], | ||
+ | Subdevices: 1/1 | ||
+ | Subdevice #0: subdevice #0 | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | card 1 and device 1 will be used for this guide. in most places, this is specified with **" | ||
+ | |||
+ | =====mixing===== | ||
[[https:// | [[https:// | ||
Line 22: | Line 69: | ||
</ | </ | ||
- | =====S/ | + | =====S/ |
the **a52** alsa plugin can be used to output Dolby Digital 5.1 (or lower) multichannel audio through S/PDIF. | the **a52** alsa plugin can be used to output Dolby Digital 5.1 (or lower) multichannel audio through S/PDIF. | ||
Line 39: | Line 86: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | |||
+ | =====equalization===== | ||
+ | [[https:// | ||
+ | |||
+ | each user has their own persistent settings, stored in // | ||
+ | |||
+ | the following configuration builds on the previous section on dmix. an asoundrc using solely alsaequal can be very simple. | ||
+ | <file bash / | ||
+ | pcm.dmix_stereo { | ||
+ | type dmix | ||
+ | ipc_key 1024 | ||
+ | ipc_key_add_uid false | ||
+ | ipc_perm 0666 | ||
+ | |||
+ | slave { | ||
+ | pcm " | ||
+ | |||
+ | period_time 0 | ||
+ | period_size 1024 | ||
+ | buffer_size 4096 | ||
+ | rate 48000 | ||
+ | } | ||
+ | bindings { # channel configuration (stereo, quad, 5.1, ...). | ||
+ | 0 0 | ||
+ | 1 1 | ||
+ | } | ||
+ | } | ||
+ | pcm.plug_eq_stereo { | ||
+ | type equal | ||
+ | slave.pcm " | ||
+ | } | ||
+ | pcm.eq_stereo { # this plug is needed to make the alsaequal output suitable for use by most applications. | ||
+ | type plug | ||
+ | slave.pcm " | ||
+ | } | ||
+ | |||
+ | ctl.eq_stereo { # this ctl is what allows adjustment in alsamixer (or similar utilities). | ||
+ | type equal | ||
+ | } | ||
+ | |||
+ | pcm.!default eq_stereo | ||
+ | </ | ||
+ | with this configuration, | ||
+ | <code bash> | ||
+ | alsamixer -D eq_stereo | ||
+ | </ | ||
+ | |||
+ | ====multichannel==== | ||
+ | here is an example of using alsaequal with **a52**. | ||
+ | <file bash / | ||
+ | ... | ||
+ | |||
+ | pcm.surround { | ||
+ | type a52 | ||
+ | slavepcm " | ||
+ | |||
+ | channels 6 | ||
+ | bitrate 1000 | ||
+ | rate 48000 | ||
+ | format S16_LE | ||
+ | } | ||
+ | pcm.plug_eq_surround { | ||
+ | type equal | ||
+ | channels 6 # changes channel configuration to 5.1. | ||
+ | controls " | ||
+ | slave.pcm " | ||
+ | } | ||
+ | pcm.eq_surround { | ||
+ | type plug | ||
+ | slave.pcm " | ||
+ | } | ||
+ | |||
+ | ctl.eq_surround { | ||
+ | type equal | ||
+ | channels 6 | ||
+ | controls " | ||
+ | } | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | the surround equalizer can be changed with ctl **eq_surround** using this configuration. | ||
+ | |||
{{tag> | {{tag> |
alsa_only_audio.1751934535.txt.gz · Last modified: by ethan