Hi, On 4/13/20 4:59 PM, youling257 wrote:
alsaucm -c bytcht-es8316 set _verb HiFi set _enadev Mic, Speaker will no sound. alsaucm -c bytcht-es8316 set _verb HiFi set _enadev Headset, Headphone will no sound.
I see the problem, so the idea of the global EnableSequence is to set defaults and then the EnableSequence of currently active devices run on top. If we drop the default off of both switched and then shutdown the machine with no headphones inserted, so the speakers being used, then the 'Speaker Switch' on state will be saved on shutdown and restored on boot. If we then boot with headphones inserted then AFAIK pulseaudio will run the global EnableSequence + the HeadPhones EnableSequence, leaving the 'Speaker Switch' on and now we get audio on both. The problem seems to be that alsaucm not only runs the EnableSequence for the selected device but also the global one, which pulseaudio normally only does once at bootup. I might be wrong here, maybe pulse will run the global EnableSeq + EnableSeq of active devices + DisableSeq of inactive devices when it starts. In that case the running of the DisableSeq of inactive devices will take care of turning off the speaker-switch when booting with the headphones inserted. In which case the default off of all switches can indeed be removed. Note in that case we should also remove the default off for the Headset + Internal Mic Switch, so a nack to this patch regardless. Jaroslav, can you give us some guidance on how this is supposed to work ? Also you say you use pulseaudio for your testing, AFAIK pulse does not suffer from the problem the alsaucm commands you mention do, so as long as you only use pulse things should work. Regards, Hans
Signed-off-by: youling257 <youling257@xxxxxxxxx> --- ucm2/codecs/es8316/EnableSeq.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/ucm2/codecs/es8316/EnableSeq.conf b/ucm2/codecs/es8316/EnableSeq.conf index 551b79b..53bb115 100644 --- a/ucm2/codecs/es8316/EnableSeq.conf +++ b/ucm2/codecs/es8316/EnableSeq.conf @@ -1,6 +1,4 @@ # Disable all inputs / outputs -cset "name='Speaker Switch' off" -cset "name='Headphone Switch' off" cset "name='Headset Mic Switch' off" cset "name='Internal Mic Switch' off"