You are not logged in.

#1 2014-05-09 11:25:17

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

[Solved] Exclusive soundcard use

I would like an application to be able to exclusively use a sound device, without pulse or a mixer in between, and no other application can play sound, and, so that my master volume control does nothing.

I'm playing to front:CARD=UD501,DEV=0. This is a USB DAC capable of playing DoP and DSD.

The application in question (JRiver MediaCenter) should be able to output DoP but the DAC is not switching to DoP, it switches to PCM 178kHz. I suspect ALSA or Pulse is somehow trying to control this stream and the DoP markers get lost.

I suspect Pulse of this, but I can't remove pulse unfortunately. I need to somehow be able to bypass pulse (and ALSA mixer). Is there any way I can do this?

Thanks in advance!

Last edited by mouseman (2014-05-11 10:35:08)

Offline

#2 2014-05-09 14:22:22

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [Solved] Exclusive soundcard use

Setting up an additional pcm for your application using raw communication with alsa kernel driver (type hw) should solve your need for one-sound-playing-only.
As for control of mixer, you could set card 100 for your default mixer, meaning the default control would not work. However amixer with proper parameters, still does its job. Maybe changing permission could solve this.
Personally I have not used DSD yet. When was this feature implemented? If only recently, not that many people might be using it on linux yet.
To bypass pulseaudio, you could try to set default sink to the alsa [default] dmix (So it would use the device only when not grabbed). Or try side-channeling whole pulseaudio as an alternative, that would require more configuration however. Another thought would be using environment variables to switch between normal setup and JMC operation mode, but this is difficult if some applications stay running and continue to use sound devices.
Do you want to have no sound at all on all the other devices as well as on the DAC, while JMC is using the DAC or should JMC be the only application using the DAC, while the rest of sound devices do not matter?
Are you capable of streaming the unique format with pulseaudio and all sound applications killed or is not even that possible in your case? Does alsamixer show an DoP/DSD option in rate or other type of control?

Offline

#3 2014-05-09 15:42:48

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: [Solved] Exclusive soundcard use

set pulseaudio to run as your user and kill it when you want to use alsa only

Offline

#4 2014-05-09 16:20:18

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [Solved] Exclusive soundcard use

emeres wrote:

Personally I have not used DSD yet. When was this feature implemented? If only recently, not that many people might be using it on linux yet.

http://mailman.alsa-project.org/piperma … 61239.html


Thanks for your elaborate reply. I'll give your options a spin later today or this coming weekend and answer your questions. I might have some more of my own too wink.

emeres wrote:

Are you capable of streaming the unique format with pulseaudio and all sound applications killed or is not even that possible in your case? Does alsamixer show an DoP/DSD option in rate or other type of control?

No, in my current configuration it never worked. There are no controls for settings options. I had something working on Debian Wheezy awhile back without pulse installed but I can't remember if it was DSD or DoP.

HiImTye wrote:

set pulseaudio to run as your user and kill it when you want to use alsa only

I'll look into it, although its not very convenient, especially for a htpc that's controlled via a remote or something. Also I'm not sure if this is such a smart idea if other apps depend on it. For instance, I'm running kwin instead of xfwm which won't even start if pulse is not loaded.

But thanks for the suggestion, I'll look into it nonetheless!

Offline

#5 2014-05-09 18:10:32

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: [Solved] Exclusive soundcard use

mouseman wrote:
HiImTye wrote:

set pulseaudio to run as your user and kill it when you want to use alsa only

I'll look into it, although its not very convenient, especially for a htpc that's controlled via a remote or something. Also I'm not sure if this is such a smart idea if other apps depend on it. For instance, I'm running kwin instead of xfwm which won't even start if pulse is not loaded.

But thanks for the suggestion, I'll look into it nonetheless!

a few bash scripts and it isn't very inconvenient at all. it's only inconvenient at the beginning, while setting everything up.
re: pulse dependency, will they close if you kill pulse while they're open?

Offline

#6 2014-05-10 09:14:09

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [Solved] Exclusive soundcard use

Maybe pulse isn't loaded at all. I only have libpulse installed, no other pulse related packages.

ps aux | grep pulse doesn't show any processes.

aplay -L does show pulse as a device, which led me to believe pulse was active but it looks like that's incorrect?

speaker-test -Dpulse -c2 gives an error:

Playback device is pulse
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Playback open error: -111,Connection refused

I created /etc/asound.conf with the following contents:

cat /etc/asound.conf 
pcm.name {
  type hw
  card UD501
  device 0
  subdevice 0
  channels 2
}

pcm.!default {
  type plug
  slave.pcm {
    @func getenv
    vars [ ALSAPCM ]
    default "hw:UD501"
  }
}

aplay -l and aplay -L output after a reboot:

**** List of PLAYBACK Hardware Devices ****
card 0: ST [Xonar ST], device 0: Multichannel [Multichannel]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ST [Xonar ST], device 1: Digital [Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: UD501 [TEAC UD-501], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
sysdefault:CARD=ST
    Xonar ST, Multichannel
    Default Audio Device
front:CARD=ST,DEV=0
    Xonar ST, Multichannel
    Front speakers
surround40:CARD=ST,DEV=0
    Xonar ST, Multichannel
    4.0 Surround output to Front and Rear speakers
surround41:CARD=ST,DEV=0
    Xonar ST, Multichannel
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=ST,DEV=0
    Xonar ST, Multichannel
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=ST,DEV=0
    Xonar ST, Multichannel
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=ST,DEV=0
    Xonar ST, Multichannel
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=ST,DEV=0
    Xonar ST, Multichannel
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    HDMI Audio Output
sysdefault:CARD=UD501
    TEAC UD-501, USB Audio
    Default Audio Device
front:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    Front speakers
surround40:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    IEC958 (S/PDIF) Digital Audio Output

default no longer shows in the list of devices, but speaker-test -c2 uses default if no device is given and this works. However, specifying a format or rate other than what it uses by default result in an error message that "Format (null) is not supported".

Speaker-test to device front:CARD=UD501,DEV=0 or iec958:CARD=UD501,DEV=0 doesn't work at all: "Setting of hwparams failed: Invalid argument".

Any ideas what is going wrong here?

Thanks again.

Offline

#7 2014-05-10 10:31:53

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

Re: [Solved] Exclusive soundcard use

Your conf is bizarre. To output straight from ALSA to hardware, use e.g.:

pcm.!default {
    type hw
    card UD501
    device 0
}

ctl.!default {
    type hw
    card UD501
    device 0
}

Of course, this only affects the PCM named "default" (which is the most common), and no other PCM that apps might try to use - something to bear in mind wink

Offline

#8 2014-05-10 12:39:46

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [Solved] Exclusive soundcard use

mouseman wrote:

Maybe pulse isn't loaded at all. I only have libpulse installed, no other pulse related packages.

ps aux | grep pulse doesn't show any processes.

aplay -L does show pulse as a device, which led me to believe pulse was active but it looks like that's incorrect?

speaker-test -Dpulse -c2 gives an error:

Playback device is pulse
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Playback open error: -111,Connection refused

Package pulseaudio-alsa provides that device (and screws up the pcm.default configuration). Why did you state then, that you cannot remove pulseaudio?

mouseman wrote:

I created /etc/asound.conf with the following contents:

cat /etc/asound.conf 
pcm.name {
  type hw
  card UD501
  device 0
}

pcm.!default {
  type plug
  slave.pcm {
    @func getenv
    vars [ ALSAPCM ]
    default "hw:UD501"
  }
}

I would just create a new pcm device in ~/.asoundrc (it takes precedence) and leave pcm.default alone. The pcm.default already uses environment variables (lookup /usr/share/alsa/pcm/default.conf) ALSA_PCM_CARD and ALSA_CARD (which are also listed on the alsa wiki), so there no need for creating new ones.

cat ~/.asoundrc
pcm.ud501 {
  type hw
  card UD501
  device 0
  subdevice 0
  channels 2
}
mouseman wrote:

aplay -l and aplay -L output after a reboot:
[...]
default no longer shows in the list of devices, but speaker-test -c2 uses default if no device is given and this works. However, specifying a format or rate other than what it uses by default result in an error message that "Format (null) is not supported".

Speaker-test to device front:CARD=UD501,DEV=0 or iec958:CARD=UD501,DEV=0 doesn't work at all: "Setting of hwparams failed: Invalid argument".

Any ideas what is going wrong here?

Thanks again.

It does not show any more since you have overwritten quite a bit of code. To show a device you need at least to define key pcm.<name>.hint.description. The (type hw) device accepts only what you specified, it does not support conversion. You should be testing your newly created device (pcm.name or pcm.ud501).
IEC958 also accepts 4 other variables setting the proper format, which I assume in your case will be different than usual, because of DSD. There is also a tool iecset from alsa-utils package. Does the DAC also have an iec958 output? Or is this used to communicate with the DAC?

By the way, does your Sonar output surround properly? It shows only the one device for all combinations.

Offline

#9 2014-05-10 14:03:37

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [Solved] Exclusive soundcard use

emeres wrote:

Package pulseaudio-alsa provides that device (and screws up the pcm.default configuration).

I never had pulseaudio-alsa installed, only libpulse.

emeres wrote:

Why did you state then, that you cannot remove pulseaudio?

Because I thought libpulse provided the base for pulse audio and I had that device called pulse. I only have the package libpulse installed.

When I said I couldn't remove pulse, I meant libpulse and not pulseaudio. Sorry for this confusion I should have been more specific.

emeres wrote:

I would just create a new pcm device in ~/.asoundrc (it takes precedence) and leave pcm.default alone. The pcm.default already uses environment variables (lookup /usr/share/alsa/pcm/default.conf) ALSA_PCM_CARD and ALSA_CARD (which are also listed on the alsa wiki), so there no need for creating new ones.

cat ~/.asoundrc
pcm.ud501 {
  type hw
  card UD501
  device 0
  subdevice 0
  channels 2
}

Alright, I just did that. I also removed /etc/asound.conf (there was none before, I created it with my previous post). I rebooted. The default device is back and its set to UD501 according to aplay -L. Except, when I play to default, its playing to CARD=ST.

Shouldn't I now have a device starting with "hw:"?

aplay -L now outputs:

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default:CARD=ST
    Xonar ST, Multichannel
    Default Audio Device
sysdefault:CARD=ST
    Xonar ST, Multichannel
    Default Audio Device
front:CARD=ST,DEV=0
    Xonar ST, Multichannel
    Front speakers
surround40:CARD=ST,DEV=0
    Xonar ST, Multichannel
    4.0 Surround output to Front and Rear speakers
surround41:CARD=ST,DEV=0
    Xonar ST, Multichannel
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=ST,DEV=0
    Xonar ST, Multichannel
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=ST,DEV=0
    Xonar ST, Multichannel
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=ST,DEV=0
    Xonar ST, Multichannel
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=ST,DEV=0
    Xonar ST, Multichannel
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    HDMI Audio Output
default:CARD=UD501
    TEAC UD-501, USB Audio
    Default Audio Device
sysdefault:CARD=UD501
    TEAC UD-501, USB Audio
    Default Audio Device
front:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    Front speakers
surround40:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=UD501,DEV=0
    TEAC UD-501, USB Audio
    IEC958 (S/PDIF) Digital Audio Output

speaker-test -Dfront:CARD=UD501,DEV=0 -c2 -FS32_LE # no longer works

speaker-test 1.0.27.2

Playback device is front:CARD=UD501,DEV=0
Stream parameters are 48000Hz, S32_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 16 to 131072
Period size range from 8 to 65536
Using max buffer size 131072
Periods = 4
Unable to set hw params for playback: No such device or address
Setting of hwparams failed: No such device or address

speaker-test -Ddefault -c2 -FS32_LE # works, but uses ST (the Xonar ST) contrary to what I'd expect from aplay -L.

After the reboot, this worked:

$ speaker-test -Dud501 -c2 -F S32_LE

speaker-test 1.0.27.2

Playback device is ud501
Stream parameters are 48000Hz, S32_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 16 to 131072
Period size range from 8 to 65536
Using max buffer size 131072
Periods = 4
was set period_size = 32768
was set buffer_size = 131072
 0 - Front Left
 1 - Front Right
Time per period = 2.735038
 0 - Front Left
 1 - Front Right
^CTime per period = 5.277626

But now, while I'm typing my reply, it no longer works:

$ speaker-test -Dud501 -c2 -F S32_LE

speaker-test 1.0.27.2

Playback device is ud501
Stream parameters are 48000Hz, S32_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 16 to 131072
Period size range from 8 to 65536
Using max buffer size 131072
Periods = 4
Unable to set hw params for playback: No such device or address
Setting of hwparams failed: No such device or address
emeres wrote:

IEC958 also accepts 4 other variables setting the proper format, which I assume in your case will be different than usual, because of DSD. There is also a tool iecset from alsa-utils package. Does the DAC also have an iec958 output? Or is this used to communicate with the DAC?

IEC958 is only for S/PDIF connections isn't it? It has 2 optical and 2 coaxial inputs which I don't use and which shouldn't be visible from my PC. The DAC is connected to the PC via USB. Output is analog to my amplifier.

So, I have no idea why that device shows up. I suppose for the same reason it shows all the surround devices for the UD501 which it doesn't support?

emeres wrote:

By the way, does your Sonar output surround properly? It shows only the one device for all combinations.

I don't know, I never used it. I only use the 2-channel analog speaker and headphones out on the Xonar.

Cheers for the help guys!

Offline

#10 2014-05-10 14:44:05

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [Solved] Exclusive soundcard use

mouseman wrote:

Shouldn't I now have a device starting with "hw:"?

No. When you call a card/device specifying hw:CARD or front:CARD you are delivering arguments to those pcm "devices", which actually create a new device with those arguments as their settings, and then use them. So calling hw:ST is the same as creating a type hw definition in alsa configuration where card has the value "ST". Again, only definitions with hint.description keys are shown.
So do you want the ud501 to be your default device for all sound? Because I lost the track now. I thought you wanted to have exclusive sound put out to your DAC with JMC. If you start JMC with:

env ALSA_PCM_CARD=ud501 /usr/bin/jmc

it should use the definition I suggested and therefore be exclusive, nothing else would output sound to your DAC, but could output sound to the ST or HDMI. And if you want it to be default then simply stating following in ~/.asoundrc should be sufficient:

defaults.pcm.card "UD501";
#This keeps dmix intact, otherwise use what brebs suggested

Anyway, try adding 'nonblock 0' to pcm.ud501. Run speaker-test with specified loops (-l 4 for example). If you can use our DAC only once, then there is something wrong (maybe the module [model]).
Oversimplifying IEC958 is a standard that defines digital audio connections/protocols, also for S/PDIF.

Offline

#11 2014-05-10 15:52:37

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [Solved] Exclusive soundcard use

emeres wrote:
mouseman wrote:

Shouldn't I now have a device starting with "hw:"?

No. When you call a card/device specifying hw:CARD or front:CARD you are delivering arguments to those pcm "devices", which actually create a new device with those arguments as their settings, and then use them. So calling hw:ST is the same as creating a type hw definition in alsa configuration where card has the value "ST". Again, only definitions with hint.description keys are shown.
So do you want the ud501 to be your default device for all sound? Because I lost the track now. I thought you wanted to have exclusive sound put out to your DAC with JMC. If you start JMC with:

env ALSA_PCM_CARD=ud501 /usr/bin/jmc

it should use the definition I suggested and therefore be exclusive, nothing else would output sound to your DAC, but could output sound to the ST or HDMI. And if you want it to be default then simply stating following in ~/.asoundrc should be sufficient:

defaults.pcm.card "UD501";
#This keeps dmix intact, otherwise use what brebs suggested

Anyway, try adding 'nonblock 0' to pcm.ud501. Run speaker-test with specified loops (-l 4 for example). If you can use our DAC only once, then there is something wrong (maybe the module [model]).
Oversimplifying IEC958 is a standard that defines digital audio connections/protocols, also for S/PDIF.

Preferably, ST or any other device except UD501 would be the default. I don't care if other applications then use default, ST or whatever, as long as they can't use UD501 while JMC is using it. When I play music via the DAC, I don't want any other sounds coming through. Also, the device JMC uses should be direct with no mixer in between.

Unfortunately JMC doesn't use the variables, I need to pick a device from a list within the application. This list mirrors aplay -L.

I've been trying to get this hw: in the list using that hint.description as you suggested, but I don't know how that works. I'm searching for example config files and I've been reading on alsa-project.org. So far I've been unable to figure it out sad.

So, in short,
a hw: device needs to show up in aplay -L so I can choose it in JMC.
Default should not be set to UD501.
No mixer should interfere with the hw: device
hw: device should be single use only

I think I can manage the default (its in the wiki under ALSA) using /etc/modprobe.d/alsa-base.conf unless its better to do that in .asoundrc too?

Thanks for being patient with me!

Offline

#12 2014-05-10 16:32:27

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [Solved] Exclusive soundcard use

Aha, so what I suggested should work for you in theory, we have to change a little bit. Can you select the "default ALSA device" or something similar in JMC? If yes, then the variable ALSA_PCM_CARD should work, since it sets the default device, set it to UD501, because that is the cards identification (it has nothing to do with pcms). When used in combination with the default device, your previous setup with the variable should work, since it points to pcms not sound cards like defaults.pcm.card does.

pcm.ud501hw {	slave.pcm { 	type hw;
				card "UD501";
				device 0;	}	}

pcm.ud501 {		type empty;
                        slave.pcm "ud501hw";
                        hint {  show on;
			description "UD501 USB DAC";	}	}

It took me some time to figure out, that apparently nesting within slave.pcm and using hint does not show the device.
Now I understand where you get those device names, you just copy them from aplay -L.

mouseman wrote:

I think I can manage the default (its in the wiki under ALSA) using /etc/modprobe.d/alsa-base.conf unless its better to do that in .asoundrc too?

That depends, if you use a more sophisticated alsa configuration, you can stay with asoundrc only. If you plan to use a sound server like pulseaudio, it may be better to use modules. The modules method works, because defaults.pcm.card is set to 0, so when a specified card is loaded as the first one (index=0), then it is the default one. There is an example of using defaults.pcm node, extensively explained on the wiki.
I use both, reorder my main card to 3rd place, use jack daemon on it, reorder hdmi to 2nd, and use my integral hda as 1st and alsa default through configuration.

Last edited by emeres (2014-05-10 16:35:28)

Offline

#13 2014-05-11 09:57:06

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [Solved] Exclusive soundcard use

I added that to .asoundrc and set default to ST. It looks like this:

$ cat .asoundrc 
pcm.!default {
	type hw
	card ST
	device 0
	subdevice 0
}

ctl.!default {
	type hw           
	card ST
	device 0
	subdevice 0
}

pcm.ud501hw {	slave.pcm { 	type hw;
				card "UD501";
				device 0;	}	}

pcm.ud501 {		type empty;
                        slave.pcm "ud501hw";
                        hint {  show on;
			description "UD501 USB DAC";	}	}

Default seems to work fine.

Unfortunately when I try speaker-test with ud501 I get:

$ speaker-test -c2 -Dud501 -r44100 -FS32_LE

speaker-test 1.0.27.2

Playback device is ud501
Stream parameters are 44100Hz, S32_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm.c:2109:(snd_pcm_open_conf) type is not defined
Playback open error: -2,No such file or directory

Last edited by mouseman (2014-09-16 19:06:59)

Offline

#14 2014-05-11 10:01:47

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [Solved] Exclusive soundcard use

I used type empty during troubleshooting the hint section, where it does not matter if audio actually works, try type plug. The slave.pcm nest in ud501hw seems also unnecessary.

Last edited by emeres (2014-05-11 10:05:16)

Offline

#15 2014-05-11 10:34:52

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [Solved] Exclusive soundcard use

Ha, now it works smile.

For the sake of completeness, this is in my .asoundrc now:

pcm.ud501hw {	type hw;
		card "UD501";
		device 0;
		subdevice 0;	}

pcm.ud501 {	type plug;
                slave.pcm "ud501hw";
                hint {  show on;
		description "Teac UD501 USB DAC";	}	}

JMC can select the device and use it. Nothing seems to be able to interfere and volume can now only be controlled from within JMC. Perfect!

Many thanks for your help emeres!

Offline

#16 2014-05-11 10:40:35

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [Solved] Exclusive soundcard use

Glad I could help.

Offline

Board footer

Powered by FluxBB