Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions ucm/sof-glkda7219max/Hdmi1.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
SectionVerb {

EnableSequence [
cdev "hw:sofglkda7219max"
]

DisableSequence [
cdev "hw:sofglkda7219max"
]
}

SectionDevice."HDMI1" {
Comment "HDMI1/DP1 Playback"

Value {
PlaybackPCM "hw:sofglkda7219max,5"
PlaybackChannels "2"
JackControl "HDMI/DP,pcm=5 Jack"
PlaybackPriority "300"
}

EnableSequence [
cdev "hw:sofglkda7219max"
cset "name='IEC958 Playback Switch' on"
]

DisableSequence [
cdev "hw:sofglkda7219max"
cset "name='IEC958 Playback Switch' off"
]
}
31 changes: 31 additions & 0 deletions ucm/sof-glkda7219max/Hdmi2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
SectionVerb {

EnableSequence [
cdev "hw:sofglkda7219max"
]

DisableSequence [
cdev "hw:sofglkda7219max"
]
}

SectionDevice."HDMI2" {
Comment "HDMI2/DP2 Playback"

Value {
PlaybackPCM "hw:sofglkda7219max,6"
PlaybackChannels "2"
JackControl "HDMI/DP,pcm=6 Jack"
PlaybackPriority "400"
}

EnableSequence [
cdev "hw:sofglkda7219max"
cset "name='IEC958 Playback Switch',index=1 on"
]

DisableSequence [
cdev "hw:sofglkda7219max"
cset "name='IEC958 Playback Switch',index=1 off"
]
}
31 changes: 31 additions & 0 deletions ucm/sof-glkda7219max/Hdmi3.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
SectionVerb {

EnableSequence [
cdev "hw:sofglkda7219max"
]

DisableSequence [
cdev "hw:sofglkda7219max"
]
}

SectionDevice."HDMI3" {
Comment "HDMI3/DP3 Playback"

Value {
PlaybackPCM "hw:sofglkda7219max,7"
PlaybackChannels "2"
JackControl "HDMI/DP,pcm=7 Jack"
PlaybackPriority "500"
}

EnableSequence [
cdev "hw:sofglkda7219max"
cset "name='IEC958 Playback Switch',index=2 on"
]

DisableSequence [
cdev "hw:sofglkda7219max"
cset "name='IEC958 Playback Switch',index=2 on"
]
}
112 changes: 112 additions & 0 deletions ucm/sof-glkda7219max/HiFi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
SectionVerb {

EnableSequence [
cdev "hw:sofglkda7219max"
]

DisableSequence [
cdev "hw:sofglkda7219max"
]
}

SectionDevice."Speaker" {
Comment "Speaker Playback"

Value {
PlaybackPCM "hw:sofglkda7219max,0"
PlaybackChannels "2"
}

EnableSequence [
cdev "hw:sofglkda7219max"
cset "name='Spk Switch' on"
]

DisableSequence [
cdev "hw:sofglkda7219max"
cset "name='Spk Switch' off"
]
}

SectionDevice."Headset Playback" {
Comment "Headset Playback"

Value {
PlaybackPCM "hw:sofglkda7219max,1"
PlaybackChannels "2"
JackName "sofglkda7219max Headset Jack"
JackControl "Headset Jack"
JackType "gpio"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no JackControl?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plbossart for HDMI we got JackControl "HDMI/DP,pcm=7 Jack", but for headset, seems no such info in amixer contents, so headphone JackControl, and jack detection related is not present in this ucm.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well jack detection should be added here for headphones/headset. It's supported in the machine driver so there's no reason to remove it.


EnableSequence [
cdev "hw:sofglkda7219max"
cset "name='Headphone Switch' on"
cset "name='Headphone Jack Switch' on"
cset "name='Playback Digital Switch' on"
cset "name='Mixer Out FilterL DACL Switch' on"
cset "name='Mixer Out FilterR DACR Switch' on"
]

DisableSequence [
cdev "hw:sofglkda7219max"
cset "name='Headphone Switch' off"
cset "name='Headphone Jack Switch' off"
cset "name='Playback Digital Switch' off"
cset "name='Mixer Out FilterL DACL Switch' off"
cset "name='Mixer Out FilterR DACR Switch' off"
]
}

SectionDevice."Mic" {
Comment "Headset Capture"

Value {
CapturePCM "hw:sofglkda7219max,1"
CaptureChannels "2"
JackName "sofglkda7219max Headset Jack"
JackControl "Headset Jack"
JackType "gpio"
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no jack detection information?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plbossart As I see from amixer contents, there is no headset jack detection info. only three HDMI jack detection info, and they are added.
'Headphone Jack Switch' is not the one we want.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's in the machine driver

	/*
	 * Headset buttons map to the google Reference headset.
	 * These can be configured by userspace.
	 */
	ret = snd_soc_card_jack_new(rtd->card, "Headset Jack",
			SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 |
			SND_JACK_BTN_2 | SND_JACK_BTN_3 | SND_JACK_LINEOUT,
			&broxton_headset, NULL, 0);

Copy link
Author

@aiChaoSONG aiChaoSONG Jan 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plbossart Yes, "Headset Jack" is in the driver, but I am sure it's not in the amixer contents (attached). seems we got an issue here.
I add some info as chrome did:

JackName "sofglkda7219max Headset Jack"
JackControl "Headset Jack"
JackType "gpio"

but jack detection not work at all, there is always a headset playback/ headset capture item in sound settings even without a headset inserted. we have the same situation on helios
I am kind of confused.
glk_amixer.log

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juimonen can you help here?

EnableSequence [
cdev "hw:sofglkda7219max"
cset "name='Headphone Switch' on"
cset "name='Headset Mic Switch' on"
cset "name='Headphone Jack Switch' on"
cset "name='Mixer In Mic Switch' on"
cset "name='Capture Digital Switch' on"
cset "name='Mixer In Mic Switch' on"
cset "name='Mixin Switch' on"
cset "name='Mic Switch' on"
]

DisableSequence [
cdev "hw:sofglkda7219max"
cset "name='Headphone Switch' off"
cset "name='Headset Mic Switch' off"
cset "name='Headphone Jack Switch' off"
cset "name='Mixer In Mic Switch' off"
cset "name='Capture Digital Switch' off"
cset "name='Mixer In Mic Switch' off"
cset "name='Mixin Switch' off"
cset "name='Mic Switch' off"
]
}

SectionDevice."DMIC" {
Comment "DMIC Capture"

Value {
CapturePCM "hw:sofglkda7219max,99"
CaptureChannels "4"
}

EnableSequence [
cdev "hw:sofglkda7219max"
]

DisableSequence [
cdev "hw:sofglkda7219max"
]
}
32 changes: 32 additions & 0 deletions ucm/sof-glkda7219max/sof-glkda7219max.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Default"
}

SectionUseCase."Hdmi1" {
File "Hdmi1.conf"
Comment "Play to Hdmi1"
}

SectionUseCase."Hdmi2" {
File "Hdmi2.conf"
Comment "Play to Hdmi2"
}

SectionUseCase."Hdmi3" {
File "Hdmi3.conf"
Comment "Play to Hdmi3"
}

SectionDefaults [
cdev "hw:sofglkda7219max"
cset "name='Headphone Switch' off"
cset "name='Headphone Jack Switch' off"
cset "name='Mic Volume' 50"
cset "name='Out DACL Mux' DAIL"
cset "name='Out DACR Mux' DAIR"
cset "name='Out DAIL Mux' ADC"
cset "name='Out DAIR Mux' ADC"
cset "name='Gain Ramp Rate' 1"
cset "name='Playback Digital Volume' 115"
]