Questions tagged [alsa]

ALSA stands for Advanced Linux Sound Architecture and is a kernel component that supports sound in Linux systems.

ALSA stands for Advanced Linux Sound Architecture and is a kernel component that supports sound in Linux systems. In the 2.6 version of the Linux kernel, ALSA replaced OSS (Open Sound System).

According to the project's website, ALSA does the following key features:

  • Efficient support for all types of audio interfaces, from consumer sound cards to professional multichannel audio interfaces.
  • Fully modularized sound drivers.
  • SMP and thread-safe design.
  • User space library (alsa-lib) to simplify application programming and provide higher level functionality.
  • Support for the older Open Sound System (OSS) API, providing binary compatibility for most OSS programs.

Independent ALSA and linux audio support site with info on audio hardware and drivers

1077 questions
7
votes
4 answers

Running python script as root

I have the following script: #!/usr/bin/env python import sys import pyttsx …
moesef
  • 4,641
  • 16
  • 51
  • 68
7
votes
1 answer

Adding multiple Loopback Alsa devices in ubuntu

I need to create virtual loopback alsa sinks in my ubuntu setup. I can create one by adding the following to /etc/modprobe.d/sound.conf alias snd-card-0 snd-aloop options snd-aloop index=21 pcm_substreams=8 I need to create multiple of these but I…
amustafa
  • 858
  • 1
  • 7
  • 17
7
votes
2 answers

Recording from ALSA - understanding memory mapping

Im attempting to use ALSA to take the input from a USB audio device and write it out to disk as a series of signed short values. What I'm ending up with are blocks of what appear to be valid data interspersed with large blocks of zeros. I'm guessing…
ethrbunny
  • 10,379
  • 9
  • 69
  • 131
7
votes
2 answers

Need more than 32 USB sound cards on my system

I'm working on an educative multiseat project where we need to connect 36 keyboards and 36 USB sound cards to a single computer. We're running Ubuntu Linux 12.04 with the 3.6.3-030603-generic kernel. So far we've managed to get the input from the 36…
picheto
  • 331
  • 2
  • 13
7
votes
1 answer

Reliable sound API in Java for simple digital samples playback

Is there a good recipe to get decent, reliable digital sampled sound playback in Java? My list of requests is pretty short: Load digitized samples in memory (for example, from resouces bundled in jar) from something like .wav files Play them in…
GreyCat
  • 16,622
  • 18
  • 74
  • 112
7
votes
2 answers

Current Level of Microphone Input

How can I get the current audio input level of a microphone via a shell command under Ubuntu 12.04 LTS? I checked out amixer to set the volume but could not find a way to get the audio input level at the time of the shell call. Thank you in advance!
Dominik Schreiber
  • 769
  • 2
  • 15
  • 25
6
votes
1 answer

What are the restrictions on an ALSA PCM callback?

I am writing a program under Linux that utilizes both playback and record using ALSA (connected to a custom device). I would like to use the asynchronous callback architecture for both reading and writing data. However, I have been unable to get…
Tom West
  • 1,759
  • 2
  • 13
  • 20
6
votes
1 answer

Use ALSA pcm outputs via the Java SoundSystem

I have a sound card with multiple outputs and use ALSA to map them to 2 separate stereo channels. The configuration works fine and allows me, for example with speaker-test to play audio on them. I now want to use those 2 stereo outputs in a Java…
nanoman
  • 1,069
  • 12
  • 27
6
votes
1 answer

Get master sound volume in C in Linux

I'm trying to retrieve (and probably later set) the master sound volume in Linux. I'm using PulseAudio, but ideally it should work for ALSA too. I found this very helpful post on how to set the volume, and from that I was able to deduce the…
Rena
  • 3,923
  • 3
  • 22
  • 19
6
votes
1 answer

Finding available sound cards on Linux programmatically

Is there a way to get a list of available sound cards on the system programmatically using asoundlib and C? I want it with the same information as /proc/asound/cards.
thelinuxer
  • 658
  • 1
  • 8
  • 28
6
votes
1 answer

Upgrading (overriding) an entire recipe in a custom layer

I have a custom layer in project. This gets shared with colleagues. My distro (poky) it uses a older version of alsa. This gets downloaded on initial setup of the build area. I would like to 'replace' that version of alsa with a later version…
zonedar
  • 181
  • 4
  • 11
6
votes
0 answers

Why ALSA lib is not working in Ubuntu?

I'm doing a program using portaudio, but once i run it i get these problems (the program compiles and run, but I suspect it doesn't behave the way it should because of these problems). Any ideas how to fix the problem? ALSA lib…
user3353167
  • 782
  • 2
  • 16
  • 31
6
votes
1 answer

ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card arecord: main:722: audio open error: No such file or directory

i am working on speech recognition . for this i am using "alsa-utils" but when i try to use this script #!/bin/bash echo “Recording… Press Ctrl+C to Stop.” arecord -D plughw:1,0 -q -f cd -t wav | ffmpeg -loglevel panic -y -i – -ar 16000…
Aaditya Ura
  • 12,007
  • 7
  • 50
  • 88
6
votes
3 answers

Correctly sizing Alsa buffers, weird API

I'm currently working on a project that requires me to do some sampling with Alsa. I'm trying to configure correctly everything but I'm stuck on how to correctly size my reading. There are two primitives that seem to be interesting for my…
Dacav
  • 13,590
  • 11
  • 60
  • 87
6
votes
1 answer

ALSA: cannot recovery from underrun, prepare failed: Broken pipe

I'm writing a program that reads from two mono ALSA devices and writes them to one stereo ALSA device. I use three threads and ping-pong buffer to manage them. Two reading threads and one writing threads. Their configurations are as follows: //…
Peter
  • 331
  • 3
  • 11