Linux Commands Examples

A great documentation place for Linux commands

alsa



Sorry, no description

... the author of this command may not have provided any manuals


Once you know what this command is about, feel free to add a description in the input "add an example + trick and tips" below
 help other Linux-fans !




add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

1
source

Linux - Creating Virtual Audio Device

just load snd-aloop

PS Off-topic: Stackexchange is broken. It won't post the one-liner answer citing "Please check the error above. But there's no error. Oh, there it is, on the side, wrapped in a ribbon, dissolving into all the static on right-hand column. Dear SE, a UI guy with some common sense, please."

0
source

What do ALSA devices like "hw:0,0" mean? How do I figure out which to use?

hw:0,0 specifies the default device, on the default sound card. To access your second soundcard's first device, you would specify hw:1,0. These are specified in your .asoundrc. More on all of this here.

0
source

Is there a way to raise/lower the volume in Linux without using a graphical tool?

Check out System -> Preferences -> Keyboard Shortcuts.

There is a section named "Sound" which lets you set shortcuts for system volume.

0
source

Prevent applications to control master volume on Linux

This Gentoo wiki article might apply here : PulseAudio per-application volume control :

PulseAudio supports per-application volume control, but by default this doesn't do much as you can only control these volumes from the pulseaudio volume control utility. Meaning that in an application like Audacious, when the output device is set to PulseAudio, and the volume control is set to hardware, it will adjust the master volume control, not the per-application volume control.

To fix this behavior, set the following in /etc/pulse/daemon.conf

flat-volumes = no

Now whenever Audacious goes to adjust the volume, it will adjust the audacious only volume and thus you wont have multiple applications fighting over the master volume control.

0
source

How to disable Auto-Mute Mode?

Press right arrow to get to "auto-mute mode", then up or down arrow to change it, then Escape to exit.

You can make this automatic on boot by executing (perhaps in /etc/rc.local):

/usr/bin/amixer -c 0 sset "Auto-Mute Mode" Disabled

0
source

Does Linux support audio output via USB?

Yes. (However not all USB audio cards are compatible with all systems.)

I'm not sure what you mean by "out of the box" (which box, the computer or the USB sound card...)

According to Linux-Usb.org as long as "You need to turn on the Sound card support kernel option, which is in the Sound section. You will then be able to turn on the USB Audio support option in the normal USB section."

0
source

Force downmix to mono on Linux

PulseAudio's module-remap-sink should let you do this, but I don't know all the details.

0
source

Changing default audio device in Pulseaudio

PulseAudio Device Chooser (padevchooser)?

0
source

How to create a dummy sound card device in Linux server?

You need to load a dummy sound driver. Please see the Alsa Wiki for detailed info, but here are the basics:

  1. Load the driver:

    modprobe snd-dummy ; modprobe snd-pcm-oss ; modprobe snd-mixer-oss ; modprobe snd-seq-oss

  2. Have proper .asoundrc file (you have it covered)

  3. Configure autoloading of the drivers. Add this to /etc/modules.conf:

    # OSS/Free portion - card #1
    alias sound-slot-0 snd-card-0
    alias sound-service-0-0 snd-mixer-oss
    alias sound-service-0-1 snd-seq-oss
    alias sound-service-0-3 snd-pcm-oss
    alias sound-service-0-8 snd-seq-oss
    alias sound-service-0-12 snd-pcm-oss

There are actually quite a few things involved, I suggest you visit the Wiki page above for more detailed explanation.

0
source

Make acpi beep when the power supply being unplugged even if the alsa is turned into mute

You can not. Alsa mutes using hardware mixer so well that not even a mouse whisper passes.

0
source

Audio Line-In on Ubuntu/Linux Mint

Im not sure if this helps, But i came across this article a little while ago, and while not specific to your problem is about proffesional audio on linux

http://createdigitalmusic.com/2009/08/04/linux-music-workflow-switching-from-mac-os-x-to-ubuntu-with-kim-cascone/

0
source

How to create a dummy sound card device in Linux server?

You need to load a dummy sound driver. Please see the Alsa Wiki for detailed info, but here are the basics:

  1. Load the driver:

    modprobe snd-dummy ; modprobe snd-pcm-oss ; modprobe snd-mixer-oss ; modprobe snd-seq-oss

  2. Have proper .asoundrc file (you have it covered)

  3. Configure autoloading of the drivers. Add this to /etc/modules.conf:

    # OSS/Free portion - card #1
    alias sound-slot-0 snd-card-0
    alias sound-service-0-0 snd-mixer-oss
    alias sound-service-0-1 snd-seq-oss
    alias sound-service-0-3 snd-pcm-oss
    alias sound-service-0-8 snd-seq-oss
    alias sound-service-0-12 snd-pcm-oss

There are actually quite a few things involved, I suggest you visit the Wiki page above for more detailed explanation.

0
source

How to configure ALSA?

The system-wide configuration file is stored in '/etc/asound.conf', all ALSA compliant applications will read this file each time they start. The best place to look to get a sense of your current sound devices is here in '/proc/asound/'. If you don't have a configuration file, ALSA applications will use /proc/asound/card0 as the default sound device. You can check what verison of ALSA you're running here '/proc/asound/version'.

Each sound device has a bunch of 'pcms' associated with it. Each pcm is basically an output channel: "front", "rear", "surround41", "surround51", etc. You can see which pcm channels are available by using this command:

aplay -L | grep CARD

A few of these pcm channels do not correspond to physical audio outputs but are software channels provided by ALSA. The one we're interested in is called 'dmix'. The 'dmix' channel is a software mixer provided by ALSA to handle multiple concurrent input streams.

One thing to note is the use of multiple conventions for identifying a particular sound device. The configuration file will use card0, card1, etc or simply 0, 1, etc. It's also possible to refer to the card by name, such as Creative, Nvidia, etc. These names are defined as soft links in the ALSA proc directory: 'ls -l /proc/asound'. Typically, when referring to a PCM channel in the configuration file, the format is as follows: "channel-name:card-index,sub-index". So, for example, "dmix:2,0" refers to the dmix pcm channel on card 2, sub-device 0. You see the sub devices associated with each sound card by using this command:

aplay -l

The final step is the configuration file itself, located here '/etc/asound.conf'. We need 2 components in this file, a 'pcm' channel definition and a 'ctl' channel definition. The 'pcm' channel defines our output and is responsible for multiplexing multiple sound streams into a single hardware output channel. The 'ctl' channel is used for the mixer and is responsible for controlling volume.

ALSA uses a software pcm channel called a 'plug' which handles the multiplexing. It is a software front-end for a slaved pcm output channel. The slaved pcm output channel must itself be capable of mixing. An example configuration file follows:

pcm.custom
{
    type plug
    slave
    {
        pcm "dmix:2,0"
    }
}

ctl.custom
{
    type hw
    card Creative
}

pcm.!default pcm.custom
ctl.!default ctl.custom

In this case, I'm using the 'dmix' output channel for the 3rd sound device on the system "dmix:2,0". The 3rd index is 2 because it starts from 0 (card0, card1, card2). In addition, 'ctl' schema references the same card but this time using it's soft-linked name 'Creative'.

I hope this is of use to others.

0
source

Pipe System sound to another computer

Well... the first thing that came to my mind was a version of VNC that allows for sound. Not every install does. So, I cranked up a VNC comparison page.

Looking through it, there are a number of VNC based installs that not only work with Linux, but support sound. So right there, that's one way. You install the server on your computer, install the client on the computer with the speakers, enable multi-user sessions so you don't get disconnected, and you can pipe your sound to that computer.

Otherwise, you can try the Network Audio System which I got out of a similar question asked last year Play system sounds from one computer through another computer's speakers?

How can this site be more helpful to YOU ?


give  feedback