You are not logged in.

#1 2014-04-14 12:59:08

EvanPurkhiser
Member
From: San Francisco
Registered: 2010-08-17
Posts: 225
Website

[Solved] ALSA "This sound device does not have any controls" XDJ-R1

Hey guys,

I have a XDJ-R1 which includes a 24bit 44.1khz USB soundcard that can be used to record audio from the mixer.

When I plug it in it's detected fine. However using alsamixer (or amixer) I don't see any audio controls for volume.

If I start pulseaudio it will detect the device just fine. However, at 100% volume the audio seems rather low. I'm seeing about -24db while my mixer shows the output at around +2db. I suspect the ALSA volume is rather low. But have no way of changing it as I can't seem to see any controls!

Here are some command outputs:

alpaly -l

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC269 Analog [ALC269 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: XDJR1 [PIONEER XDJ-R1], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

aplay -L

null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=Intel
    HDA Intel, ALC269 Analog
    Default Audio Device
sysdefault:CARD=Intel
    HDA Intel, ALC269 Analog
    Default Audio Device
front:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    Front speakers
surround40:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
    HDA Intel, ALC269 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
default:CARD=XDJR1
    PIONEER XDJ-R1, USB Audio
    Default Audio Device
sysdefault:CARD=XDJR1
    PIONEER XDJ-R1, USB Audio
    Default Audio Device
front:CARD=XDJR1,DEV=0
    PIONEER XDJ-R1, USB Audio
    Front speakers
surround40:CARD=XDJR1,DEV=0
    PIONEER XDJ-R1, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=XDJR1,DEV=0
    PIONEER XDJ-R1, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=XDJR1,DEV=0
    PIONEER XDJ-R1, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=XDJR1,DEV=0
    PIONEER XDJ-R1, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=XDJR1,DEV=0
    PIONEER XDJ-R1, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=XDJR1,DEV=0
    PIONEER XDJ-R1, USB Audio
    IEC958 (S/PDIF) Digital Audio Output

amixer -c 1

(output is empty)

cat /proc/asound/devices

  2: [ 0- 0]: digital audio playback
  3: [ 0- 0]: digital audio capture
  4: [ 0- 0]: hardware dependent
  5: [ 0]   : control
  6: [ 1- 0]: raw midi
  7: [ 1- 0]: digital audio playback
  8: [ 1- 0]: digital audio capture
  9: [ 1]   : control
 33:        : timer

(with pulseaudio on) pacmd list-sources

3 source(s) available.

    .....

    index: 2
	name: <alsa_input.usb-Pioneer_PIONEER_XDJ-R1_PIONEER_XDJ-R1-00-XDJR1.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY 
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 9049
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max rewind: 0 KiB
	sample spec: s24le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 1
	fixed latency: 99.95 ms
	card: 1 <alsa_card.usb-Pioneer_PIONEER_XDJ-R1_PIONEER_XDJ-R1-00-XDJR1>
	module: 5
	properties:
		alsa.resolution_bits = "24"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "USB Audio"
		alsa.id = "USB Audio"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "1"
		alsa.card_name = "PIONEER XDJ-R1"
		alsa.long_card_name = "Pioneer PIONEER XDJ-R1 at usb-0000:00:1d.1-2, full speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:00:1d.1-usb-0:2:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0/sound/card1"
		udev.id = "usb-Pioneer_PIONEER_XDJ-R1_PIONEER_XDJ-R1-00-XDJR1"
		device.bus = "usb"
		device.vendor.id = "08e4"
		device.vendor.name = "Pioneer Corp."
		device.product.id = "0170"
		device.product.name = "PIONEER XDJ-R1"
		device.serial = "Pioneer_PIONEER_XDJ-R1_PIONEER_XDJ-R1"
		device.string = "front:1"
		device.buffering.buffer_size = "26448"
		device.buffering.fragment_size = "6612"
		device.access_mode = "mmap"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "PIONEER XDJ-R1 Analog Stereo"
		alsa.mixer_name = "USB Mixer"
		alsa.components = "USB08e4:0170"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	ports:
		analog-input: Analog Input (priority 10000, latency offset 0 usec, available: unknown)
			properties:
				
	active port: <analog-input>

What might I be missing? Why can PA figure the device out but ALSA can't?

Last edited by EvanPurkhiser (2014-04-16 09:27:13)

Offline

#2 2014-04-15 16:25:45

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

Either the soundcard has no built in volume control, or it isn't properly supported by alsa, or you need some hardcore .asoundrc tweaking to make it work.

you could probably work around this by setting up alsa's softvol plugin for the card

something like this might work, assuming the correct usb soundcard device is hw:1,0

pcm.!default {
    type            plug
    slave.pcm       "softvol"
}

pcm.softvol {
    type            softvol
    slave {
        pcm         "hw:1,0"
    }
    control {
        name        "Master"
        card        0
    }
    max_dB 20.0
    min_dB -51.0
}

Last edited by ooo (2014-04-15 16:26:20)

Offline

#3 2014-04-15 19:30:49

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

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

I could not find anything on xdj in [alsa] sources, probably it is only recognized because of its hda compliant codec. Maybe PA makes a better use of parsed information or there is code for it exclusive for PA. And if you configure alsa, use "XDJR1" as reference instead of numbers. Maybe hda-verb or hdajackretask could provide you more information/options. Also a look at the codecs datasheet might prove useful.

Offline

#4 2014-04-16 01:56:48

EvanPurkhiser
Member
From: San Francisco
Registered: 2010-08-17
Posts: 225
Website

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

Thanks for the replies guys.

ooo wrote:

you could probably work around this by setting up alsa's softvol plugin for the card

I've seen the soft volume plugin, for this particular case I'm not so much interested in being able to change the volume, as I am in making sure that the volume is at it's highest level in the hardware control.

Though I admit I don't have a full understanding of how digital audio works, so maybe something like this would be OK without degrading sound quality? Though I suspect this would increase the noise floor.

emeres wrote:

I could not find anything on xdj in [alsa] sources, probably it is only recognized because of its hda compliant codec. Maybe PA makes a better use of parsed information or there is code for it exclusive for PA. And if you configure alsa, use "XDJR1" as reference instead of numbers. Maybe hda-verb or hdajackretask could provide you more information/options. Also a look at the codecs datasheet might prove useful.

You're definitely right about their not being anything specific for this device. I'm sure it's using a generic driver. Thanks for the heads up on those utilities. I'll check them out.

Offline

#5 2014-04-16 03:03:51

EvanPurkhiser
Member
From: San Francisco
Registered: 2010-08-17
Posts: 225
Website

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

I've also noticed that the device doesn't have a `codec#*` file in the /proc/asound/XDJR1 directory

[netbook/XDJR1/]> tree
.
|-- id
|-- midi0
|-- pcm0c
|   |-- info
|   `-- sub0
|       |-- hw_params
|       |-- info
|       |-- status
|       `-- sw_params
|-- pcm0p
|   |-- info
|   `-- sub0
|       |-- hw_params
|       |-- info
|       |-- status
|       `-- sw_params
|-- stream0
|-- usbbus
|-- usbid
`-- usbmixer

4 directories, 16 files

I'm not sure exactly what this means, but it doesn't look like like the hda-analyzer.py script is seeing the device because of this.

Offline

#6 2014-04-16 03:07:10

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

EvanPurkhiser wrote:

I've seen the soft volume plugin, for this particular case I'm not so much interested in being able to change the volume, as I am in making sure that the volume is at it's highest level in the hardware control.

I see. In theory if the audio is 26dB lower you'll lose 26dB of dynamic range. 24bit audio has dynamic range of 144dB so the audible difference probably wont be that major, but it would still sound worse at least in theory.

I'm not quite sure, are you trying to record audio from the mixer, or use it as an external soundcard to play audio from your computer via the dj unit? What are you using for checking the audio levels?

In either case, you could also try if you had better luck using jack audio server.
I actually had similar issue with Traktor audio 6 which doesn't have any volume controls either, using pulseaudio with jackdbus and PA volume is very low compared to jack, so I was thinking maybe this could a PA bug/feature.

Strange if you can't play/record using bare alsa though

Offline

#7 2014-04-16 03:20:27

EvanPurkhiser
Member
From: San Francisco
Registered: 2010-08-17
Posts: 225
Website

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

I'm interested in recording from the mixer over USB.

The device also supports playback into the mixer, but I assume this is designed for use in conjunction with using the device as a MIDI-Controller, which I don't have any intentions of doing.

What I've been doing to check the levels of the device is to play a track through the device (making sure that the VU meter for the channel is peaking at around 0db), record using `ffmpeg -f pulse -i 1 recording.wav` and then running `ffmpeg -i recording.wav -af "volumedetect" -f null /dev/null`

Which looks something like this:

[Parsed_volumedetect_0 @ 0x1f0eb80] n_samples: 10265206
[Parsed_volumedetect_0 @ 0x1f0eb80] mean_volume: -26.1 dB
[Parsed_volumedetect_0 @ 0x1f0eb80] max_volume: -12.0 dB
[Parsed_volumedetect_0 @ 0x1f0eb80] histogram_12db: 21
[Parsed_volumedetect_0 @ 0x1f0eb80] histogram_13db: 238
[Parsed_volumedetect_0 @ 0x1f0eb80] histogram_14db: 1619
[Parsed_volumedetect_0 @ 0x1f0eb80] histogram_15db: 7703
[Parsed_volumedetect_0 @ 0x1f0eb80] histogram_16db: 29370

I actually _can_ record directly from alsa, but I have to tell it the format, rate, and channels of the device.

[netbook/scratch/]> arecord -D hw:1  test.wav
Recording WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
arecord: set_params:1233: Sample format non available
Available formats:
- S24_3LE

[netbook/scratch/]> arecord -D hw:1 -f S24_3LE test.wav   
Recording WAVE 'test.wav' : Signed 24 bit Little Endian in 3bytes, Rate 8000 Hz, Mono
arecord: set_params:1239: Channels count non available

[netbook/scratch/]> arecord -D hw:1 -f S24_3LE -c 2 test.wav
Recording WAVE 'test.wav' : Signed 24 bit Little Endian in 3bytes, Rate 8000 Hz, Stereo
Warning: rate is not accurate (requested = 8000Hz, got = 44100Hz)
         please, try the plug plugin

[netbook/scratch/]> arecord -D hw:1 -f S24_3LE -c 2 -r 44100 test.wav
Recording WAVE 'test.wav' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Stereo

The volume is still just as low as recording with PA though sad

Offline

#8 2014-04-16 04:36:34

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

EvanPurkhiser wrote:

What I've been doing to check the levels of the device is to play a track through the device (making sure that the VU meter for the channel is peaking at around 0db) ... Which looks something like this:

...
[Parsed_volumedetect_0 @ 0x1f0eb80] max_volume: -12.0 dB
...

so the volume is 'only' about 12dB lower which isn't that bad. It's also possible that the device adds some headroom to the output to prevent it from clipping. If so 12dB sounds alot but I guess it's reasonable especially on a DJ controller (I know there are so many djs that keep pumping up the volume no matter how distorted the sound gets)

Last edited by ooo (2014-04-16 04:38:02)

Offline

#9 2014-04-16 04:42:21

EvanPurkhiser
Member
From: San Francisco
Registered: 2010-08-17
Posts: 225
Website

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

You're probably right. I'm actually starting to suspect this thing really doesn't have any hardware controls that it exposes over USB.

I booted into windows to try out the device, I noticed at 100% volume in windows there is a ton of clipping. However if I set the volume level to 50%, which according to my brief googling is actually setting it to 0db (no attenuation or gain), andrecord the same track played back through the device and low and behold:

[Parsed_volumedetect_0 @ 0x6961a0] n_samples: 20951112
[Parsed_volumedetect_0 @ 0x6961a0] mean_volume: -26.8 dB
[Parsed_volumedetect_0 @ 0x6961a0] max_volume: -12.3 dB
[Parsed_volumedetect_0 @ 0x6961a0] histogram_12db: 7
[Parsed_volumedetect_0 @ 0x6961a0] histogram_13db: 105
[Parsed_volumedetect_0 @ 0x6961a0] histogram_14db: 1143
[Parsed_volumedetect_0 @ 0x6961a0] histogram_15db: 5352
[Parsed_volumedetect_0 @ 0x6961a0] histogram_16db: 19824

I guess at this point I'm going to turn this thread into more of an open question for audiophiles / audio engineers: Is there anything wrong with recording at these levels, then later 'mastering' (normalizing) the recording by increasing the volume to where the peak is 0db (basically like this)?

Thanks!

Last edited by EvanPurkhiser (2014-04-16 04:42:53)

Offline

#10 2014-04-16 06:05:12

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

Normalizing is perfectly ok. You can even add limiter to shave off some of the loudest peaks if there are any, and normalize even more.

the right way to record for best audio quality would be:
1. record in 24 bit
2. normalize / edit however you want
3. downsample final audio to 16bit with dithering (in audacity for example, just export to 16bit and it should use best dithering algorithm by default)

Offline

#11 2014-04-16 09:26:48

EvanPurkhiser
Member
From: San Francisco
Registered: 2010-08-17
Posts: 225
Website

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

Thanks. ooo,

I'll go ahead and mark this thread as solved.

My conclusion is that the XDJ-R1 doesn't have any in-hardware controls and outputs at a lower volume level, which can later be normalized.

Offline

#12 2014-04-16 10:18:02

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

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

For anything that has to do with audio, linux and is supposed to have at least mediocre audio quality use jack, like ooo suggested.
  Quality question always come down to signals path: it has to have the highest quality (most precise information) at the beginning, as little number of components along the path and as little (unintended) change as possible, everything else does not make sense (unless intended). Any information loss is undesirable right up to the end process of production, where conditioning for different formats takes place.
So if you are satisfied with what you get, then go ahead and normalize. If I may give an advice, try mastering yourself while keeping the original files (preferably recorded at hardware maximum parameters), then use one of many mastering services, which do have reasonable prices these days, and  compare the masters. It is good to train and gather experience yourself, but you probably will be more satisfied with a professional version.

EvanPurkhiser wrote:

My conclusion is that the XDJ-R1 doesn't have any in-hardware controls and outputs at a lower volume level, which can later be normalized.

I beg to differ, a look at the datasheet says, the ALC269 codec XDJ-R1 uses should be capable of putting two independent stereo signals with 24 bit resolution at a sample rate of 192 kHz with 98 dB SNR out and recording with similar parameters at 96 kHz also two independent stereo signals. There is volume control for input and output:

datasheet wrote:

1dB resolution of input and output volume control

Now obviously all of this depends on its hardware implementation, however I doubt Pioneer would just castrate a mixing tool of volume control, that does not make any sense.
I would try to speak to the codec with hda-verb, look at tables 26, 33, and especially at tables 43 and 44. At least try to mute channels or just read its current settings, there is documentation on hda-verb within alsas in sources.

Offline

#13 2014-04-16 10:23:28

EvanPurkhiser
Member
From: San Francisco
Registered: 2010-08-17
Posts: 225
Website

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

emeres,

Thanks for the response. Please excuse my ignorance, I've never delved very deep into the world of Linux audio. But the device doesn't appear to be loading any sort of codec.

At least, there is no "codec#*" file in `/proc/asound/XDJR1/`.

Am I wrong here?

Last edited by EvanPurkhiser (2014-04-16 10:28:54)

Offline

#14 2014-04-16 10:46:33

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

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

I would argue that, if kernel and alsa could not communicate with xdj-r1s codec, you would not be able to record anything. Since alc269 is hda compliant, basic functions seem to be in place for your model, and therefore speaking to codec using hda-verb should be possible. HD-Audio-Models.txt lists alc269 also:

HD-Audio-Models.txt wrote:

ALC269/270/275/276/28x/29x
======
  laptop-amic        Laptops with analog-mic input
  laptop-dmic        Laptops with digital-mic input
  alc269-dmic        Enable ALC269(VA) digital mic workaround
  alc271-dmic        Enable ALC271X digital mic workaround
  inv-dmic        Inverted internal mic workaround
  headset-mic        Indicates a combined headset (headphone+mic) jack
  lenovo-dock       Enables docking station I/O for some Lenovos
  dell-headset-multi    Headset jack, which can also be used as mic-in
  dell-headset-dock    Headset jack (without mic-in), and also dock I/O

Your particular model (hardware implementation), might not be fully supported, which explains lack of codec file and controls in alsamixer. Asking alsa devs should clear this up. But hardware capabilities are there and unless a completely unique implementation of this codec was used, volume control should be accessible.

By the way, what is the content of hw_params, info, status and sw_params for playback and capture?

Offline

#15 2014-04-16 10:50:33

EvanPurkhiser
Member
From: San Francisco
Registered: 2010-08-17
Posts: 225
Website

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

hw_params, status, and sw_params for both capture and playback are all "closed"

$ cat pcm0c/sub0/info 
card: 1
device: 0
subdevice: 0
stream: CAPTURE
id: USB Audio
name: USB Audio
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

$ cat pcm0p/sub0/info 
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: USB Audio
name: USB Audio
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

Edit: I just looked at the /proc/asoundrc/ tree for my USB headset that does have audio controls. It also does not have a "codec#*" file. Hmmm

Last edited by EvanPurkhiser (2014-04-16 10:58:59)

Offline

#16 2014-04-16 11:09:49

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

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

Here is documentation on hda-verb (at the end). If you choose to use it and get some results, let me know.

Offline

#17 2014-04-16 11:23:19

EvanPurkhiser
Member
From: San Francisco
Registered: 2010-08-17
Posts: 225
Website

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

hda-verb calls for a hwdep device file, however It doesn't look like there is a hwdep device file for the USB device, only for the onboard intel audio.

tree /dev/snd/
/dev/snd/
|-- by-id
|   `-- usb-Pioneer_PIONEER_XDJ-R1_PIONEER_XDJ-R1-00 -> ../controlC1
|-- by-path
|   |-- pci-0000:00:1b.0 -> ../controlC0
|   `-- pci-0000:00:1d.1-usb-0:2:1.0 -> ../controlC1
|-- controlC0
|-- controlC1
|-- hwC0D0
|-- midiC1D0
|-- pcmC0D0c
|-- pcmC0D0p
|-- pcmC1D0c
|-- pcmC1D0p
|-- seq
`-- timer

Last edited by EvanPurkhiser (2014-04-16 11:24:06)

Offline

#18 2014-04-16 23:19:07

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

Re: [Solved] ALSA "This sound device does not have any controls" XDJ-R1

Please provide following:

lspci -nn | grep -i audio; lspci -vvvv | grep -i audio -A 10

At this point I would prepare for alsa-user mailing list. If you ask nicely to get support for your device, they should help, you can link to this thread to provide some information and not to repeat yourself.
Or try it yourself. I would first look at patch_realtek.c in SOURCES/sound/pci/hda folder. There are all the ALCs.

Offline

Board footer

Powered by FluxBB