pmaports/device/testing/soc-sprd-audio/sc8830/HiFi
HenriDellal 9e923e0561
testing/soc-sprd-audio: new package (MR 1162)
This commit adds initial support for sprdphone sound card and sc8830-audio
device. sc8830-audio is common audio device used in different Spreadtrum SoCs.
This configuration was tested on Nobby 230 (SC7715GA), Finepower F1 (SC7731C),
Samsung Galaxy J1 mini (SC8830). It should work for many other SoCs as well.
Now, if someone wants to have somewhat working audio, they just have to add
soc-sprd-audio-sc8830 package to depends of device- package and that's it.
soc-sprd-audio is only for generic configuration (set sprdphone as default
sound card and provide headphone jack detection).
What works:
- Speaker and headphones output;
- Headphone jack detection (based on udev rules from device-xiaomi-santoni);
- Microphone works on both headphones and device itself.
Spotted issues:
- Recording volume is low;
- Recording is done only on right channel.
2020-04-18 23:39:36 +03:00

156 lines
2.8 KiB
Text

SectionVerb {
EnableSequence [
cdev "hw:sprdphone"
cset "name='Speaker Function' 0"
cset "name='HeadPhone Function' 0"
cset "name='HPL Playback Volume' 11"
cset "name='HPR Playback Volume' 11"
cset "name='SPKL Playback Volume' 11"
cset "name='SPKR Playback Volume' 11"
cset "name='ADCL Capture Volume' 12"
cset "name='ADCR Capture Volume' 12"
cset "name='DACL Playback Volume' 5"
cset "name='DACR Playback Volume' 5"
cset "name='EAR Playback Volume' 10"
]
DisableSequence [
cdev "hw:sprdphone"
]
Value {
CapturePCM "hw:sprdphone,0"
PlaybackPCM "hw:sprdphone,0"
}
}
SectionDevice."Earpiece" {
Comment "Earpiece speaker"
ConflictingDevice [
"Headphones"
"Speaker"
]
EnableSequence [
cdev "hw:sprdphone"
cset "name='Earpiece Function' 1"
]
DisableSequence [
cdev "hw:sprdphone"
cset "name='Earpiece Function' 0"
]
Value {
PlaybackChannels "2"
}
}
SectionDevice."Speaker" {
Comment "Speaker"
ConflictingDevice [
"Earpiece"
"Headphones"
]
EnableSequence [
cdev "hw:sprdphone"
cset "name='SPKL Mixer DACLSPKL Switch' 1"
cset "name='Speaker Function' 1"
]
DisableSequence [
cdev "hw:sprdphone"
cset "name='SPKL Mixer DACLSPKL Switch' 0"
cset "name='Speaker Function' 0"
]
Value {
PlaybackChannels "2"
}
}
SectionDevice."Headphones" {
Comment "Headphones"
ConflictingDevice [
"Earpiece"
"Speaker"
]
EnableSequence [
cdev "hw:sprdphone"
cset "name='DACL Playback Volume' 7"
cset "name='DACR Playback Volume' 7"
cset "name='HPL Mixer DACLHPL Switch' 1"
cset "name='HPR Mixer DACRHPR Switch' 1"
cset "name='HeadPhone Function' 1"
]
DisableSequence [
cdev "hw:sprdphone"
cset "name='HeadPhone Function' 0"
cset "name='HPL Mixer DACLHPL Switch' 0"
cset "name='HPR Mixer DACRHPR Switch' 0"
cset "name='DACL Playback Volume' 5"
cset "name='DACR Playback Volume' 5"
]
Value {
PlaybackChannels "2"
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
ConflictingDevice [
"Handset"
]
EnableSequence [
cdev "hw:sprdphone"
cset "name='ADCL Mixer HPMICADCL Switch' 1"
cset "name='ADCR Mixer HPMICADCR Switch' 1"
cset "name='HP Mic Function' 1"
]
DisableSequence [
cdev "hw:sprdphone"
cset "name='HP Mic Function' 0"
cset "name='ADCL Mixer HPMICADCL Switch' 0"
cset "name='ADCR Mixer HPMICADCR Switch' 0"
]
Value {
CaptureChannels "1"
}
}
SectionDevice."Handset" {
Comment "Handset microphone"
ConflictingDevice [
"Headset"
]
EnableSequence [
cdev "hw:sprdphone"
cset "name='ADCL Mixer MainMICADCL Switch' 1"
cset "name='ADCR Mixer MainMICADCR Switch' 1"
cset "name='Mic Function' 1"
]
DisableSequence [
cdev "hw:sprdphone"
cset "name='Mic Function' 0"
cset "name='ADCL Mixer MainMICADCL Switch' 0"
cset "name='ADCR Mixer MainMICADCR Switch' 0"
]
Value {
CaptureChannels "2"
}
}