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

Move SDM845 out of Qualcomm folder and add C360 #70

Conversation

Srinivas-Kandagatla
Copy link
Contributor

With driver_name fix in sdm845 machine driver https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.10&id=3f48b6eba15ea342ef4cb420b580f5ed6605669f
/proc/asound/cards get populated correctly with proper driver name and card long name. With this in place we should be able to rearrange sdm845 directory to be inline with others and reuse some of the common code.
Without this all the sdm845 based machines will get a generic ucm description which will not work, one of such instance is Lenovo C360 Laptop. This patchset also add support to Lenovo C360 support

Thanks,
srini

Move Qualcomm/sdm845 to sdm845 which is now the proper driver name
and the default sdm845.conf is actually a DragonBoard DB845c config,
so move accordingly.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
LENOVO YOGA C630 has MultiMedia1 dai setup as primary Playback so add required
HiFi configuration as well.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
@perexg
Copy link
Member

perexg commented Jan 20, 2021

The Qualcomm directory was added to make the configuration directory tree more descriptive. The string sdm845 string is not very descriptive, but Qualcomm/sdm845 path looks much better in my eyes.

I am playing with an idea to make the lookups like udev does for block devices (by-id / by-path / by-uuid). So the driver / name redirection may be done via a symlink directory like for module names (ucm2/modules). We can change the lookups via ucm2/ucm.conf file now.

It's not only against the Qualcomm drivers. I don't like the old Intel names (chtnau8824 for example) which may be moved to Intel/ subtree.

It's on my to do list, I'll try to do this change when my time permits. If you keep the Qualcomm/sdm845 tree, I'll accept your change now (assuming that the module name lookup works for you).

@Srinivas-Kandagatla
Copy link
Contributor Author

Srinivas-Kandagatla commented Jan 20, 2021

Yes, sdm845 as it is, is not very descriptive.. like any other SoC names, namespacing it with Vendor name sounds good to me! Am Okay with it, as long as we do not endup with using single ucm conf (specially for Qcom case) for multiple machines.

@lumag
Copy link
Contributor

lumag commented Jan 29, 2021

@perexg unfortunately module lookups won't work if the driver is built in into the kernel. Or if the same driver covers multiple cards (like this PR).
I'd suggest to have additional in the ucm.conf, like ucm2/module/${KernelModule}/${CardLongName}.conf (instead/in addition to current ucm2/module/${KernelModule}.conf)?

--- alsa-ucm-conf-1.2.4.orig/ucm2/ucm.conf
+++ alsa-ucm-conf-1.2.4/ucm2/ucm.conf
@@ -53,6 +53,10 @@ If.driver {
 			False {
 				Define.KernelModulePath "class/sound/card${CardNumber}/device/driver/module"
 				Define.KernelModule "$${sys:$KernelModulePath}"
+				UseCasePath.modulelongname {
+					Directory "module/${var:KernelModule}"
+					File "${CardLongName}.conf"
+				}
 				UseCasePath.module {
 					Directory "module"
 					File "${var:KernelModule}.conf"

As for the monolithic kernel builds, would it be possible to have include e.g. ucm2/driver/${CardDriver}/${CardLongName}.conf and ucm2/driver/${CardDriver}.conf into UseCase path? Doing so would allow one to use driver name to locate the directory in addition to using modules.

lumag added a commit to lumag/alsa-ucm-conf that referenced this pull request Jan 30, 2021
Add support for 'ucm2/module/${KernelModule}/${CardLongName}.conf'
paths. On Qualcomm platforms single module supports multiple sound
cards.

BugLink: alsa-project#70
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
@lumag lumag mentioned this pull request Jan 30, 2021
perexg added a commit to perexg/alsa-ucm-conf that referenced this pull request Feb 3, 2021
…ation tree

Introduce ucm2/conf.d/ tree with symlinks to the real hardware configurations.
In this way, we do not rely to create the configuration paths based on
simple driver / device identification, but we can store the configurations
more logically to make the maintenance (code reuse, multiple changes)
more easy.

BugLink: alsa-project#70
BugLink: alsa-project#76
BugLink: alsa-project#78
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg added a commit to perexg/alsa-ucm-conf that referenced this pull request Feb 3, 2021
…ation tree

Introduce ucm2/conf.d/ tree with symlinks to the real hardware configurations.
In this way, we do not rely to create the configuration paths based on
simple driver / device identification, but we can store the configurations
more logically to make the maintenance (code reuse, multiple changes)
more easy.

BugLink: alsa-project#70
BugLink: alsa-project#76
BugLink: alsa-project#78
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg added a commit to perexg/alsa-ucm-conf that referenced this pull request Feb 3, 2021
…ation tree

Introduce ucm2/conf.d/ tree with symlinks to the real hardware configurations.
In this way, we do not rely to create the configuration paths based on
simple driver / device identification, but we can store the configurations
more logically to make the maintenance (code reuse, multiple changes)
more easy.

BugLink: alsa-project#70
BugLink: alsa-project#76
BugLink: alsa-project#78
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg added a commit to perexg/alsa-ucm-conf that referenced this pull request Feb 3, 2021
…ation tree

Introduce ucm2/conf.d/ tree with symlinks to the real hardware configurations.
In this way, we do not rely to create the configuration paths based on
simple driver / device identification, but we can store the configurations
more logically to make the maintenance (code reuse, multiple changes)
more easy.

BugLink: alsa-project#70
BugLink: alsa-project#76
BugLink: alsa-project#78
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg added a commit that referenced this pull request Feb 11, 2021
…ation tree

Introduce ucm2/conf.d/ tree with symlinks to the real hardware configurations.
In this way, we do not rely to create the configuration paths based on
simple driver / device identification, but we can store the configurations
more logically to make the maintenance (code reuse, multiple changes)
more easy.

This commit keeps the older lookup paths active, but they will be
turned off in the next release.

BugLink: #70
BugLink: #76
BugLink: #78
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg
Copy link
Member

perexg commented Feb 17, 2021

Obsoleted by 90ee4e0 .

EDIT: Create another PR for C360. Thank you.

@perexg perexg closed this Feb 17, 2021
@Srinivas-Kandagatla Srinivas-Kandagatla deleted the sdm845-new-layout branch April 16, 2021 16:51
ninelore pushed a commit to ninelore/alsa-ucm-conf-cros that referenced this pull request Jun 10, 2024
…ation tree

Introduce ucm2/conf.d/ tree with symlinks to the real hardware configurations.
In this way, we do not rely to create the configuration paths based on
simple driver / device identification, but we can store the configurations
more logically to make the maintenance (code reuse, multiple changes)
more easy.

This commit keeps the older lookup paths active, but they will be
turned off in the next release.

BugLink: alsa-project#70
BugLink: alsa-project#76
BugLink: alsa-project#78
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

Successfully merging this pull request may close these issues.

None yet

3 participants