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

i have some technical issues with the Arturia minifuse 1 sound card. i would like help with converting the minifuse 2 UCM config to work with minifuse 1 #220

Closed
Ali32bit opened this issue Sep 30, 2022 · 17 comments

Comments

@Ali32bit
Copy link

greetings. so i have a sound card with multiple outputs and some loop back channels. it is USB complaint but those extra bells and whistles cause ALSA to think its a surround sound device when its actually just stereo. and this actually impacts the sound when i play games on it cause sounds from behind are basically muted. and thats the case with some music too but less obvious
here is what alsa_info generated for me too :

http://alsa-project.org/db/?f=b6db7723ffa65f32b93297109bf1f8e4d853cf4e

there should already be a minifuse 2 setup so if possible please adapt it to minifuse 1 or help me convert and install it myself. the hardware is mostly the same but it has 1 input instead of 2 and no extra midi ports in the back.

@Ali32bit Ali32bit changed the title issues with the Arturia minifuse 1 sound card. i would like help with converting the minifuse 2 UCM config to work with minifuse 1 i have some technical issues with the Arturia minifuse 1 sound card. i would like help with converting the minifuse 2 UCM config to work with minifuse 1 Oct 1, 2022
@nodens
Copy link

nodens commented Oct 6, 2022

Please try my branch from the PR above, which is my attempt at adding such support. I only have a Minifuse 2 handy and cannot test for this one. ;)
The idea here is that from UCM point of view, it's exactly the same as Minifuse 2 with one less input (and so no physical stereo input, but there is still a stereo loopback).

if that works for you I'll remove the Draft tag.

@nodens
Copy link

nodens commented Oct 10, 2022

Note: I've been in touch with @Ali32bit on Reddit, and they seem to have issues testing my fix, so:

Some more info to make it easier for you to test, also because it might help other people getting here after a web search:

  • get my branch from https://github.com/nodens/alsa-ucm-conf/tree/add_arturia_minifuse_1_use_case
  • copy the ucm2 tree to your system (probably /usr/share/alsa/ucm2, and of course it's probably better to make a backup beforehand, but it's easy to get back to your system version by removing the ucm2 folder on your system and reinstall the package containing it: on Debian/ubuntu-like systems it's named alsa-ucm-conf). See also information on the README.md file.
  • unplug / replug your minifuse
  • check with pavucontrol if you see the correct profiles in the configuration tab (or equivalent).

If you don't see any change, you can try to restart your sound daemons (eg pulseaudio or pipewire + pipewire-pulse + wireplumber), or even reboot your system to be sure, and we'll check from there… It's totally possible I forgot something :)

@Ali32bit
Copy link
Author

hi , so i basically copied the directories to the right place and with root permissions. yet nothing changes even with system restart. my device keeps appearing as surround sound. i must be missing something or my manjaro distro is not reading the files right. either way its not working right now

@nodens
Copy link

nodens commented Oct 11, 2022

Either my PR is not working, or maybe pulseaudio/pipewire config is interfering…

Since I switched to pipewire before getting the Minifuse, I'm not sure how it appears when using pulseaudio, and I think Manjaro uses pulseaudio but I might be wrong, didn't check

What do you see in pavucontrol in the configuration tab ? For each device, you should be able to set a profile, what are they for the Minifuse?

Other helpful stuff to try to understand what's going on:

  • run alsaucm reload and check for errors (including with journalctl / journalctl --user)
  • check the number or short name of your card with aplay -l and dump the UCM config:
    alsaucm -c hw:<number or short name> dump text. If Minifuse 1 follow minifuse 2 naming, following should work in your case:
    alsaucm -c hw:M1 dump text

And post output of the dump.

@Ali32bit
Copy link
Author

i did the installation on 2 different distros with the same result so i doubt its a problem from my system side unless i am doing something wrong.

alsaucm reload says this : _ALSA lib conf.c:2007:(snd_config_load_with_include) toplevel:1:1:Unexpected char
ALSA lib utils.c:375:(uc_mgr_config_load_into) could not load configuration file /usr/share/alsa/ucm2/conf.d/HDA-Intel/HDA-Intel.conf
ALSA lib parser.c:2791:(load_toplevel_config) error: could not parse configuration for card hw:1
ALSA lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -22
alsaucm: error failed to open sound card hw:1: Invalid argument

aplay- says this : **** List of PLAYBACK Hardware Devices ****
card 0: M1 [MiniFuse 1], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: CX20751/2 Analog [CX20751/2 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0 *]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0

the dump command said this : _ALSA lib conf.c:2007:(snd_config_load_with_include) toplevel:1:1:Unexpected char
ALSA lib utils.c:375:(uc_mgr_config_load_into) could not load configuration file /usr/share/alsa/ucm2/conf.d/USB-Audio/USB-Audio.conf
ALSA lib parser.c:2791:(load_toplevel_config) error: could not parse configuration for card hw:M1
ALSA lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:M1 use case configuration -22
alsaucm: error failed to open sound card hw:M1: Invalid argument

@nodens
Copy link

nodens commented Oct 12, 2022

Ok, so it might be an issue with my changes. I'll have a look in the next few days.

What's weird is the issues are on the HW:1 card, so your integrated one according to aplay -l.

Could you tell me what the version of your system alsa-ucm-conf package (whatever package hold the ucm folders) ? What happen if you revert to stock and run the same commands ?

@Ali32bit
Copy link
Author

Ali32bit commented Oct 12, 2022

from what my package manager says the ALSA ucm conf version is 1.2.7.2-1 , an issue with the intergrated sound card seems plausible too since its not the usual stock brand in most lap tops. i think it was called conexant smart audio or something in windows. i did just re install the stock version then tried to add the configs again. same result. running the command for the stock version says this : ALSA lib parser.c:244:(error_node) UCM is not supported for this HDA model (HDA Intel PCH at 0xdf328000 irq 132)
ALSA lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -6
alsaucm: error failed to open sound card hw:1: No such device or address

i doupt its an issue of intergrated sound card mainly cause it seems to be an error caused by the lack of a configuration not hardware compatibility

@nodens
Copy link

nodens commented Oct 16, 2022

I tested with my Minifuse 2 by changing the pci id for the needle instruction on my system, so it would load the M1 profile on the M2.

Turns out I forgot to remove a reference to Line3 which doesn't exist on a M1.

Please test again !

@Ali32bit
Copy link
Author

it didnt seem to change much, i still get an error saying it cant load the configuration and there is an invalid argument.

_

ALSA lib conf.c:2007:(_snd_config_load_with_include) toplevel:1:1:Unexpected char
ALSA lib utils.c:375:(uc_mgr_config_load_into) could not load configuration file /usr/share/alsa/ucm2/conf.d/USB-Audio/USB-Audio.conf
ALSA lib parser.c:2791:(load_toplevel_config) error: could not parse configuration for card hw:0
ALSA lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -22
alsaucm: error failed to open sound card hw:0: Invalid argument

_

@nodens
Copy link

nodens commented Oct 17, 2022

Well, there I'm a a loss, I don't see why you'd get this error with the last version. When I tested to load the previous version, I had an explicit error about Line3 not existing, which made sense. Here it looks like something else is wrong. Are you sure you copied the file directly ?

I just use rsync from the git repo on my system, after copying /usr/share/alsa to be able to reset:

sudo cp -a /usr/share/alsa /usr/share/alsa.bak (before messing up with it of course, but you can always reinstall alsa-ucm-conf package)
sudo rsync -rcv --delete /home/nodens/src/alsa/alsa-ucm-conf/ucm2/USB-Audio/ /usr/share/alsa/ucm2/USB-Audio/ --dry-run (here I know I only touched USB-Audio, but maybe you need to get the whole ucm2 directory, I can't say for manjaro). Remove the --dry-run if the files it create/delete is consistent. I remember having strange issue, and it took forever to realize I didn't copy the files at the right place (I created another ucm2 subdir under the existing ucm2 by mistake).

Also, the error you get is nothing like the one I got on my tests with the previous version:

~$ alsaucm -c hw:1 dump text
ALSA lib parser.c:1756:(verb_dev_list_add) error: unable to find device 'Line3'
ALSA lib parser.c:2057:(parse_verb_file) error: device management error in verb 'HiFi'
ALSA lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
alsaucm: error failed to open sound card hw:1: No such file or directory

So I can't help but think that something else is wrong here.

@Ali32bit
Copy link
Author

i am at a loss too. i really do copy the folder to the correct place with cp command in the correct format, and its detected too cause without those files i get a different error that they dont exist , i tried to install it again with a fresh manjaro install that i had, same result. i feel like something is still wrong that we cant see cause the hardware is slightly different. just for reference it looks like this on windows in the sound settings :

Capture
Capture2

something else is going wrong somewhere else, or maybe i am an idiot with the command line who knows. the files are definitely in the right place in the file manager and in text editor i see all your changes, what OS are you testing this on if you dont mind me asking ?

@nodens
Copy link

nodens commented Oct 18, 2022

I'm running Debian (unstable aka sid). If you want to try on Debian, you can probably use a testing version (aka bookworm). but not stable, alsa lib is too old in stable (bullseye). It could work with a live cd image.

Thing is, I have the intended result with my M2 if I make it pass for a M1by tweaking the id in the ucm profile , but it's hard to be 100% sure the rest of the card is the same. It should, according to the alsa info.

Maybe @perexg or someone more experienced than me with alsa UCM can chime in to give more insight on stuff to check ?

perexg added a commit that referenced this issue Oct 19, 2022
Recode Minifuse 2 config to support Minifuse 1, too.

BugLink: #220
Fixes: #226
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg
Copy link
Member

perexg commented Oct 19, 2022

The copy of the text files should be very straight. The "toplevel:1:1:Unexpected char" signalize that the files are not in the right format.

The commit 2942a76 contains the "merged" support for Minifuse 1 and 2.

I added the latest config download info to README: 3ddd8b2 / https://github.com/alsa-project/alsa-ucm-conf/blob/master/README.md .

@nodens
Copy link

nodens commented Oct 19, 2022

Thanks, that's much cleaner than my naive attempt! :)

@Ali32bit
Copy link
Author

Ali32bit commented Oct 19, 2022

ah so it was a file format problem ? how would i install it correctly then ? the command in the "read me" wont work for me.

i get an error like this : __ar xvzf alsa-ucm-conf.tar.gz -C /usr/share/alsa --strip-components=1 "/ucm" "/ucm2"  ✔
tar: Pattern matching characters used in file names
tar: Use --wildcards to enable pattern matching, or --no-wildcards to suppress this warning
tar: */ucm: Not found in archive
tar: Pattern matching characters used in file names
tar: Use --wildcards to enable pattern matching, or --no-wildcards to suppress this warning
tar: */ucm2: Not found in archive
tar: Exiting with failure status due to previous errors
   ~  __
its saying it cant find the files even tough they exist in the archive , must be some kind of terminal thing i dont know about

sorry if i sound so noob like, i am still trying to wrap my head around commands.
so far i have been installing it by extracting the archive then copying the files with cp or converting the archive to zip and using unzip command instead. not sure how that would currupt the files tough.

@nodens
Copy link

nodens commented Oct 20, 2022

ha, that's a tar version or defaults issue.
Try to add --wildcards to the tar command, as the output suggest (error are helpful, promise!), like this:

sudo tar xvzf alsa-ucm-conf.tar.gz -C /usr/share/alsa --strip-components=1 --wildcards "*/ucm" "*/ucm2"

The problem is that tar doesn't know if you intend to search for file with * in their name (default) or to use * as a wildcard. With --wildcards you remove the ambiguity.

@Ali32bit
Copy link
Author

ayy now it works i think. it says minifuse L/R instead of susrround. peace achived

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

3 participants