-
Notifications
You must be signed in to change notification settings - Fork 212
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
Add UCM files for avs driver #418
Add UCM files for avs driver #418
Conversation
82c1504
to
669ce04
Compare
Move the configurations to |
I don't mind moving them, but on systems I've tested pulseaudio looked into /usr/share/alsa/ucm2/conf.d, not /usr/share/alsa/ucm2/Intel/avs. Am I missing something, either on driver or ucm side? |
The conf.d is just for symlinks for the toplevel config file to keep configurations organized more logically. I would suggest to follow other configs. Also, the ucm2/Intel/ subtree may be restructured more logically (I mean grouping older SST and new AVS configs to separate subdirs). |
669ce04
to
865047c
Compare
Ah, I've missed that, I've moved the files. I also updated topologies to reuse DMIC and HDMI configuration where possible, as those are fairly generic. I've left codec ones separated, as even though there is some reuse possible between models, there also seem to be different expectations between some of them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to merge or symlink the similar files. Like:
$ diff -u Google-Atlas-1.0-HiFi.conf Google-Coral-rev2-HiFi.conf
$ echo $?
0
For this given example, you can just create one file for all avs_da7219
devices avs_da7219.conf
and avs_da7219-HiFi.conf
. If new devices will differ a bit, we can use condition configuration blocks to handle them.
865047c
to
403aec0
Compare
I've adjusted UCMs is there anything else I need to do? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize for the delay (vacation time). Please, fix JackDev lines.
PlaybackPCM "hw:${CardId},1" | ||
PlaybackChannels 2 | ||
PlaybackMixerElem "Headphone" | ||
JackDev "avs_da7219 Headset Jack" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be JackControl
?
* - JackControl
* - jack control identificator
* - can be parsed using snd_use_case_parse_ctl_elem_id()
* - UCM configuration files should contain both JackControl and JackDev
* when possible, because applications are likely to support only one
* or the other
* - JackDev
* - the input device id of the jack (if the full input device path is
* /dev/input/by-id/foo, the JackDev value should be "foo")
* - UCM configuration files should contain both JackControl and JackDev
* when possible, because applications are likely to support only one
* or the other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe? I've used string outputted by lsinput, but maybe I should've used something else?
root@ATLAS:/home/test# lsinput
(...)
/dev/input/event7
bustype : (null)
vendor : 0x0
product : 0x0
version : 0
name : "avs_da7219 Headset Jack"
phys : "ALSA"
bits ev : (null) (null) (null)
root@ATLAS:/home/test# amixer -c2 controls | grep Jack
numid=65,iface=CARD,name='Headphone Jack'
numid=66,iface=CARD,name='Headset Mic Jack'
numid=67,iface=CARD,name='Line Out Jack'
numid=68,iface=MIXER,name='Headphone Jack Switch'
It's set in:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/soc/intel/avs/boards/da7219.c#n124
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be JackControl "Headphone Jack"
then based on the source (SND_JACK_HEADPHONE -> "Headphone Jack" control mapping). Note that pulseaudio nor pipewire handles JackDev
. It's ChromeOS thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. However what do you mean by second part of sentence:
"then based on the source (SND_JACK_HEADPHONE -> "Headphone Jack" control mapping)."
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant pin / ALSA jack control mapping - see struct snd_soc_jack_pin card_headset_pins[]
array in the mentioned code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, I think I just got confused by English, you are referencing that based on the mapping that is done in the kernel code, I should be using Headphone Jack. Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in this and all other files
# While NHLT only has entry for 4 channel DMIC, only 2 channels | ||
# record anything reasonable, so for Front End to work properly | ||
# remap two working channels onto 2 broken ones. | ||
CaptureChannel0 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, the audio servers have not implemented this yet. It's preferable to use ucm2/common/pcm/split.conf
macros to use alsa-lib's route plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, that's weird, if I remember right, it worked, but yes, I don't see it used anywhere in code for alsa-lib, pulseaudio or pipewire :/ Will check it again then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed Atlas to link to base 4 channel DMIC variant.
|
||
Value { | ||
PlaybackPCM "hw:${CardId},1" | ||
PlaybackMixerElem "DSP" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible to combine Left / Right
volume controls to one stereo using alsa-lib's configuration (see ucm2/codecs/wsa883x/init.conf
) and add this control here. But it may be changed later.
403aec0
to
78e4fff
Compare
Add configs for devices using DMIC codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Add configs for devices using da7219 codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Add configs for devices using max98357a codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Add configs for devices using max98373 codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Add configs for devices using max98927 codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Add configs for devices using nau8825 codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Add configs for devices using rt5514 codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Add configs for devices using rt5663 codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Add configs for devices using ssm4567 codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Add configs for devices using HDMI codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Add configs for devices using da7219 codec. Closes: #418 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add configs for devices using max98357a codec. Closes: #418 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add configs for devices using max98373 codec. Closes: #418 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add configs for devices using max98927 codec. Closes: #418 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add configs for devices using nau8825 codec. Closes: #418 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add configs for devices using rt5514 codec. Closes: #418 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add configs for devices using rt5663 codec. Closes: #418 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add configs for devices using ssm4567 codec. Closes: #418 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add configs for devices using HDMI codec. Closes: #418 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Move identical pieces to one file. BugLink: #418 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Present in this pull request are UCM files for some of the devices available on market that we were able to test.
They are meant to be used with avs driver and relevant topology files.