Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SplitPCM devices missing profiles since 1.2.10 #346

Closed
freswa opened this issue Sep 4, 2023 · 14 comments
Closed

SplitPCM devices missing profiles since 1.2.10 #346

freswa opened this issue Sep 4, 2023 · 14 comments

Comments

@freswa
Copy link

freswa commented Sep 4, 2023

When updating t 1.2.10 the profile Analog Stereo Output + Inputs is gone. Instead I get a Surround ... profile, which doesn't work at all.

Downgrading alsa, alsa-ucm-conf and alsa-lib from 1.2.10 to 1.2.9 fixes the issue.

I'm on Kernel 6.5.1 with Pipewire backend.

@perexg
Copy link
Member

perexg commented Sep 4, 2023

Could you try to downgrade only alsa-ucm-conf ? But there are no related changes in the config files.

Show alsaucm -c hw:0 dump text output (replace zero with the motu card number - see aplay -l) for 1.2.10.

@freswa
Copy link
Author

freswa commented Sep 4, 2023

Only alsa-ucm-conf on 1.2.9:

Verb.HiFi {
	Comment "Analog Stereo Outputs + Inputs"
	Device.Line1 {
		Comment "Headphone + Monitor Out"
		Values {
			CaptureCTL "_ucm0001.hw:M4"
			PlaybackCTL "_ucm0001.hw:M4"
			PlaybackChannels 2
			PlaybackPCM "_ucm0001.m4_stereo_out:M4,0,0,1"
			PlaybackPriority 200
		}
	}
	Device.Line2 {
		Comment "Line Out"
		Values {
			CaptureCTL "_ucm0001.hw:M4"
			PlaybackCTL "_ucm0001.hw:M4"
			PlaybackChannels 2
			PlaybackPCM "_ucm0001.m4_stereo_out:M4,0,2,3"
			PlaybackPriority 100
		}
	}
	Device.Mic1 {
		Comment "Mic In 1L"
		ConflictingDevices [
			Mic3
		]
		Values {
			CaptureCTL "_ucm0001.hw:M4"
			CaptureChannels 1
			CapturePCM "_ucm0001.m4_mono_in:M4,0,0"
			CapturePriority 200
			PlaybackCTL "_ucm0001.hw:M4"
		}
	}
	Device.Mic2 {
		Comment "Mic In 2R"
		ConflictingDevices [
			Mic3
		]
		Values {
			CaptureCTL "_ucm0001.hw:M4"
			CaptureChannels 1
			CapturePCM "_ucm0001.m4_mono_in:M4,0,1"
			CapturePriority 100
			PlaybackCTL "_ucm0001.hw:M4"
		}
	}
	Device.Line3 {
		Comment "Line In L"
		ConflictingDevices [
			Line5
		]
		Values {
			CaptureCTL "_ucm0001.hw:M4"
			CaptureChannels 1
			CapturePCM "_ucm0001.m4_mono_in:M4,0,2"
			CapturePriority 100
			PlaybackCTL "_ucm0001.hw:M4"
		}
	}
	Device.Line4 {
		Comment "Line In R"
		ConflictingDevices [
			Line5
		]
		Values {
			CaptureCTL "_ucm0001.hw:M4"
			CaptureChannels 1
			CapturePCM "_ucm0001.m4_mono_in:M4,0,3"
			CapturePriority 100
			PlaybackCTL "_ucm0001.hw:M4"
		}
	}
	Device.Mic3 {
		Comment "Stereo Mic In 1L+1R"
		ConflictingDevices [
			Mic2,
			Mic1
		]
		Values {
			CaptureCTL "_ucm0001.hw:M4"
			CaptureChannels 2
			CapturePCM "_ucm0001.m4_stereo_in:M4,0,0,1"
			CapturePriority 100
			PlaybackCTL "_ucm0001.hw:M4"
		}
	}
	Device.Line5 {
		Comment "Stereo Line In L+R"
		ConflictingDevices [
			Line4,
			Line3
		]
		Values {
			CaptureCTL "_ucm0001.hw:M4"
			CaptureChannels 2
			CapturePCM "_ucm0001.m4_stereo_in:M4,0,2,3"
			CapturePriority 100
			PlaybackCTL "_ucm0001.hw:M4"
		}
	}
}
Verb.Direct {
	Comment "Direct M4"
	Device.Direct {
		Comment "Direct M4"
		Values {
			CaptureCTL "_ucm0001.hw:M4"
			CaptureChannels 4
			CapturePCM "_ucm0001.hw:M4"
			CapturePriority 1000
			PlaybackCTL "_ucm0001.hw:M4"
			PlaybackChannels 4
			PlaybackPCM "_ucm0001.hw:M4"
			PlaybackPriority 1000
		}
	}
}

alsa-ucm-conf on 1.2.10:

ALSA lib ucm_subs.c:807:(uc_mgr_get_substituted_value) variable '${var:__Device}' is not defined in this context!
ALSA lib parser.c:2024:(parse_verb_file) error: /USB-Audio/MOTU/M4-HiFi.conf failed to parse device
ALSA lib main.c:1554:(snd_use_case_mgr_open) error: failed to import hw:3 use case configuration -22
alsaucm: error failed to open sound card hw:3: Invalid argument

perexg added a commit that referenced this issue Sep 4, 2023
Link: #346
Fixes: 10967ea ("SplitPCM: Fix Device variable in SplitPCMDevice macro")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg
Copy link
Member

perexg commented Sep 4, 2023

Could you test the above one character fix (b68aa52) ?

@freswa
Copy link
Author

freswa commented Sep 4, 2023

Works for me

@CameronNemo
Copy link
Contributor

CameronNemo commented Oct 2, 2023

Just updated to 1.2.10. I have a separate device but the same error.

ALSA lib ucm_subs.c:807:(uc_mgr_get_substituted_value) variable '${var:__Device}' is not defined in this context!
ALSA lib parser.c:2024:(parse_verb_file) error: /USB-Audio/Steinberg/UR44-HiFi.conf failed to parse device
ALSA lib main.c:1554:(snd_use_case_mgr_open) error: failed to import hw:2 use case configuration -22
ALSA lib parser.c:2965:(uc_mgr_scan_master_configs) Unable to open '-hw:2': Invalid argument
alsaucm: error failed to get card list: Invalid argument

I edited the config manually in the same manner as the patch and it fixed the issue. Note there are some other __Device var references later in SplitPCM... not sure if that needs updating.

@nodens
Copy link

nodens commented Oct 13, 2023

FYI, same issue with Arturia Minifuse 2, applying the change locally fixes it. I guess it affects all cards using split.conf.

@kepstin
Copy link
Contributor

kepstin commented Nov 14, 2023

Yeah, appears to affect many cards that use SplitPCM. I was using 1.2.9 with #309 applied to add support for my Scarlett Solo, and was quite confused after upgrading to 1.2.10 where despite the configuration being merged, it was no longer being applied.

I ended up adding the patch b68aa52 to the Exherbo distribution package for alsa-ucm-conf to fix the issue for all our users, but I'd really appreciate a bugfix release of alsa-ucm-conf which includes this fix (and I assume package maintainers on other distros would too).

@CameronNemo
Copy link
Contributor

Just to clarify the scope/impact here, because the title only says Motu M4: this seems to affect anything using SplitPCM, so this is probably 19 different models of USB audio interface.

~> rg -l SplitPCM /usr/share/alsa/ucm2/ | wc -l
20
~> rg -l SplitPCM /usr/share/alsa/ucm2
/usr/share/alsa/ucm2/USB-Audio/NativeInstruments/Traktor-Kontrol-Z1-Mixer.conf
/usr/share/alsa/ucm2/USB-Audio/Audient/Audient-iD4-HiFi-0003.conf
/usr/share/alsa/ucm2/USB-Audio/Steinberg/UR44-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/Steinberg/UR24C-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/Audient/Audient-iD4-HiFi-0009.conf
/usr/share/alsa/ucm2/USB-Audio/Roland/BridgeCast-Hifi.conf
/usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf
/usr/share/alsa/ucm2/USB-Audio/Arturia/Minifuse-4-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/Arturia/Minifuse-12-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/Digidesign/Digidesign-Mbox-3-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/Behringer/UMC204HD-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/Behringer/UMC202HD-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/Behringer/Flow8-Recording-Hifi.conf
/usr/share/alsa/ucm2/USB-Audio/Behringer/Flow8-Streaming-Hifi.conf
/usr/share/alsa/ucm2/USB-Audio/MOTU/M2-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/UniversalAudio/Volt2-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/MOTU/M4-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/Focusrite/Scarlett-2i-HiFi.conf
/usr/share/alsa/ucm2/USB-Audio/GoXLR/GoXLR-HiFi.conf
/usr/share/alsa/ucm2/common/pcm/split.conf

sarnold pushed a commit to VCTLabs/alsa-ucm-conf that referenced this issue Nov 30, 2023
Link: alsa-project#346
Fixes: 10967ea ("SplitPCM: Fix Device variable in SplitPCMDevice macro")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@maxhille
Copy link

maxhille commented Jan 5, 2024

@perexg It'll soon be half a year since this was fixed. Distributions on 1.2.10 have broken audio and some non-rolling distros will prep their spring releases in the coming weeks. It would be wonderful to get a 1.2.11

@maxhille
Copy link

maxhille commented Jan 5, 2024

@freswa Could you edit this issue's title to reflect that all SplitPCM devices are affected?

@freswa freswa changed the title Motu M4 missing profiles since 1.2.10 SplitPCM devices missing profiles since 1.2.10 Jan 5, 2024
@Slabity
Copy link

Slabity commented Mar 3, 2024

Any update on this? It looks like the patch to fix this has been applied, but my audio setup is still completely broken with profiles not splitting relevant Input/Outputs and causing applications to fail to use the correct devices:

Good profiles:

goodaudiooutput

Bad profiles:

badaudiooutputs

Unless this is irrelevant to this issue, in which case I'll open up a different issue.

@kepstin
Copy link
Contributor

kepstin commented Mar 3, 2024

@Slabity the list of profiles that you have under "Bad profiles" is the expected profiles that should be available on a Scarlett Solo device. If you select the profile "Default", then it will split the input into two separate mono inputs, labelled "Input 1 Mic" and "Input 2 Inst/Line". You will have a single stereo output labelled "Headphones / Line 1-2".

From your output, the profiles are correctly being applied - if you have an issue with what the profile is doing, please file a separate issue.

This issue should probably be closed, since the fix is in released version 1.2.11.

@Slabity
Copy link

Slabity commented Mar 3, 2024

@kepstin - Yes, "Default" will do what you are describing, but the problem is I do not want the "Headphones / Line 1-2" output to appear at all with no way of disabling it. I only use this device as a mic input, and when that output exists then various applications try to use it as the primary output device for some reason.

For years I have been able to simply select "Digital Stereo (IEC958) Input" and it has allowed me to expose only the input device and everything works smoothly. Only the past 2-3 weeks has this changed and removed the different profiles. I was told on a Matrix chat that the change in behavior was likely part of this issue but it sounds like it's unrelated? If so then I'll open a new issue.

@perexg
Copy link
Member

perexg commented Mar 4, 2024

Closing as already fixed in 1.2.11.

@perexg perexg closed this as completed Mar 4, 2024
ninelore pushed a commit to ninelore/alsa-ucm-conf-cros that referenced this issue Jun 10, 2024
Link: alsa-project#346
Fixes: 10967ea ("SplitPCM: Fix Device variable in SplitPCMDevice macro")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants