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

How to write a "config"? #3

Open
z3ntu opened this issue Oct 10, 2017 · 4 comments
Open

How to write a "config"? #3

z3ntu opened this issue Oct 10, 2017 · 4 comments

Comments

@z3ntu
Copy link

z3ntu commented Oct 10, 2017

Hello,
I didn't find it mentioned anywhere so how do I write the config that's being used in the -c parameter?
And also what to do with the resulting files (HiFi and a .conf file)?

EDIT: Just found the path /usr/share/alsa/ucm/.

@ford-prefect
Copy link
Owner

@z3ntu sorry about the sparse documentation -- the examples were meant to help get started. I wrote about some of the concepts and motivation at https://arunraghavan.net/2016/01/audio-devices-and-configuration/

I see you found where ALSA picks up UCM files from.

Feel free to ask more questions here.

@z3ntu
Copy link
Author

z3ntu commented Oct 11, 2017

As I never did anything with UCM/ALSA before, all the terms are pretty confusing (although I know the word "use case" in context of project management^^)

@z3ntu
Copy link
Author

z3ntu commented Oct 14, 2017

localhost:~# alsaucm -c msm8974-taiko-mtp-snd-card -i
ALSA lib main.c:438:(execute_sequence) unable to execute cset 'name='SLIMBUS_0_RX Port Mixer INT_BT_SCO_TX' 0'

ALSA lib main.c:536:(import_master_config) Unable to execute default sequence
ALSA lib main.c:946:(snd_use_case_mgr_open) error: failed to import msm8974-taiko-mtp-snd-card use case configuration -2
alsaucm: error failed to open sound card msm8974-taiko-mtp-snd-card: No such file or directory

After removing the line with SLIMBUS_0_RX Port Mixer INT_BT_SCO_TX and INTERNAL_BT_SCO_RX Audio Mixer Multimedia6 from my /usr/share/alsa/ucm/msm8974-taiko-mtp-snd-card/msm8974-taiko-mtp-snd-card.conf, I can finally launch alsaucm

(I began writing the above comment because I wanted help but apparently I managed to work around it myself)

Now aplay is still throwing errors: aplay: main:807: audio open error: Invalid argument. Any idea how I could find out why it's doing that? (maybe some magic command that tells me? ^^)

@ford-prefect
Copy link
Owner

Hmm, the invalid argument will need more looking at. See what parameters don't work. For the mixer controls, unfortunately, the set of mixer controls varies from kernel to kernel (I don't know if any of this is upstream), and probably based on the platform itself. When I wrote this, it was all done blind without access to any spec sheets. If you have these, it'll probably be a lot easier going.

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

2 participants