# No sound with Edirol UA-25 and ALSA



## Kalero (Oct 22, 2015)

Hi! I'm writing in this forum because last night I was setting up my FreeBSD 10.2 and I don't know how to have sound. I have an external USB sound card (Edirol UA-25) and, in Linux, I just needed to install ALSA packages, that have the driver for that sound card, and it worked well. In FreeBSD, I installed all the packages related to ALSA (alsa-lib, alsa-plugins, linux compatibility, etc.) but I don't have sound. Could anyone give some help? Thanks.


----------



## tobik@ (Oct 22, 2015)

Forget ALSA. On FreeBSD ALSA is just a software layer above OSS.

Is snd_uaudio(4) loaded? Check with `kldstat`. If not load it: `kldload snd_uaudio`. Also what's the output of `cat /dev/sndstat`?


----------



## Kalero (Oct 22, 2015)

I checked it with `kldstat` and it was not loaded. Now it's loaded (with `kldload snd_uaudio`), but I still don't have sound. The output of `cat /dev/sndstat` is below:

Installed devices:

```
pcm0: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm4: <Analog Devices AD1984 (Analog)> (play/rec) default
pcm5: <Analog Devices AD1984 (Analog)> (play/rec)
```


----------



## chrbr (Oct 22, 2015)

Please check what `mixer` outputs. More information is in the handbook https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-setup.html. Finally the hardware for consumers PC audio stuff is often of "unexpected" quality.


----------



## Kalero (Oct 22, 2015)

The output of `mixer` is below:

```
Mixer vol  is currently set to  83:83
Mixer pcm  is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer mic  is currently set to  67:67
Mixer mix  is currently set to 100:100
Mixer rec  is currently set to  72:72
Mixer igain  is currently set to  0:0
Mixer ogain  is currently set to 100:100
Recording source: mic
```


----------



## Kalero (Oct 22, 2015)

I've executed `kldload snd_driver` (that loads all kernel sound modules) and I still can't play sound.


----------



## chrbr (Oct 22, 2015)

This looks ok. Please check the handbook section 7.2.2 to 7.2.4. It describes how to configure a certain sound device as default output. I think the output of `cat /dev/sndstat` indicates that the non-NVIDIA part is the default output, but I am not sure. And I do not know if pcm4 or pcm5 is connected in your setup.


----------



## protocelt (Oct 22, 2015)

Kalero, can you run `% usbconfig` on the machine with the device plugged in and post the output?


----------



## Kalero (Oct 22, 2015)

Thanks for your help, tobik, chrbr and protocelt.

I can't run `usbconfig` as a normal user, but as root it outputs:

```
ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen4.1: <UHCI root HUB Intel> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen3.1: <UHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.1: <EHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen6.1: <EHCI root HUB Intel> at usbus6, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen5.1: <UHCI root HUB Intel> at usbus5, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen0.2: <Dell USB Keyboard Dell> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (70mA)
ugen4.2: <EDIROL UA-25 Roland> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (480mA)
ugen0.3: <USB-PS2 Optical Mouse Logitech> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (98mA)
```

It seems Edirol UA-25 is detected at ugen4.2...


----------



## protocelt (Oct 22, 2015)

Ok, so the device is correctly identified. Make sure the snd_uaudio(4) kernel module is loaded, and then run `% cat /dev/sndstat` again and post the ouptut.


----------



## tobik@ (Oct 22, 2015)

Kalero said:


> I've executed `kldload snd_driver` (that loads all kernel sound modules) and I still can't play sound.


Now that you have loaded snd_driver did /dev/sndstat change at all? If not your UA-25 is probably not supported.


----------



## Kalero (Oct 23, 2015)

This is the output of `cat /dev/sndstat` before loading any sound module:

```
Installed devices:
pcm0: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm4: <Analog Devices AD1984 (Analog)> (play/rec) default
pcm5: <Analog Devices AD1984 (Analog)> (play/rec)
```

This is the output of `cat /dev/sndstat` after loading snd_uaudio:

```
Installed devices:
pcm0: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm4: <Analog Devices AD1984 (Analog)> (play/rec) default
pcm5: <Analog Devices AD1984 (Analog)> (play/rec)
```

And this is the output of `cat /dev/sndstat` after loading snd_uaudio and snd_driver (now, `kldstat` shows a lot of modules):

```
Installed devices:
pcm0: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm3: <NVIDIA GT21x (HDMI/DP 8ch)> (play)
pcm4: <Analog Devices AD1984 (Analog)> (play/rec) default
pcm5: <Analog Devices AD1984 (Analog)> (play/rec)
```

So, it does not change  I'm going to read the handbook section 7.2.2 to 7.2.4 to know how to configure a certain sound device as default output, as chrbr said.


----------



## Kalero (Oct 23, 2015)

chrbr, I've changed hw.snd.default_unit from 4 to 5 (from pcm4, that was the default, to pcm5) and it does not work. I still can't play sound.


----------



## protocelt (Oct 23, 2015)

You won't be able to use the device if no pcm device node is created for it, which there isn't looking at your output. The specs for that device say it's a USB audio 1.0 compliant device so it should work but maybe needs a quirk in the snd_uaudio(4) driver for it to work. Might possibly be worth creating a problem report.


----------



## Kalero (Oct 23, 2015)

I'll look at that tomorrow. Thanks, protocelt.


----------



## Kalero (Oct 23, 2015)

I found this thread in FreeBSD lists: http://lists.freebsd.org/pipermail/freebsd-multimedia/2008-March/008275.html

According to the messages in this thread, the device should work in normal (non advanced) mode, that is as the device is right now.


----------

