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

sof-glkda7219max: initial import #7

Closed
wants to merge 1 commit into from

Conversation

plbossart
Copy link
Member

This probably doesn't work as is, but we should compare with Chrome
and upstream this.

Signed-off-by: Pierre-Louis Bossart [email protected]

This probably doesn't work as is, but we should compare with Chrome
and upstream this.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
@cujomalainey
Copy link

I can take a look at these UCM changes once I am back from Lyon next week, we likely have some fields that may need updating. The upstreaming effort is definitely appreciated.

@cujomalainey
Copy link

Here is the diff

The only thing that really stands out to me is the removal of the HDMI code and the fact that the Spk switch is inverted.

diff --git a/HiFi.conf b/SOF-HiFi.conf
index 9ea5dec..fdfc919 100644
--- a/HiFi.conf
+++ b/SOF-HiFi.conf
@@ -1,3 +1,10 @@
+# command-line sequence to switch playback/capture
+# alsaucm -c sof-glkda7219max set _verb HiFi set _enadev Headphone
+# alsaucm -c sof-glkda7219max set _verb HiFi set _enadev Speakers
+# alsaucm -c sof-glkda7219max set _verb HiFi set _enadev HeadsetMic
+# alsaucm -c sof-glkda7219max set _verb HiFi set _enadev InternalMic
+
+
 SectionVerb {
 	Value {
 	 	OutputDspName "speaker_eq"
@@ -25,12 +32,6 @@ SectionVerb {
 		cset "name='Mixer In Mic Switch' 1"
 		cset "name='Out DAIL Mux' ADC"
 		cset "name='Out DAIR Mux' ADC"
-		cset "name='Pin5-Port0 Mux' 1"
-		cset "name='Pin5-Port1 Mux' 1"
-		cset "name='Pin5-Port2 Mux' 1"
-		cset "name='Pin6-Port0 Mux' 2"
-		cset "name='Pin6-Port1 Mux' 2"
-		cset "name='Pin6-Port2 Mux' 2"
 		cset "name='Gain Ramp Rate' 1"
 	]
 	DisableSequence [
@@ -39,11 +40,11 @@ SectionVerb {
 
 SectionDevice."Speaker".0 {
 	Value {
-		PlaybackPCM "hw:sof-glkda7219max,0"
+		PlaybackPCM "hw:sofglkda7219max,0"
 	}
 	EnableSequence [
 		cdev "hw:sofglkda7219max"
-		cset "name='Spk Switch' off"
+		cset "name='Spk Switch' on"
 	]
 	DisableSequence [
 		cdev "hw:sofglkda7219max"
@@ -52,34 +53,13 @@ SectionDevice."Speaker".0 {
 }
 
 SectionDevice."Headphone".0 {
-	Value {
-		PlaybackPCM "hw:sof-glkda7219max,1"
-		MixerName "Headphone"
-		JackName "sof-glkda7219max Headset Jack"
-		JackType "gpio"
-		JackSwitch "2"
-		DspName ""
-	}
-	EnableSequence [
-		cdev "hw:sofglkda7219max"
-		cset "name='Headphone Jack Switch' on"
-		cset "name='Headphone Switch' 1"
-	]
-	DisableSequence [
-		cdev "hw:sofglkda7219max"
-		cset "name='Headphone Jack Switch' off"
-		cset "name='Headphone Switch' 0"
-	]
-}
-
-SectionDevice."Line Out".0 {
 	Value {
 		PlaybackPCM "hw:sofglkda7219max,1"
 		MixerName "Headphone"
-		JackName "sof-glkda7219max Headset Jack"
+		JackName "sofglkda7219max Headset Jack"
 		JackType "gpio"
-		JackSwitch "6"
-		DspName ""
+		JackSwitch "2"
+		OutputDspName ""
 	}
 	EnableSequence [
 		cdev "hw:sofglkda7219max"
@@ -93,60 +73,37 @@ SectionDevice."Line Out".0 {
 	]
 }
 
-SectionDevice."Internal Mic".0 {
-	Value {
-		CapturePCM "hw:sof-glkda7219max,99"
-		CaptureChannelMap "0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1"
-		MaxSoftwareGain "2000"
-	}
-	EnableSequence [
-		cdev "hw:sofglkda7219max"
-	]
-	DisableSequence [
-		cdev "hw:sofglkda7219max"
-	]
-}
-
-SectionDevice."Mic".0 {
-	Value {
-		CapturePCM "hw:sof-glkda7219max,1"
-		MixerName "Headset Mic"
-		JackName "sof-glkda7219max Headset Jack"
-		JackType "gpio"
-	}
-	EnableSequence [
-		cdev "hw:sofglkda7219max"
-		cset "name='Headset Mic Switch' on"
-		cset "name='Mic Switch' on"
-	]
-	DisableSequence [
-		cdev "hw:sofglkda7219max"
-		cset "name='Headset Mic Switch' off"
-		cset "name='Mic Switch' off"
-	]
-}
-SectionDevice."HDMI1".0 {
-	Value {
-		PlaybackPCM "hw:sof-glkda7219max,5"
-		JackName "sof-glkda7219max HDMI/DP, pcm=5 Jack"
-		JackType "gpio"
-		DspName ""
-	}
-	EnableSequence [
-	]
-	DisableSequence [
-	]
-}
+# SectionDevice."Internal Mic".0 {
+# 	Value {
+# 		CapturePCM "hw:sofglkda7219max,3"
+# 		CaptureChannelMap "0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1"
+# 		MaxSoftwareGain "2000"
+# 	}
+# 	EnableSequence [
+# 		cdev "hw:sofglkda7219max"
+# 		cset "name='media0_out mo dmic01_hifi_in mi Switch' on"
+# 	]
+# 	DisableSequence [
+# 		cdev "hw:sofglkda7219max"
+# 		cset "name='media0_out mo dmic01_hifi_in mi Switch' off"
+# 	]
+# }
 
-SectionDevice."HDMI2".0 {
-	Value {
-		PlaybackPCM "hw:sof-glkda7219max,6"
-		JackName "sof-glkda7219max HDMI/DP, pcm=6 Jack"
-		JackType "gpio"
-		DspName ""
-	}
-	EnableSequence [
-	]
-	DisableSequence [
-	]
-}
+# SectionDevice."Mic".0 {
+# 	Value {
+# 		CapturePCM "hw:sofglkda7219max,1"
+# 		MixerName "Headset Mic"
+# 		JackName "sofglkda7219max Headset Jack"
+# 		JackType "gpio"
+# 	}
+# 	EnableSequence [
+# 		cdev "hw:sofglkda7219max"
+# 		cset "name='Headset Mic Switch' on"
+# 		cset "name='Mic Switch' on"
+# 	]
+# 	DisableSequence [
+# 		cdev "hw:sofglkda7219max"
+# 		cset "name='Headset Mic Switch' off"
+# 		cset "name='Mic Switch' off"
+# 	]
+# }

@plbossart
Copy link
Member Author

@cujomalainey This is a very old UCM and at the time HDMI was not even functional. we should re-add it.

@cujomalainey
Copy link

All our HiFi.conf files should be in either
https://chromium.googlesource.com/chromiumos/overlays/board-overlays
or
https://chromium.googlesource.com/chromiumos/third_party/adhd (much older UCMs here)

Note for glkda7219 we have both a 1mic and 2mic variant plus a bunch of other board specific variant UCMs. Also are you wanted to the do the glkrt5682 UCMs as well?

@plbossart
Copy link
Member Author

replaced by PR #26

@plbossart plbossart closed this Jan 16, 2020
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.

2 participants