You are not logged in.

#1 2010-03-20 00:50:22

lasu1
Member
Registered: 2010-02-10
Posts: 83

[SOLVED]alsa problem only on command line: cannot open mixer: No Such

Hello all:

I'm going crazy. I know that I must be missing something extremely simple; however, I've been unable to get this to work.

I'm trying to get one of the terminal music programs to work (Cmus or ncmpcpp). Neither will.

Both spit back an error like: Error: opening audio device: No such device.

What is odd, is that I can play sounds fine from a GUI sound program, like Banshee. Also, video games and all of that work. It is only sound from the command line (Cmus, alsamixer, Aplay, etc). So, this makes me think I'm missing something exceptionally simple.

Thanks!

EDIT: Yes, my user is in the audio group, and alsa is in the daemons array (all GUI sound programs work fine....flash works fine, etc).

EDIT: Also, I think I have a lead on the problem. I also have a USB headset (which I've pretty much given up using while working with CMUS or ncmpcpp), as well as my standard Intel card. I've run alsaconf, asoundconf, etc 1,000,000 times (exaggeration), but Alsa refuses to let any sound card except the "Headset" be the default. So, I cannot use my Intel soundcard. Here is the output from trying to use Aplay:

[user-arch ~]$ aplay /usr/share/sounds/alsa/Front_Center.wav
ALSA lib confmisc.c:768:(parse_card) cannot find card 'Headset'
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:4633:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:608: audio open error: No such device

EDIT: Ok! I'm making progress! I can now change my playback device at-will (from usb to onboard-card). I can also play sound through Aplay, and Amix work as well! The only problem left: neither MPD or CMUS work. Any ideas?

Last edited by lasu1 (2010-03-20 02:24:41)

Offline

#2 2010-03-20 02:24:09

lasu1
Member
Registered: 2010-02-10
Posts: 83

Re: [SOLVED]alsa problem only on command line: cannot open mixer: No Such

Ok, guys, CALL OFF THE HORSES!!!

It WORKS.

Edit: DMIX saves the day ;-)

Edit: If anyone runs into this, or a similar, problem here is what I did. You basically have to edit you ~/.asoundrc file. Do *not* use asoundconf. I repeat, do *not* use asoundconf unless you want to be confused.  I wasted a lot of time using asoundconf. Also, alsaconf didn't help me much either. These plethora of options for configuration where confusing to me.

What works is to simply edit your ~./asoundrc file. This file is simply easy to configure. First, enable dmix by visiting the Arch Wiki page about it. There is a sample config for dmix which work great. Anyway, the next piece of information you need is the output of "aplay -l." This lists your sound devices. There will be a number next to each. It will say "card 1: ALSA'S-name-for-your-card." All that you have to do is replace the references in the ~/.asoundrc file to whichever output device you want.

It's easy, but was confusing for me because of the number of similar sounding configuration utilities (asoundconf, aplay, asoundrc, alsaconf....).  I got the most mileage from aplay and ~/.asoundrc.

Last edited by lasu1 (2010-03-20 03:41:12)

Offline

#3 2010-03-22 10:24:40

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED]alsa problem only on command line: cannot open mixer: No Such

lasu1 wrote:

Alsa refuses to let any sound card except the "Headset" be the default

Er, what? Specify the default.

E.g. in /etc/modprobe.d/alsa.conf

options snd-hda-intel model=acer-aspire-8930g enable_msi=1 index=0

Offline

Board footer

Powered by FluxBB