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-essx8336: update HiFi.conf #246

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
97 changes: 19 additions & 78 deletions ucm2/Intel/sof-essx8336/HiFi.conf
Original file line number Diff line number Diff line change
@@ -1,71 +1,31 @@
SectionVerb {
EnableSequence [
disdevall ""
#disdevall ""
Copy link
Member

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.

# Disable all inputs / outputs
# (may be duplicated with disdevall)
cset "name='Headphone Switch' off"
cset "name='Headset Mic Switch' off"
cset "name='Internal Mic Switch' off"
cset "name='DAC Mono Mix Switch' off"
cset "name='Left Headphone Mixer Left DAC Switch' on"
cset "name='Right Headphone Mixer Right DAC Switch' on"
]
}

If.amic {
Copy link
Member

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.

Condition {
Type String
Empty "${var:DeviceDmic}"
}
True.SectionDevice."Mic" {
SectionDevice."Mic" {
Comment "Analog Microphone"

ConflictingDevice [
"Headset"
]

EnableSequence [
cset "name='Differential Mux' lin1-rin1"
cset "name='Internal Mic Switch' on"
cset "name='Headset Mic Switch' on"
Copy link
Member

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.

]

DisableSequence [
cset "name='Internal Mic Switch' off"
]

]

Value {
CapturePriority 100
CapturePCM "hw:${CardId}"
CaptureMixerElem "ADC PGA Gain"
CaptureMasterElem "ADC"
}
}
}

If.dmic {
Copy link
Member

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.

Condition {
Type String
Empty "${var:DeviceDmic}"
}
False.SectionDevice."${var:DeviceDmic}" {
Comment "Digital Microphone"

Value {
CapturePriority 100
CapturePCM "hw:${CardId},1"
If.chn {
Condition {
Type RegexMatch
Regex "cfg-dmics:[34]"
String "${CardComponents}"
}
True {
CaptureChannels 4
}
}
CaptureMixerElem "Dmic0"
CaptureVolume "Dmic0 Capture Volume"
CaptureSwitch "Dmic0 Capture Switch"
}
}
}

SectionDevice."Speaker" {
Expand All @@ -77,10 +37,12 @@ SectionDevice."Speaker" {

EnableSequence [
cset "name='Speaker Switch' on"
cset "name='Differential Mux' lin1-rin1"
Copy link
Member

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.

]

DisableSequence [
cset "name='Speaker Switch' off"
cset "name='Differential Mux' lin2-rin2"
]
Value {
PlaybackPriority 100
Expand All @@ -98,6 +60,16 @@ SectionDevice."Headphones" {
ConflictingDevice [
"Speaker"
]

EnableSequence [
cset "name='Headset Mic Switch' on"
cset "name='Speaker Switch' off"
cset "name='Differential Mux' lin2-rin2"
Copy link
Member

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).

]

DisableSequence [
cset "name='Differential Mux' lin1-rin1"
]

Value {
PlaybackPriority 300
Expand All @@ -109,35 +81,4 @@ SectionDevice."Headphones" {
}
}

SectionDevice."Headset" {
Copy link
Member

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.

Comment "Headset Microphone"

If.conflict {
Condition {
Type String
Empty "${var:DeviceDmic}"
}
True.ConflictingDevice [
"Mic"
]
}

EnableSequence [
cset "name='Headset Switch' on"
cset "name='Digital Mic Mux' 'dmic disable'"
]

DisableSequence [
cset "name='Headset Switch' on"
]

Value {
CapturePriority 300
CapturePCM "hw:${CardId}"
CaptureMixerElem "ADC PGA Gain"
CaptureMasterElem "ADC"
JackControl "Headset Mic Jack"
}
}

Include.hdmi.File "/Intel/sof-essx8336/Hdmi.conf"