[pulseaudio-discuss] PULSEAUDIO and ALSA cooperation problem - Failed to find a working profile

Przemek Gajos Przemek.Gajos at datapath.co.uk
Tue Feb 17 05:16:55 PST 2015


Hello Alexander,

Thank you for the response.

I managed to fix "Failed to find a working profile" problem. In my ALSA driver, when the new PCM instance is created, a device number is passed snd_pcm_new(). Before, I was passing card->number, which resulted in devices like:
hw:0,0
hw:1,1
hw:2,2
etc.

Obviously this was my fault in the driver and PULSEAUDIO did not like it (is it querying for device numbers starting from 0? This would explain the behaviour of failing to find the working profile).

So there is progress but still I cannot record from my ALSA device with PULSEAUDIO. It looks like PULSEAUDIO does not recognise my device as an audio capture source so I suppose there may be something missing in my driver which would make PULSEAUDIO recognise it.

When I use:
       $ pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d" " -f2
The output shows the following, which are on-board devices and do not use my driver:
      alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
      alsa_input.pci-0000_00_1b.0.analog-stereo

Therefore, it can be seen from the above that my devices are not listed as capture sources.

When I use:
      $ pactl list
The output, among others, shows 'my' ALSA cards. Please see below 2 exemplary outputs: (1) for an on-board card (which does not use my driver) and (2) for the card which uses my driver:
(1) On-board card
 Card #0
	Name: alsa_card.pci-0000_00_1b.0
	Driver: module-alsa-card.c
	Owner Module: 4
	Properties:
		alsa.card = "10"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xfbf20000 irq 67"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card10"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "10"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Profiles:
		output:analog-stereo: Analogue Stereo Output (sinks: 1, sources: 0, priority. 6000)
		output:analog-stereo+input:analog-stereo: Analogue Stereo Duplex (sinks: 1, sources: 1, priority. 6060)
		output:analog-surround-40: Analogue Surround 4.0 Output (sinks: 1, sources: 0, priority. 700)
		output:analog-surround-40+input:analog-stereo: Analogue Surround 4.0 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 760)
		output:analog-surround-41: Analogue Surround 4.1 Output (sinks: 1, sources: 0, priority. 800)
		output:analog-surround-41+input:analog-stereo: Analogue Surround 4.1 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 860)
		output:analog-surround-50: Analogue Surround 5.0 Output (sinks: 1, sources: 0, priority. 700)
		output:analog-surround-50+input:analog-stereo: Analogue Surround 5.0 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 760)
		output:analog-surround-51: Analogue Surround 5.1 Output (sinks: 1, sources: 0, priority. 800)
		output:analog-surround-51+input:analog-stereo: Analogue Surround 5.1 Output + Analogue Stereo Input (sinks: 1, sources: 1, priority. 860)
		input:analog-stereo: Analogue Stereo Input (sinks: 0, sources: 1, priority. 60)
		off: Off (sinks: 0, sources: 0, priority. 0)
	Active Profile: output:analog-stereo+input:analog-stereo
	Ports:
		analog-output: Analogue Output (priority 9900)
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40, output:analog-surround-40+input:analog-stereo, output:analog-surround-41, output:analog-surround-41+input:analog-stereo, output:analog-surround-50, output:analog-surround-50+input:analog-stereo, output:analog-surround-51, output:analog-surround-51+input:analog-stereo
		analog-input-microphone: Microphone (priority 8700)
			Part of profile(s): output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, input:analog-stereo
		analog-input-linein: Line In (priority 8100)
			Part of profile(s): output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo, output:analog-surround-41+input:analog-stereo, output:analog-surround-50+input:analog-stereo, output:analog-surround-51+input:analog-stereo, input:analog-stereo

(2) One of my cards:
Card #11
	Name: alsa_card.1
	Driver: module-alsa-card.c
	Owner Module: 31
	Properties:
		alsa.card = "1"
		alsa.card_name = "OEM_VISIONRGB_AV"
		alsa.long_card_name = "OEM_VISIONRGB_AV Analog DGC dada"
		device.bus_path = "/devices/virtual/sound/card1"
		sysfs.path = "/devices/virtual/sound/card1"
		device.string = "1"
		device.description = "OEM_VISIONRGB_AV"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Profiles:
		input:analog-stereo: Analogue Stereo Input (sinks: 0, sources: 1, priority. 60)
		off: Off (sinks: 0, sources: 0, priority. 0)
	Active Profile: input:analog-stereo
	Ports:
		analog-input: Analogue Input (priority 10000)
			Part of profile(s): input:analog-stereo
 

Notice that the Name fields are much different in their form between my card and the on-board one. I tested that:
- capturing from alsa_card.pci-0000_00_1b.0 (on_board card) works correctly.
- it fails to capture from alsa_card.1 (my card).

I do apologise for this verbose message. Nonetheless, does the above ring a bell?

My card is a stereo capture card.

Kind regards,
Przemek Gajos

-----Original Message-----
From: pulseaudio-discuss [mailto:pulseaudio-discuss-bounces at lists.freedesktop.org] On Behalf Of Alexander E. Patrakov
Sent: 16 February 2015 17:41
To: General PulseAudio Discussion
Subject: Re: [pulseaudio-discuss] PULSEAUDIO and ALSA cooperation problem - Failed to find a working profile

16.02.2015 20:10, Przemek Gajos wrote:
> przemek-12 pulseaudio[1991]: [pulseaudio] module-alsa-card.c: Failed 
> to find a working profile.

This message indicates that PulseAudio could not find out an ALSA device that opens and provides the correct channel map without the plug layer. 
You can look into
/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf to see which device strings are tried with which channel map.

Also please note that there was an important improvement in PulseAudio
6.0 regarding devices that can only be opened with the "hw:X" device and with more than two channels. Previously, they would produce an error message that is the same as yours. So maybe it is a good idea to try the latest version?

If that doesn't help, then we need more information about the hardware. 
Is it a stereo or multichannel card? Is it a USB audio card? If it can do 5.1 audio, what does the following command produce?

aplay -vv -f dat -d 1 -D surround51:9 /dev/zero

--
Alexander E. Patrakov
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com ______________________________________________________________________

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________


More information about the pulseaudio-discuss mailing list