-
Notifications
You must be signed in to change notification settings - Fork 222
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
sof-essx8336: update HiFi.conf #246
base: master
Are you sure you want to change the base?
Conversation
I don't think that it's the right way to update this configuration. I assume that @plbossart and @mchehab tested the previous configs. It would be probably good to gather output from |
Also, do not forget that there are probably multiple hardware variants which are sharing the similar configuration file, so removing devices and/or modifying the configuration unconditionally without asking the original contributors will result with a regression. |
@perexg did you check my alsa-info? |
I submited this two weeks ago, I was wondering if someone could take a look at it. |
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've tried to do an review from the UCM configuration maintainer perspective. I admit that my hardware knowledge is limited in this case.
@@ -1,71 +1,31 @@ | |||
SectionVerb { | |||
EnableSequence [ | |||
disdevall "" | |||
#disdevall "" |
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.
The Left / Right DAC switches are already set in the BootSequence (sof-essx8336.conf) file. Also, keep disdevall line uncommented. It will execute all DisableSequence commands for all defined UCM devices.
] | ||
} | ||
|
||
If.amic { |
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.
Do not move amic outside If blocks. According alsa-info dump, there are no Components defined for this card thus this analog mic block should be activated.
} | ||
} | ||
|
||
If.dmic { |
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.
Do not remove blindly devices which may be used for another hardware variants.
cset "name='Internal Mic Switch' on" | ||
cset "name='Headset Mic Switch' on" |
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.
Headset mic device was defined bellow (and removed with your change). If you insert a microphone, which Jack control changes? You may use amixer -c 0 events
command to check the control state changes.
@@ -77,10 +37,12 @@ SectionDevice."Speaker" { | |||
|
|||
EnableSequence [ | |||
cset "name='Speaker Switch' on" | |||
cset "name='Differential Mux' lin1-rin1" |
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.
Changing controls which are evidently assigned to the input for the output device seems very suspicious. I would remove this addition.
EnableSequence [ | ||
cset "name='Headset Mic Switch' on" | ||
cset "name='Speaker Switch' off" | ||
cset "name='Differential Mux' lin2-rin2" |
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.
Changing controls which are evidently assigned to the input for the output device seems very suspicious. I would remove this addition. Also do not use controls which are already assigned to other devices (Speaker).
@@ -109,35 +81,4 @@ SectionDevice."Headphones" { | |||
} | |||
} | |||
|
|||
SectionDevice."Headset" { |
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.
Keep this section. If it does not make sense for your hardware, use If. blocks.
As I already wrote, I would like probably to see the step-by-step configuration changes e.g. what are minimal configuration changes to make Speaker device work on your hardware? |
A large part of the issues here is due to wrong/missing quirks. Basically, 2 gpios are used to control speaker and headphone; each of them can be either triggered on low or on high. So, there are 4 different combinations, when both are used - and some systems may use just one gpio for both. We're working towards improving its detection via ACPI device ESSX _DSM method (see thesofproject/linux#4112). After having those patches applied, there will be just one quirk that won't be auto-detected: if GPIO 0 is speaker or headphone. Yet, UCM changeset 15a1250 ("ucm2: put disdevall to HDA/Soundwire configs") caused a regression, breaking support for the system's microphone. It should probably be partially reverted for es8336, until we figure out what caused the regressions. I submitted a PR with such partial revert: #258 |
Btw, if you want to compare, this is the alsa-info.txt from Huawei Matebook D15: |
This fixed the audio problem along with some adjustments in alsamixer, I have a fully functional speaker. A microphone is recognized now but when using it it only detects noise, it does not detect voice or external noises. |
@dgox16 Did you try my commit? |
Yes. I did it in my Matebook d15 |
Has anyone managed to get this to work? |
I have tested this configuration and the audio indeed works at max volume when the system starts up in a Positivo Master N1250 ROHS, the microphone on the other hand does not work. |
On my system (a Hasee X5-2021S5H, shipping Tigerlake i5-11300H with ES8336) #328 is the minimal change I've found to make speaker, headphone, and internal digital mic to work. I've not tested headset (with a mic) because I don't have one. See the commit message for the rationale of the changes. If we remove disdevall, I guess the first change in my PR won't be needed anymore. |
This enables the speakers from startup, detects the HDMI audio and enables the internal microphone. I have tested this on 3 devices with Debian now and it seems to work. Can other people test it too please. If it works, it will be worth pushing it upstream.