# play - there is no default audio device configured

## Joseph_sys

I am missing something, have no audio.

I'm trying to use "play" (sox) to play media file (gsm, wav) from command line but it complains:

```
play msg0001.gsm

play FAIL sox: Sorry, there is no default audio device configured
```

I've configured ALSA according to:

http://www.gentoo.org/doc/en/alsa-guide.xml  (all drivers are compiled IN, not as module)

```
lspci | grep Audio

00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
```

 I've compiled IN "PCI sound devices": 

```
<*>   VIA 82C686A/B, 8233/8235 AC97 Controller
```

 is it the correct one?

```
lspci -n

00:00.0 0600: 1106:0314

00:00.1 0600: 1106:1314

00:00.2 0600: 1106:2314

00:00.3 0600: 1106:3208

00:00.4 0600: 1106:4314

00:00.7 0600: 1106:7314

00:01.0 0604: 1106:b198

00:09.0 0200: 10ec:8167 (rev 10)

00:0f.0 0101: 1106:0571 (rev 06)

00:10.0 0c03: 1106:3038 (rev 81)

00:10.1 0c03: 1106:3038 (rev 81)

00:10.2 0c03: 1106:3038 (rev 81)

00:10.3 0c03: 1106:3038 (rev 81)

00:10.4 0c03: 1106:3104 (rev 86)

00:11.0 0601: 1106:3227

00:11.5 0401: 1106:3059 (rev 60)

01:00.0 0300: 1106:3344 (rev 01)
```

What else did I miss?

----------

## alacheesu

where did the guide fail for you?

----------

## Joseph_sys

The guide did not fail me, everything compile just OK

except I'm still getting:

play msg0001.gsm

play FAIL sox: Sorry, there is no default audio device configured

so it makes me wonder if I selected the correct driver in the kernel.

----------

## Jaglover

The driver should be snd-via82xx

What ls /dev/snd shows to you.

----------

## Joseph_sys

 *Jaglover wrote:*   

> The driver should be snd-via82xx
> 
> What ls /dev/snd shows to you.

 

Ah, that could be the culprit, 

```
ls /dev/snd/

controlC0  pcmC0D0c  pcmC0D0p  pcmC0D1c  pcmC0D1p  seq  timer
```

 I'm 100% sure I've compiled the driver IN

```
cat .config |grep -i via

...

CONFIG_SND_VIA82XX=y
```

I'll have to check it tonight again.

----------

## Joseph_sys

It is strange, I've checked in the kernel:

<*>   VIA 82C686A/B, 8233/8235 AC97 Controller

but when I'm recompiling the kernel it does not show:

```
make && make modules_install

  CHK     include/linux/version.h

  CHK     include/linux/utsrelease.h

  SYMLINK include/asm -> include/asm-x86

  CALL    scripts/checksyscalls.sh

  CHK     include/linux/compile.h

Kernel: arch/x86/boot/bzImage is ready  (#11)

  Building modules, stage 2.

  MODPOST 3 modules

  INSTALL drivers/input/input-polldev.ko

  INSTALL drivers/input/serio/serport.ko

  INSTALL drivers/scsi/scsi_wait_scan.ko

  DEPMOD  2.6.30-gentoo-r4
```

It should show something with "...via.... "

----------

## Jaglover

Hey, you built it in, it won't show up in modules. You have device nodes in /dev/snd, your soundcard is working. Try with some other player, as MPlayer.

----------

## Joseph_sys

 *Jaglover wrote:*   

> Hey, you built it in, it won't show up in modules. You have device nodes in /dev/snd, your soundcard is working. Try with some other player, as MPlayer.

 

Yes, I do have something in there:

```
total 0

crw-rw---- 1 root audio 116,  0 Jun 10 13:08 controlC0

crw-rw---- 1 root audio 116, 24 Jun 10 13:08 pcmC0D0c

crw-rw---- 1 root audio 116, 16 Jun 10 13:08 pcmC0D0p

crw-rw---- 1 root audio 116, 25 Jun 10 13:08 pcmC0D1c

crw-rw---- 1 root audio 116, 17 Jun 10 13:08 pcmC0D1p

crw-rw---- 1 root audio 116,  1 Jun 10 13:08 seq

crw-rw---- 1 root audio 116, 33 Jun 10 13:08 timer

```

but I'm still getting :

play msg0001.gsm

play FAIL sox: Sorry, there is no default audio device configured

MPlayer, not sure if it will compile on it, the system wasn't upgraded for at least a year or two; I'm just managing it over ssh

----------

## Jaglover

Wait a minute, kernel is 2.6.30. System is not upgraded in two years? Methinks your alsalib is too old for this kernel.

----------

## Joseph_sys

Where is the "time stamp" file for the portage? I'll check

got it "/usr/portage/metadata/glsa/timestamp.chk"

I've rsync in April but I know for sure I've not emerge or update this system this year.

----------

## cach0rr0

This is a very uneducated suggestion I'm making, but how painful would it be to switch that around to being a module instead of built-in? 

 *Quote:*   

> 
> 
> Please note that for ease of use, all examples show ALSA built as modules. It is advisable to follow the same...<snip>
> 
> 

 

Personally I've always done it so I can pass extra args when doing modprobe (though that's far more relevant for snd-hda-intel, since it has 8 zillion models)

It's worth a shot if you run out of other things to try.

----------

## Jaglover

I'm no ALSA expert either, but i think in-kernel driver version has to match alsa-utils and alsa-lib. I'd try upgrading those.

----------

## Joseph_sys

 *cach0rr0 wrote:*   

> This is a very uneducated suggestion I'm making, but how painful would it be to switch that around to being a module instead of built-in? 
> 
>  *Quote:*   
> 
> Please note that for ease of use, all examples show ALSA built as modules. It is advisable to follow the same...<snip>
> ...

 

OK, I can play now.

I've recompiled as module: 

<M> VIA 82C686A/B, 8233/8235 AC97 Controller

run: alsaconf it found: via82xx (so this is correct one) 

```
cat /etc/modprobe.d/alsa.conf

...

alias /dev/mixer snd-mixer-oss

alias /dev/dsp snd-pcm-oss

alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.

# --- BEGIN: Generated by ALSACONF, do not edit. ---

# --- ALSACONF version 1.0.21 ---

alias snd-card-0 snd-via82xx

alias sound-slot-0 snd-via82xx

# --- END: Generated by ALSACONF, do not edit. ---
```

so it seems like I should have a sound but, I get the same error:

```
play msg0001.gsm

play FAIL sox: Sorry, there is no default audio device configured
```

What am I missing here?!

----------

## cach0rr0

ok...have you tested playing the file with anything else?

because im googling around, and this almost looks like a problem with `play` 

for example: http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg441147.html

or maybe it's expecting /dev/dsp to be there and it isn't there? 

But most importantly...have you tested with other applications.

----------

## Joseph_sys

 *Jaglover wrote:*   

> The driver should be snd-via82xx
> 
> What ls /dev/snd shows to you.

 

I've re-compile the driver as module, how to check if it is loaded?

```
ls /dev/snd/

controlC0  pcmC0D0c  pcmC0D0p  pcmC0D1c  pcmC0D1p  seq  timer
```

I don't see any "snd-via82xx"

----------

## Joseph_sys

 *cach0rr0 wrote:*   

> ok...have you tested playing the file with anything else?
> 
> because im googling around, and this almost looks like a problem with `play` 
> 
> for example: http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg441147.html
> ...

 

As I've mentioned, the system hasn't been upgraded for a while so I don't want to try to compile anything heavy.

What other text based player I can compile, right now I think I only have "sox"

----------

## cach0rr0

 *Joseph_sys wrote:*   

> 
> 
> As I've mentioned, the system hasn't been upgraded for a while so I don't want to try to compile anything heavy.
> 
> What other text based player I can compile, right now I think I only have "sox"

 

ahhh man, you're making me have to get up out of my chair and grab my laptop  :Smile: 

`aplay` comes with some package,

i need to go look it up. mplayer works on the command-line as well - heck, there's even a CLI for VLC, but these two are probably more heavy than you like.

----------

## cach0rr0

alsa-utils. That was the one. 

loads of options, check the man page for aplay.

----------

## Joseph_sys

 *cach0rr0 wrote:*   

> alsa-utils. That was the one. 
> 
> loads of options, check the man page for aplay.

 

I've installed mplayer and it plays the files just fine; so there must be something that hasn't been updated that sox doesn't want to play them.

----------

## cach0rr0

 *Joseph_sys wrote:*   

> 
> 
> I've installed mplayer and it plays the files just fine; so there must be something that hasn't been updated that sox doesn't want to play them.

 

Ok cool. Least we know it isn't the driver! 

And since it's not the driver, and I know nothing about sox (well, in this context, I know sarbanes-oxley better than I wish I had to) I am unfortunately of little/no/zero help further. I mean I guess you could check command-line switches for `play` and see if any allow you to specify a device, but beyond that I bow out.

----------

