├── README.md ├── data.tar ├── es8336.conf ├── make.sh ├── tplg ├── sof-apl-es8336-ssp1.tplg ├── sof-cml-es8336-ssp1.tplg ├── sof-glk-es8336-ssp1.tplg ├── sof-jsl-es8336-ssp1.tplg └── sof-tgl-es8336-ssp1.tplg └── ucm ├── HiFi.conf ├── es8326.c ├── sof-essx8336-8326-syntax2.tar.xz ├── sof-essx8336-syntax2-8326.tar.xz ├── ucm-2 ├── sof-essx8336.rar └── sof-essx8336 │ ├── sof-essx8336.zip │ └── sof-essx8336 │ ├── HiFi.conf │ ├── sof-essx8326.conf │ └── sof-essx8336.conf ├── ucm.sh ├── ucm └── sof-essx8336 │ ├── Hdmi1 │ ├── Hdmi2 │ ├── HiFi │ └── sof-essx8336.conf ├── ucm2 ├── es8326 │ └── sof-essx8336 │ │ ├── HiFi.conf │ │ ├── sof-essx8326.conf │ │ └── sof-essx8336.conf └── es8336 │ ├── sof-essx8336.zip │ └── sof-essx8336 │ ├── Hdmi.conf │ ├── HiFi.conf │ └── sof-essx8336.conf └── ucm2_latest ├── README.md ├── es8336-topologies-2.tar.gz ├── grub ├── make.sh ├── sof-dyndbg.conf.txt ├── sof-essx8336-dmic.zip ├── sof-essx8336.zip ├── sof-essx8336 ├── Hdmi.conf ├── HiFi.conf ├── HiFi_8326.conf ├── HiFi_8336.conf └── sof-essx8336.conf ├── sof-jsl.ri └── tplg ├── sof-apl-es8336-ssp0.tplg ├── sof-apl-es8336-ssp1.tplg ├── sof-apl-es8336-ssp2.tplg ├── sof-apl-es8336.tplg ├── sof-cml-es8336-dmic2ch-ssp0.tplg ├── sof-cml-es8336-dmic2ch-ssp1.tplg ├── sof-cml-es8336-dmic2ch-ssp2.tplg ├── sof-cml-es8336-dmic4ch-ssp0.tplg ├── sof-cml-es8336-dmic4ch-ssp1.tplg ├── sof-cml-es8336-dmic4ch-ssp2.tplg ├── sof-cml-es8336-ssp0.tplg ├── sof-cml-es8336-ssp1.tplg ├── sof-cml-es8336-ssp2.tplg ├── sof-glk-es8336-ssp0.tplg ├── sof-glk-es8336-ssp1.tplg ├── sof-glk-es8336-ssp2.tplg ├── sof-glk-es8336.tplg ├── sof-jsl-es8336-dmic2ch-ssp0.tplg ├── sof-jsl-es8336-dmic2ch-ssp1.tplg ├── sof-jsl-es8336-dmic2ch-ssp2.tplg ├── sof-jsl-es8336-dmic4ch-ssp0.tplg ├── sof-jsl-es8336-dmic4ch-ssp1.tplg ├── sof-jsl-es8336-dmic4ch-ssp2.tplg ├── sof-jsl-es8336-ssp0.tplg ├── sof-jsl-es8336-ssp1.tplg ├── sof-jsl-es8336-ssp2.tplg ├── sof-tgl-es8336-dmic2ch-ssp0.tplg ├── sof-tgl-es8336-dmic2ch-ssp1.tplg ├── sof-tgl-es8336-dmic2ch-ssp2.tplg ├── sof-tgl-es8336-dmic4ch-ssp0.tplg ├── sof-tgl-es8336-dmic4ch-ssp1.tplg ├── sof-tgl-es8336-dmic4ch-ssp2.tplg ├── sof-tgl-es8336-ssp1.tplg ├── sof-tgl-es8336-ssp2.tplg └── sof-tgl-es8336.tplg /README.md: -------------------------------------------------------------------------------- 1 | # custom-kernel 2 | 3 | The support for ES8336 is now upstreamed. 4 | 5 | See https://github.com/thesofproject/linux/wiki/ES8336-support if you want to compile your custom kernel. 6 | 7 | For binary kernel, see https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.1-rc1/ 8 | 9 | This repository now contains a shell script which installs firmware/tplg and ucm for old Ubuntu versions. 10 | -------------------------------------------------------------------------------- /data.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/data.tar -------------------------------------------------------------------------------- /es8336.conf: -------------------------------------------------------------------------------- 1 | options snd_soc_sof_es8336 quirk=0x40 -------------------------------------------------------------------------------- /make.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo install kernel 4 | #sudo dpkg -i *.deb 5 | sudo dpkg -i *.deb 6 | 7 | echo copy topology 8 | tar -xvf data.tar 9 | cp sof-jsl-es8336-ssp1.tplg ./lib/firmware/intel/sof-tplg/ 10 | cp -r ./lib/firmware/intel/sof-tplg/ /lib/firmware/intel/ 11 | cp -r ./lib/firmware/intel/sof/ /lib/firmware/intel/ 12 | cp ./tplg/* /lib/firmware/intel/sof-tplg/ 13 | 14 | #cp es8336.conf /etc/modprobe.d/ 15 | 16 | #cp -r ./ucm/sof-essx8336 /usr/share/alsa/ucm2/conf.d 17 | #cp -r ./ucm/sof-essx8336 /usr/share/alsa/ucm2/Intel 18 | sudo chmod +x ./ucm/ucm.sh 19 | cd ./ucm/ 20 | sudo ./ucm.sh 21 | 22 | sed -i '/load-module module-suspend-on-idle/d' /etc/pulse/default.pa 23 | echo 'load-module module-suspend-on-idle timeout=0' >> /etc/pulse/default.pa 24 | -------------------------------------------------------------------------------- /tplg/sof-apl-es8336-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/tplg/sof-apl-es8336-ssp1.tplg -------------------------------------------------------------------------------- /tplg/sof-cml-es8336-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/tplg/sof-cml-es8336-ssp1.tplg -------------------------------------------------------------------------------- /tplg/sof-glk-es8336-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/tplg/sof-glk-es8336-ssp1.tplg -------------------------------------------------------------------------------- /tplg/sof-jsl-es8336-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/tplg/sof-jsl-es8336-ssp1.tplg -------------------------------------------------------------------------------- /tplg/sof-tgl-es8336-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/tplg/sof-tgl-es8336-ssp1.tplg -------------------------------------------------------------------------------- /ucm/HiFi.conf: -------------------------------------------------------------------------------- 1 | SectionVerb { 2 | EnableSequence [ 3 | cset "name='DAC Playback Volume' 180,180" 4 | ] 5 | 6 | DisableSequence [ 7 | ] 8 | } 9 | 10 | 11 | SectionDevice."Headphones" { 12 | Comment "Headphones" 13 | 14 | ConflictingDevice[ 15 | "Speaker" 16 | ] 17 | 18 | EnableSequence [ 19 | cset "name='Headphone Switch' on" 20 | ] 21 | DisableSequence [ 22 | cset "name='Headphone Switch' off" 23 | ] 24 | 25 | Value { 26 | PlaybackPriority 6000 27 | PlaybackPCM "hw:${CardId}" 28 | PlaybackMixerElem "Headphone" 29 | PlaybackMasterElem "Master" 30 | PlaybackVolume "Headphone Volume" 31 | PlaybackSwitch "Headphone Switch" 32 | JackControl "Headphone Jack" 33 | JackHWMute "Speaker" 34 | } 35 | } 36 | 37 | SectionDevice."Speaker" { 38 | Comment "Speaker" 39 | 40 | ConflictingDevice[ 41 | "Headphones" 42 | ] 43 | 44 | EnableSequence [ 45 | cset "name='Speaker Switch' on" 46 | 47 | ] 48 | 49 | DisableSequence [ 50 | cset "name='Speaker Switch' off" 51 | ] 52 | 53 | Value { 54 | PlaybackPriority 4000 55 | PlaybackPCM "hw:${CardId}" 56 | PlaybackMixerElem "Speaker" 57 | PlaybackMasterElem "Master" 58 | PlaybackVolume "Speaker Volume" 59 | PlaybackSwitch "Speaker Switch" 60 | JackHWMute "Headphones" 61 | } 62 | } 63 | 64 | If.hdmi1 { 65 | Condition { 66 | Type ControlExists 67 | Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'" 68 | } 69 | True { 70 | SectionDevice."HDMI1" { 71 | Comment "HDMI1/DP1 Output" 72 | 73 | EnableSequence [ 74 | cset "name='IEC958 Playback Switch' on" 75 | ] 76 | 77 | DisableSequence [ 78 | cset "name='IEC958 Playback Switch' off" 79 | ] 80 | 81 | Value { 82 | PlaybackPriority 5000 83 | PlaybackPCM "hw:${CardId},5" 84 | JackControl "HDMI/DP,pcm=5 Jack" 85 | } 86 | } 87 | } 88 | } 89 | 90 | If.hdmi2 { 91 | Condition { 92 | Type ControlExists 93 | Control "iface=CARD,name='HDMI/DP,pcm=6 Jack'" 94 | } 95 | True { 96 | SectionDevice."HDMI2" { 97 | Comment "HDMI2/DP2 Output" 98 | 99 | EnableSequence [ 100 | cset "name='IEC958 Playback Switch',index=1 on" 101 | ] 102 | 103 | DisableSequence [ 104 | cset "name='IEC958 Playback Switch',index=1 off" 105 | ] 106 | 107 | Value { 108 | PlaybackPriority 6000 109 | PlaybackPCM "hw:${CardId},6" 110 | JackControl "HDMI/DP,pcm=6 Jack" 111 | } 112 | } 113 | } 114 | } 115 | 116 | If.hdmi3 { 117 | Condition { 118 | Type ControlExists 119 | Control "iface=CARD,name='HDMI/DP,pcm=7 Jack'" 120 | } 121 | True { 122 | SectionDevice."HDMI3" { 123 | Comment "HDMI3/DP3 Output" 124 | 125 | EnableSequence [ 126 | cset "name='IEC958 Playback Switch',index=2 on" 127 | ] 128 | 129 | DisableSequence [ 130 | cset "name='IEC958 Playback Switch',index=2 off" 131 | ] 132 | 133 | Value { 134 | PlaybackPriority 7000 135 | PlaybackPCM "hw:${CardId},7" 136 | JackControl "HDMI/DP,pcm=7 Jack" 137 | } 138 | } 139 | } 140 | } 141 | 142 | If.monomic { 143 | Condition { 144 | Type ControlExists 145 | Control "name='Input Source'" 146 | ControlEnum "Headphone Mic" 147 | } 148 | After.SectionDevice "Mic1" 149 | True { 150 | SectionDevice."Mic2" { 151 | Comment "Headphones Stereo Microphone" 152 | 153 | ConflictingDevice [ 154 | "Headset" 155 | ] 156 | 157 | EnableSequence [ 158 | cset "name='Input Source' 'Headphone Mic'" 159 | ] 160 | 161 | Value { 162 | CapturePriority 200 163 | 164 | JackControl "Headphone Mic Jack" 165 | } 166 | } 167 | 168 | SectionDevice."Headset" { 169 | Comment "Headset Mono Microphone" 170 | 171 | EnableSequence [ 172 | cset "name='Input Source' Headset Mic" 173 | ] 174 | 175 | Value { 176 | CapturePriority 300 177 | 178 | JackControl "Headphone Mic Jack" 179 | } 180 | } 181 | } 182 | False { 183 | SectionDevice."Mic2" { 184 | Comment "Headphones Stereo Microphone" 185 | 186 | Value { 187 | CapturePriority 200 188 | 189 | JackControl "Mic Jack" 190 | } 191 | } 192 | } 193 | } 194 | 195 | -------------------------------------------------------------------------------- /ucm/es8326.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0-only 2 | // 3 | // es8326.c -- es8326 ALSA SoC audio driver 4 | // Copyright Everest Semiconductor Co., Ltd 5 | // 6 | // Authors: David Yang 7 | // 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include "es8326.h" 20 | 21 | static int chip_state = 0; 22 | struct es8326_priv { 23 | struct clk *mclk; 24 | struct snd_pcm_hw_constraint_list *sysclk_constraints; 25 | struct i2c_client *i2c; 26 | struct regmap *regmap; 27 | struct snd_soc_component *component; 28 | struct delayed_work jack_detect_work; 29 | struct delayed_work pcm_pop_work; 30 | bool amic; 31 | bool start; 32 | bool muted; 33 | bool hp_inserted; 34 | bool spk_gpio_level; 35 | bool hp_det_level; 36 | struct snd_soc_jack *jack; 37 | int irq; 38 | int chip_state; 39 | /* The lock protects the situation that an irq is generated 40 | * while enabling or disabling irq. 41 | */ 42 | struct mutex lock; 43 | u8 mic1_src; 44 | u8 mic2_src; 45 | u8 jack_pol; 46 | bool jd_inverted; 47 | unsigned int sysclk; 48 | }; 49 | 50 | static void es8326_jack_detect_handler(struct work_struct *work) 51 | { 52 | struct es8326_priv *es8326 = 53 | container_of(work, struct es8326_priv, jack_detect_work.work); 54 | struct snd_soc_component *comp = es8326->component; 55 | unsigned int iface; 56 | 57 | iface = snd_soc_component_read(comp, ES8326_HP_DECTECT_FB); 58 | dev_dbg(comp->dev, "gpio flag %#04x", iface); 59 | if ((iface & ES8326_HPINSERT_FLAG) == 0) { 60 | dev_dbg(comp->dev, "No headset detected"); 61 | snd_soc_jack_report(es8326->jack, 0, SND_JACK_HEADSET); 62 | snd_soc_component_write(comp, ES8326_ADC1_SRC_2A, es8326->mic2_src); 63 | snd_soc_component_write(comp, ES8326_ANA_MICBIAS_1B, 0x70); 64 | } else if ((iface & ES8326_HPINSERT_FLAG) == ES8326_HPINSERT_FLAG) { 65 | if ((iface & ES8326_HPBUTTON_FLAG) == 0x00) { 66 | dev_dbg(comp->dev, "Headset detected"); 67 | snd_soc_jack_report(es8326->jack, SND_JACK_HEADSET, SND_JACK_HEADSET); 68 | snd_soc_component_write(comp, ES8326_ADC1_SRC_2A, es8326->mic1_src); 69 | } else { 70 | dev_dbg(comp->dev, "Headphone detected"); 71 | snd_soc_jack_report(es8326->jack, SND_JACK_HEADPHONE, SND_JACK_HEADSET); 72 | } 73 | } 74 | } 75 | 76 | static irqreturn_t es8326_irq(int irq, void *dev_id) 77 | { 78 | struct es8326_priv *es8326 = dev_id; 79 | struct snd_soc_component *comp = es8326->component; 80 | 81 | snd_soc_component_write(comp, ES8326_ANA_MICBIAS_1B, 0x7c); 82 | 83 | queue_delayed_work(system_wq, &es8326->jack_detect_work, 84 | msecs_to_jiffies(300)); 85 | 86 | return IRQ_HANDLED; 87 | } 88 | 89 | static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(dac_vol_tlv, -9550, 50, 0); 90 | static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(adc_vol_tlv, -9550, 50, 0); 91 | static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(adc_analog_pga_tlv, 0, 300, 0); 92 | static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(adc_pga_tlv, 0, 600, 0); 93 | static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(softramp_rate, 0, 100, 0); 94 | static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(drc_target_tlv, -3200, 200, 0); 95 | static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(drc_recovery_tlv, -125, 250, 0); 96 | 97 | static const char *const winsize[] = { 98 | "0.25db/2 LRCK", 99 | "0.25db/4 LRCK", 100 | "0.25db/8 LRCK", 101 | "0.25db/16 LRCK", 102 | "0.25db/32 LRCK", 103 | "0.25db/64 LRCK", 104 | "0.25db/128 LRCK", 105 | "0.25db/256 LRCK", 106 | "0.25db/512 LRCK", 107 | "0.25db/1024 LRCK", 108 | "0.25db/2048 LRCK", 109 | "0.25db/4096 LRCK", 110 | "0.25db/8192 LRCK", 111 | "0.25db/16384 LRCK", 112 | "0.25db/32768 LRCK", 113 | "0.25db/65536 LRCK", 114 | }; 115 | 116 | static const char *const dacpol_txt[] = { 117 | "Normal", "R Invert", "L Invert", "L + R Invert" }; 118 | static const struct soc_enum dacpol = 119 | SOC_ENUM_SINGLE(0x4d, 4, 4, dacpol_txt); 120 | static const struct soc_enum alc_winsize = 121 | SOC_ENUM_SINGLE(0x2e, 4, 16, winsize); 122 | static const struct soc_enum drc_winsize = 123 | SOC_ENUM_SINGLE(0x54, 4, 16, winsize); 124 | static const struct snd_kcontrol_new es8326_snd_controls[] = { 125 | SOC_SINGLE_TLV("DAC Playback Volume", ES8326_DAC_VOL_50, 0, 0xbf, 0, dac_vol_tlv), 126 | SOC_ENUM("Playback Polarity", dacpol), 127 | SOC_SINGLE_TLV("DAC Ramp Rate", ES8326_DAC_RAMPRATE_4E, 0, 0x0f, 0, softramp_rate), 128 | SOC_SINGLE_TLV("DRC Recovery Level", ES8326_DRC_RECOVERY_53, 0, 4, 0, drc_recovery_tlv), 129 | SOC_ENUM("DRC Winsize", drc_winsize), 130 | SOC_SINGLE_TLV("DRC Target Level", ES8326_DRC_WINSIZE_54, 0, 0x0f, 0, drc_target_tlv), 131 | 132 | SOC_DOUBLE_R_TLV("ADC Capture Volume", ES8326_ADC1_VOL_2C, ES8326_ADC2_VOL_2D, 0, 0xff, 0, 133 | adc_vol_tlv), 134 | SOC_DOUBLE_TLV("ADC PGA Volume", ES8326_ADC_SCALE_29, 4, 0, 5, 0, adc_pga_tlv), 135 | SOC_SINGLE_TLV("ADC PGA Gain Volume", ES8326_PAGGAIN_23, 0, 10, 0, adc_analog_pga_tlv), 136 | SOC_SINGLE_TLV("ADC Ramp Rate", ES8326_ADC_RAMPRATE_2E, 0, 0x0f, 0, softramp_rate), 137 | SOC_SINGLE("ALC Capture Switch", ES8326_ALC_RECOVERY_32, 3, 1, 0), 138 | SOC_SINGLE_TLV("ALC Capture Recovery Level", ES8326_ALC_LEVEL_33, 0, 4, 0, drc_recovery_tlv), 139 | SOC_ENUM("ALC Capture Winsize", alc_winsize), 140 | SOC_SINGLE_TLV("ALC Capture Target Level", ES8326_ALC_LEVEL_33, 0, 0x0f, 0, drc_target_tlv), 141 | }; 142 | 143 | static const struct snd_soc_dapm_widget es8326_dapm_widgets[] = { 144 | SND_SOC_DAPM_INPUT("MIC1"), 145 | SND_SOC_DAPM_INPUT("MIC2"), 146 | 147 | SND_SOC_DAPM_ADC("Right ADC", NULL, SND_SOC_NOPM, 0, 0), 148 | SND_SOC_DAPM_ADC("Left ADC", NULL, SND_SOC_NOPM, 0, 0), 149 | 150 | /* Digital Interface */ 151 | SND_SOC_DAPM_AIF_OUT("I2S OUT", "I2S1 Capture", 0, SND_SOC_NOPM, 0, 0), 152 | SND_SOC_DAPM_AIF_IN("I2S IN", "I2S1 Playback", 0, SND_SOC_NOPM, 0, 0), 153 | 154 | SND_SOC_DAPM_DAC("Right DAC", NULL, ES8326_ANA_PDN_16, 0, 1), 155 | SND_SOC_DAPM_DAC("Left DAC", NULL, ES8326_ANA_PDN_16, 1, 1), 156 | SND_SOC_DAPM_PGA("LHPMIX", ES8326_DAC2HPMIX_25, 7, 0, NULL, 0), 157 | SND_SOC_DAPM_PGA("RHPMIX", ES8326_DAC2HPMIX_25, 3, 0, NULL, 0), 158 | //SND_SOC_DAPM_SUPPLY("HPOR Cal", ES8326_HP_CAL_27, 7, 1, NULL, 0), 159 | //SND_SOC_DAPM_SUPPLY("HPOL Cal", ES8326_HP_CAL_27, 3, 1, NULL, 0), 160 | //SND_SOC_DAPM_REG(snd_soc_dapm_supply, "HPOR Supply", ES8326_HP_CAL_27, 161 | // ES8326_HPOR_SHIFT, 7, 7, 0), 162 | //SND_SOC_DAPM_REG(snd_soc_dapm_supply, "HPOL Supply", ES8326_HP_CAL_27, 163 | // 0, 7, 7, 0), 164 | SND_SOC_DAPM_OUTPUT("HPOL"), 165 | SND_SOC_DAPM_OUTPUT("HPOR"), 166 | }; 167 | 168 | static const struct snd_soc_dapm_route es8326_dapm_routes[] = { 169 | {"Left ADC", NULL, "MIC1"}, 170 | {"Right ADC", NULL, "MIC2"}, 171 | 172 | {"I2S OUT", NULL, "Left ADC"}, 173 | {"I2S OUT", NULL, "Right ADC"}, 174 | 175 | {"Right DAC", NULL, "I2S IN"}, 176 | {"Left DAC", NULL, "I2S IN"}, 177 | 178 | {"LHPMIX", NULL, "Left DAC"}, 179 | {"RHPMIX", NULL, "Right DAC"}, 180 | 181 | //{"HPOR", NULL, "HPOR Cal"}, 182 | //{"HPOL", NULL, "HPOL Cal"}, 183 | //{"HPOR", NULL, "HPOR Supply"}, 184 | //HPOL", NULL, "HPOL Supply"}, 185 | 186 | {"HPOL", NULL, "LHPMIX"}, 187 | {"HPOR", NULL, "RHPMIX"}, 188 | }; 189 | static bool es8326_volatile_register(struct device *dev, unsigned int reg) 190 | { 191 | switch (reg) { 192 | case 0xfb: 193 | case 0xfc: 194 | case 0x27: 195 | return true; 196 | default: 197 | return false; 198 | } 199 | } 200 | const struct regmap_config es8326_regmap_config = { 201 | .reg_bits = 8, 202 | .val_bits = 8, 203 | .max_register = 0xff, 204 | .volatile_reg = es8326_volatile_register, 205 | .cache_type = REGCACHE_RBTREE, 206 | }; 207 | 208 | struct _coeff_div { 209 | u16 fs; 210 | u32 rate; 211 | u32 mclk; 212 | u8 reg4; 213 | u8 reg5; 214 | u8 reg6; 215 | u8 reg7; 216 | u8 reg8; 217 | u8 reg9; 218 | u8 rega; 219 | u8 regb; 220 | }; 221 | 222 | /* codec hifi mclk clock divider coefficients */ 223 | /* {ratio, LRCK, MCLK, REG04, REG05, REG06, REG07, REG08, REG09, REG10, REG11} */ 224 | static const struct _coeff_div coeff_div[] = { 225 | {32, 8000, 256000, 0x60, 0x00, 0x0F, 0x75, 0x0A, 0x1B, 0x1F, 0x7F}, 226 | {32, 16000, 512000, 0x20, 0x00, 0x0D, 0x75, 0x0A, 0x1B, 0x1F, 0x3F}, 227 | {32, 44100, 1411200, 0x00, 0x00, 0x13, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 228 | {32, 48000, 1536000, 0x00, 0x00, 0x13, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 229 | {36, 8000, 288000, 0x20, 0x00, 0x0D, 0x75, 0x0A, 0x1B, 0x23, 0x47}, 230 | {36, 16000, 576000, 0x20, 0x00, 0x0D, 0x75, 0x0A, 0x1B, 0x23, 0x47}, 231 | {48, 8000, 384000, 0x60, 0x02, 0x1F, 0x75, 0x0A, 0x1B, 0x1F, 0x7F}, 232 | {48, 16000, 768000, 0x20, 0x02, 0x0F, 0x75, 0x0A, 0x1B, 0x1F, 0x3F}, 233 | {48, 48000, 2304000, 0x00, 0x02, 0x0D, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 234 | {64, 8000, 512000, 0x60, 0x00, 0x0D, 0x75, 0x0A, 0x1B, 0x1F, 0x7F}, 235 | {64, 16000, 1024000, 0x20, 0x00, 0x05, 0x75, 0x0A, 0x1B, 0x1F, 0x3F}, 236 | 237 | {64, 44100, 2822400, 0x00, 0x00, 0x11, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 238 | {64, 48000, 3072000, 0x00, 0x00, 0x11, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 239 | {72, 8000, 576000, 0x20, 0x00, 0x13, 0x35, 0x0A, 0x1B, 0x23, 0x47}, 240 | {72, 16000, 1152000, 0x20, 0x00, 0x05, 0x75, 0x0A, 0x1B, 0x23, 0x47}, 241 | {96, 8000, 768000, 0x60, 0x02, 0x1D, 0x75, 0x0A, 0x1B, 0x1F, 0x7F}, 242 | {96, 16000, 1536000, 0x20, 0x02, 0x0D, 0x75, 0x0A, 0x1B, 0x1F, 0x3F}, 243 | {100, 48000, 4800000, 0x04, 0x04, 0x3F, 0x6D, 0x38, 0x08, 0x4f, 0x1f}, 244 | {125, 48000, 6000000, 0x04, 0x04, 0x1F, 0x2D, 0x0A, 0x0A, 0x27, 0x27}, 245 | {128, 8000, 1024000, 0x60, 0x00, 0x13, 0x35, 0x0A, 0x1B, 0x1F, 0x7F}, 246 | {128, 16000, 2048000, 0x20, 0x00, 0x11, 0x35, 0x0A, 0x1B, 0x1F, 0x3F}, 247 | 248 | {128, 44100, 5644800, 0x00, 0x00, 0x01, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 249 | {128, 48000, 6144000, 0x00, 0x00, 0x01, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 250 | {144, 8000, 1152000, 0x20, 0x00, 0x03, 0x35, 0x0A, 0x1B, 0x23, 0x47}, 251 | {144, 16000, 2304000, 0x20, 0x00, 0x11, 0x35, 0x0A, 0x1B, 0x23, 0x47}, 252 | {192, 8000, 1536000, 0x60, 0x02, 0x0D, 0x75, 0x0A, 0x1B, 0x1F, 0x7F}, 253 | {192, 16000, 3072000, 0x20, 0x02, 0x05, 0x75, 0x0A, 0x1B, 0x1F, 0x3F}, 254 | {200, 48000, 9600000, 0x04, 0x04, 0x0F, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 255 | {250, 48000, 12000000, 0x04, 0x04, 0x0F, 0x2D, 0x0A, 0x0A, 0x27, 0x27}, 256 | {256, 8000, 2048000, 0x60, 0x00, 0x11, 0x35, 0x0A, 0x1B, 0x1F, 0x7F}, 257 | {256, 16000, 4096000, 0x20, 0x00, 0x01, 0x35, 0x0A, 0x1B, 0x1F, 0x3F}, 258 | 259 | {256, 44100, 11289600, 0x00, 0x00, 0x10, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 260 | {256, 48000, 12288000, 0x00, 0x00, 0x30, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 261 | {288, 8000, 2304000, 0x20, 0x00, 0x01, 0x35, 0x0A, 0x1B, 0x23, 0x47}, 262 | {384, 8000, 3072000, 0x60, 0x02, 0x05, 0x75, 0x0A, 0x1B, 0x1F, 0x7F}, 263 | {384, 16000, 6144000, 0x20, 0x02, 0x03, 0x35, 0x0A, 0x1B, 0x1F, 0x3F}, 264 | {384, 48000, 18432000, 0x00, 0x02, 0x01, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 265 | {400, 48000, 19200000, 0x09, 0x04, 0x0f, 0x6d, 0x3a, 0x0A, 0x4F, 0x1F}, 266 | {500, 48000, 24000000, 0x18, 0x04, 0x1F, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 267 | {512, 8000, 4096000, 0x60, 0x00, 0x01, 0x35, 0x0A, 0x1B, 0x1F, 0x7F}, 268 | {512, 16000, 8192000, 0x20, 0x00, 0x10, 0x35, 0x0A, 0x1B, 0x1F, 0x3F}, 269 | 270 | {512, 44100, 22579200, 0x00, 0x00, 0x00, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 271 | {512, 48000, 24576000, 0x00, 0x00, 0x00, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 272 | {768, 8000, 6144000, 0x60, 0x02, 0x11, 0x35, 0x0A, 0x1B, 0x1F, 0x7F}, 273 | {768, 16000, 12288000, 0x20, 0x02, 0x01, 0x35, 0x0A, 0x1B, 0x1F, 0x3F}, 274 | {800, 48000, 38400000, 0x00, 0x18, 0x13, 0x2D, 0x0A, 0x0A, 0x1F, 0x1F}, 275 | {1024, 8000, 8192000, 0x60, 0x00, 0x10, 0x35, 0x0A, 0x1B, 0x1F, 0x7F}, 276 | {1024, 16000, 16384000, 0x20, 0x00, 0x00, 0x35, 0x0A, 0x1B, 0x1F, 0x3F}, 277 | {1152, 16000, 18432000, 0x20, 0x08, 0x11, 0x35, 0x0A, 0x1B, 0x1F, 0x3F}, 278 | {1536, 8000, 12288000, 0x60, 0x02, 0x01, 0x35, 0x0A, 0x1B, 0x1F, 0x7F}, 279 | 280 | {1536, 16000, 24576000, 0x20, 0x02, 0x10, 0x35, 0x0A, 0x1B, 0x1F, 0x3F}, 281 | {1625, 8000, 13000000, 0x0C, 0x18, 0x1F, 0x2D, 0x0A, 0x0A, 0x27, 0x27}, 282 | {1625, 16000, 26000000, 0x0C, 0x18, 0x1F, 0x2D, 0x0A, 0x0A, 0x27, 0x27}, 283 | {2048, 8000, 16384000, 0x60, 0x00, 0x00, 0x35, 0x0A, 0x1B, 0x1F, 0x7F}, 284 | {2304, 8000, 18432000, 0x40, 0x02, 0x10, 0x35, 0x0A, 0x1B, 0x1F, 0x5F}, 285 | {3072, 8000, 24576000, 0x60, 0x02, 0x10, 0x35, 0x0A, 0x1B, 0x1F, 0x7F}, 286 | {3250, 8000, 26000000, 0x0C, 0x18, 0x0F, 0x2D, 0x0A, 0x0A, 0x27, 0x27}, 287 | 288 | }; 289 | 290 | static inline int get_coeff(int mclk, int rate) 291 | { 292 | int i; 293 | 294 | for (i = 0; i < ARRAY_SIZE(coeff_div); i++) { 295 | if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk) 296 | return i; 297 | } 298 | 299 | return -EINVAL; 300 | } 301 | 302 | static unsigned int es8326_rates[] = { 303 | 8000, 12000, 16000, 24000, 32000, 48000, 96000 304 | }; 305 | 306 | static struct snd_pcm_hw_constraint_list es8326_constraints = { 307 | .count = ARRAY_SIZE(es8326_rates), 308 | .list = es8326_rates, 309 | }; 310 | 311 | /* 312 | * Note that this should be called from init rather than from hw_params. 313 | */ 314 | static int es8326_set_dai_sysclk(struct snd_soc_dai *codec_dai, 315 | int clk_id, unsigned int freq, int dir) 316 | { 317 | struct snd_soc_component *codec = codec_dai->component; 318 | struct es8326_priv *es8326 = snd_soc_component_get_drvdata(codec); 319 | 320 | es8326->sysclk = freq; 321 | 322 | if (freq == 0) { 323 | es8326->sysclk_constraints->list = NULL; 324 | es8326->sysclk_constraints->count = 0; 325 | return 0; 326 | } 327 | 328 | es8326->sysclk_constraints = &es8326_constraints; 329 | return 0; 330 | } 331 | 332 | static int es8326_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) 333 | { 334 | struct snd_soc_component *component = codec_dai->component; 335 | u8 iface = 0; 336 | 337 | switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { 338 | case SND_SOC_DAIFMT_CBP_CFP: 339 | snd_soc_component_update_bits(component, ES8326_RESET_00, 340 | ES8326_MASTER_MODE_EN, ES8326_MASTER_MODE_EN); 341 | break; 342 | case SND_SOC_DAIFMT_CBC_CFC: 343 | break; 344 | default: 345 | return -EINVAL; 346 | } 347 | 348 | /* interface format */ 349 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { 350 | case SND_SOC_DAIFMT_I2S: 351 | break; 352 | case SND_SOC_DAIFMT_RIGHT_J: 353 | dev_err(component->dev, "Codec driver does not support right justified\n"); 354 | return -EINVAL; 355 | case SND_SOC_DAIFMT_LEFT_J: 356 | iface |= ES8326_DAIFMT_LEFT_J; 357 | break; 358 | case SND_SOC_DAIFMT_DSP_A: 359 | iface |= ES8326_DAIFMT_DSP_A; 360 | break; 361 | case SND_SOC_DAIFMT_DSP_B: 362 | iface |= ES8326_DAIFMT_DSP_B; 363 | break; 364 | default: 365 | return -EINVAL; 366 | } 367 | 368 | snd_soc_component_update_bits(component, ES8326_FMT_13, ES8326_DAIFMT_MASK, iface); 369 | 370 | return 0; 371 | } 372 | static int es8326_resume(struct snd_soc_component *component) 373 | { 374 | struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component); 375 | 376 | regmap_write(es8326->regmap, ES8326_CLK_CTL_01, ES8326_CLK_ON); 377 | /* Two channel ADC */ 378 | regmap_write(es8326->regmap, ES8326_PULLUP_CTL_F9, 0x02); 379 | regmap_write(es8326->regmap, ES8326_CLK_INV_02, 0x00); 380 | regmap_write(es8326->regmap, ES8326_CLK_DIV_CPC_0C, 0x1F); 381 | regmap_write(es8326->regmap, ES8326_CLK_VMIDS1_10, 0xC8); 382 | regmap_write(es8326->regmap, ES8326_CLK_VMIDS2_11, 0x88); 383 | regmap_write(es8326->regmap, ES8326_CLK_CAL_TIME_12, 0x20); 384 | regmap_write(es8326->regmap, ES8326_DAC_MUTE_14, 0x00); 385 | regmap_write(es8326->regmap, ES8326_ANA_LOWPOWER_19, 0xF0); 386 | regmap_write(es8326->regmap, ES8326_SYS_BIAS_1D, 0x08); 387 | regmap_write(es8326->regmap, ES8326_DAC2HPMIX_25, 0x22); 388 | regmap_write(es8326->regmap, ES8326_ADC1_SRC_2A, es8326->mic1_src); 389 | regmap_write(es8326->regmap, ES8326_ADC2_SRC_2B, es8326->mic2_src); 390 | regmap_write(es8326->regmap, ES8326_HPJACK_TIMER_56, 0x88); 391 | regmap_write(es8326->regmap, ES8326_HP_DET_57, 392 | // ES8326_HP_DET_SRC_PIN9 | es8326->jack_pol); 393 | 0x17); 394 | regmap_write(es8326->regmap, ES8326_INT_SOURCE_58, 0x08); 395 | regmap_write(es8326->regmap, ES8326_INTOUT_IO_59, 0x45); 396 | regmap_write(es8326->regmap, ES8326_RESET_00, ES8326_CSM_ON); 397 | snd_soc_component_update_bits(component, ES8326_PAGGAIN_23, 398 | ES8326_MIC_SEL_MASK, ES8326_MIC1_SEL); 399 | #if 1 400 | regmap_write(es8326->regmap, ES8326_SDINOUT1_IO_5A, 401 | (ES8326_IO_DMIC_CLK << ES8326_SDINOUT1_SHIFT)); 402 | regmap_write(es8326->regmap, ES8326_SDINOUT23_IO_5B, ES8326_IO_INPUT); 403 | regmap_write(es8326->regmap, ES8326_CLK_RESAMPLE_03, 0x05); 404 | regmap_write(es8326->regmap, ES8326_HP_DRVIER_24, 0x00); 405 | regmap_write(es8326->regmap, ES8326_VMIDSEL_18, 0x02); 406 | regmap_write(es8326->regmap, ES8326_ANA_PDN_16, 0x00); 407 | regmap_write(es8326->regmap, ES8326_PGA_PDN_17, 0x40); 408 | regmap_write(es8326->regmap, ES8326_DAC2HPMIX_25, 0xAA); 409 | regmap_write(es8326->regmap, ES8326_ADC_MUTE_15, 0x00); 410 | regmap_write(es8326->regmap, 0x23, 0x1a); 411 | regmap_write(es8326->regmap, 0x29, 0x55); 412 | regmap_write(es8326->regmap, 0x2c, 0xe1); 413 | regmap_write(es8326->regmap, 0x2d, 0xe1); 414 | //regmap_write(es8326->regmap, 0x50, 0x00); 415 | regmap_write(es8326->regmap, 0x51, 0x1a); 416 | regmap_write(es8326->regmap, 0x4e, 0xe1); 417 | #endif 418 | es8326->chip_state = 1; 419 | es8326_irq(es8326->irq, es8326); 420 | return 0; 421 | } 422 | static int es8326_pcm_hw_params(struct snd_pcm_substream *substream, 423 | struct snd_pcm_hw_params *params, 424 | struct snd_soc_dai *dai) 425 | { 426 | struct snd_soc_component *codec = dai->component; 427 | struct es8326_priv *es8326 = snd_soc_component_get_drvdata(codec); 428 | u8 srate = 0; 429 | int coeff; 430 | 431 | if(es8326->chip_state == 0) 432 | es8326_resume(codec); 433 | regmap_write(es8326->regmap, 0x50, 0xbf);//new 434 | regmap_write(es8326->regmap, 0x4e, 0xe2);//new 435 | queue_delayed_work(system_wq, &es8326->pcm_pop_work, msecs_to_jiffies(100)); 436 | coeff = get_coeff(es8326->sysclk, params_rate(params)); 437 | //coeff = get_coeff(4800000, params_rate(params)); 438 | /* bit size */ 439 | switch (params_format(params)) { 440 | case SNDRV_PCM_FORMAT_S16_LE: 441 | srate |= ES8326_S16_LE; 442 | break; 443 | case SNDRV_PCM_FORMAT_S20_3LE: 444 | srate |= ES8326_S20_3_LE; 445 | break; 446 | case SNDRV_PCM_FORMAT_S18_3LE: 447 | srate |= ES8326_S18_LE; 448 | break; 449 | case SNDRV_PCM_FORMAT_S24_LE: 450 | srate |= ES8326_S24_LE; 451 | break; 452 | case SNDRV_PCM_FORMAT_S32_LE: 453 | srate |= ES8326_S32_LE; 454 | break; 455 | default: 456 | break; 457 | } 458 | 459 | /* set iface & srate */ 460 | snd_soc_component_update_bits(codec, ES8326_FMT_13, ES8326_DATA_LEN_MASK, srate); 461 | 462 | if (coeff >= 0) { 463 | regmap_write(es8326->regmap, ES8326_CLK_DIV1_04, 464 | coeff_div[coeff].reg4); 465 | regmap_write(es8326->regmap, ES8326_CLK_DIV2_05, 466 | coeff_div[coeff].reg5); 467 | regmap_write(es8326->regmap, ES8326_CLK_DLL_06, 468 | coeff_div[coeff].reg6); 469 | regmap_write(es8326->regmap, ES8326_CLK_MUX_07, 470 | coeff_div[coeff].reg7); 471 | regmap_write(es8326->regmap, ES8326_CLK_ADC_SEL_08, 472 | coeff_div[coeff].reg8); 473 | regmap_write(es8326->regmap, ES8326_CLK_DAC_SEL_09, 474 | coeff_div[coeff].reg9); 475 | regmap_write(es8326->regmap, ES8326_CLK_ADC_OSR_0A, 476 | coeff_div[coeff].rega); 477 | regmap_write(es8326->regmap, ES8326_CLK_DAC_OSR_0B, 478 | coeff_div[coeff].regb); 479 | } 480 | 481 | return 0; 482 | } 483 | 484 | static int es8326_set_bias_level(struct snd_soc_component *codec, 485 | enum snd_soc_bias_level level) 486 | { 487 | struct es8326_priv *es8326 = snd_soc_component_get_drvdata(codec); 488 | int ret; 489 | 490 | switch (level) { 491 | case SND_SOC_BIAS_ON: 492 | if (!IS_ERR(es8326->mclk)) { 493 | if (snd_soc_component_get_bias_level(codec) == SND_SOC_BIAS_ON) { 494 | clk_disable_unprepare(es8326->mclk); 495 | } else { 496 | ret = clk_prepare_enable(es8326->mclk); 497 | if (ret) 498 | return ret; 499 | } 500 | } 501 | //regmap_write(es8326->regmap, ES8326_CLK_CTL_01, ES8326_CLK_ON); 502 | //regmap_write(es8326->regmap, ES8326_RESET_00, ES8326_PWRUP_SEQ_EN); 503 | regmap_write(es8326->regmap, 0x50, 0xbf);//new 504 | regmap_write(es8326->regmap, 0x4e, 0xe1);//new 505 | 506 | //regmap_write(es8326->regmap, ES8326_INTOUT_IO_59, 0x45); 507 | //regmap_write(es8326->regmap, ES8326_SDINOUT1_IO_5A, 508 | // (ES8326_IO_DMIC_CLK << ES8326_SDINOUT1_SHIFT)); 509 | //regmap_write(es8326->regmap, ES8326_SDINOUT23_IO_5B, ES8326_IO_INPUT); 510 | //regmap_write(es8326->regmap, ES8326_CLK_RESAMPLE_03, 0x05); 511 | //regmap_write(es8326->regmap, ES8326_HP_DRVIER_24, 0x00); 512 | //regmap_write(es8326->regmap, ES8326_VMIDSEL_18, 0x02); 513 | //regmap_write(es8326->regmap, ES8326_ANA_PDN_16, 0x00); 514 | //regmap_write(es8326->regmap, ES8326_PGA_PDN_17, 0x40); 515 | //regmap_write(es8326->regmap, ES8326_DAC2HPMIX_25, 0xAA); 516 | //regmap_write(es8326->regmap, ES8326_ADC_MUTE_15, 0x00); 517 | //regmap_write(es8326->regmap, ES8326_RESET_00, ES8326_CSM_ON); 518 | 519 | break; 520 | case SND_SOC_BIAS_PREPARE: 521 | break; 522 | case SND_SOC_BIAS_STANDBY: 523 | break; 524 | case SND_SOC_BIAS_OFF: 525 | break; 526 | if (es8326->mclk) 527 | clk_disable_unprepare(es8326->mclk); 528 | regmap_write(es8326->regmap, ES8326_ADC_MUTE_15, 0x1F); 529 | regmap_write(es8326->regmap, ES8326_DAC2HPMIX_25, 0x11); 530 | regmap_write(es8326->regmap, ES8326_RESET_00, ES8326_CSM_OFF); 531 | regmap_write(es8326->regmap, ES8326_PGA_PDN_17, 0xF8); 532 | regmap_write(es8326->regmap, ES8326_ANA_PDN_16, 0xFB); 533 | regmap_write(es8326->regmap, ES8326_VMIDSEL_18, 0x00); 534 | regmap_write(es8326->regmap, ES8326_HP_DRVIER_24, 0x0F); 535 | regmap_write(es8326->regmap, ES8326_INT_SOURCE_58, 0x08); 536 | regmap_write(es8326->regmap, ES8326_SDINOUT1_IO_5A, ES8326_IO_INPUT); 537 | regmap_write(es8326->regmap, ES8326_SDINOUT23_IO_5B, ES8326_IO_INPUT); 538 | regmap_write(es8326->regmap, ES8326_RESET_00, 539 | ES8326_CODEC_RESET | ES8326_PWRUP_SEQ_EN); 540 | //regmap_write(es8326->regmap, ES8326_CLK_CTL_01, ES8326_CLK_OFF); 541 | 542 | break; 543 | } 544 | 545 | return 0; 546 | } 547 | 548 | static void es8326_pcm_shutdown(struct snd_pcm_substream *substream, 549 | struct snd_soc_dai *dai) 550 | { 551 | struct snd_soc_component* component = dai->component; 552 | struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component); 553 | 554 | cancel_delayed_work(&es8326->pcm_pop_work); 555 | //snd_soc_component_write(component, 0x27, 0x00); 556 | regmap_write(es8326->regmap, 0x50, 0x00);//new 557 | regmap_write(es8326->regmap, 0x4e, 0xe0);//new 558 | regmap_write(es8326->regmap, 0x28, 0x87); 559 | regmap_write(es8326->regmap, 0x25, 0x11); 560 | regmap_write(es8326->regmap, 0x24, 0x0f); 561 | chip_state = 0; 562 | } 563 | 564 | static void pcm_pop_work_events(struct work_struct *work) 565 | { 566 | struct es8326_priv *es8326 = 567 | container_of(work, struct es8326_priv, pcm_pop_work.work); 568 | struct snd_soc_component *comp = es8326->component; 569 | unsigned int muteflag; 570 | unsigned int flag_27; 571 | 572 | #if 1 573 | muteflag = snd_soc_component_read(comp, 0xfc); 574 | if((muteflag & 0x01)&&(muteflag & 0x40)){ 575 | printk("es8326 pcm mute flag %#04x",muteflag); 576 | if(chip_state==0){ 577 | regmap_write(es8326->regmap, ES8326_INTOUT_IO_59, 0x45); 578 | regmap_write(es8326->regmap, ES8326_SDINOUT1_IO_5A, 579 | (ES8326_IO_DMIC_CLK << ES8326_SDINOUT1_SHIFT)); 580 | regmap_write(es8326->regmap, ES8326_SDINOUT23_IO_5B, ES8326_IO_INPUT); 581 | regmap_write(es8326->regmap, ES8326_CLK_RESAMPLE_03, 0x05); 582 | regmap_write(es8326->regmap, ES8326_HP_DRVIER_24, 0x20); 583 | regmap_write(es8326->regmap, 0x28, 0xa7); 584 | regmap_write(es8326->regmap, 0x28, 0x97); 585 | regmap_write(es8326->regmap, ES8326_VMIDSEL_18, 0x02); 586 | regmap_write(es8326->regmap, ES8326_ANA_PDN_16, 0x00); 587 | regmap_write(es8326->regmap, ES8326_PGA_PDN_17, 0x40); 588 | regmap_write(es8326->regmap, ES8326_DAC2HPMIX_25, 0xAA); 589 | regmap_write(es8326->regmap, ES8326_ADC_MUTE_15, 0x00); 590 | regmap_write(es8326->regmap, ES8326_RESET_00, ES8326_CSM_ON); 591 | 592 | regmap_write(es8326->regmap, 0x4d, 0x00); 593 | regmap_write(es8326->regmap, 0x27, 0x77); 594 | } 595 | chip_state++; 596 | if(chip_state==4){ 597 | regmap_write(es8326->regmap, 0x27, 0x00); 598 | printk("es8326 pcm 27 00"); 599 | chip_state=1; 600 | } 601 | }else{ 602 | regmap_write(es8326->regmap, ES8326_INTOUT_IO_59, 0x45); 603 | regmap_write(es8326->regmap, ES8326_SDINOUT1_IO_5A, 604 | (ES8326_IO_DMIC_CLK << ES8326_SDINOUT1_SHIFT)); 605 | regmap_write(es8326->regmap, ES8326_SDINOUT23_IO_5B, ES8326_IO_INPUT); 606 | regmap_write(es8326->regmap, ES8326_CLK_RESAMPLE_03, 0x05); 607 | regmap_write(es8326->regmap, ES8326_HP_DRVIER_24, 0x20); 608 | regmap_write(es8326->regmap, 0x28, 0xa7); 609 | regmap_write(es8326->regmap, 0x28, 0x97); 610 | regmap_write(es8326->regmap, ES8326_VMIDSEL_18, 0x02); 611 | regmap_write(es8326->regmap, ES8326_ANA_PDN_16, 0x00); 612 | regmap_write(es8326->regmap, ES8326_PGA_PDN_17, 0x40); 613 | regmap_write(es8326->regmap, ES8326_DAC2HPMIX_25, 0xAA); 614 | regmap_write(es8326->regmap, ES8326_ADC_MUTE_15, 0x00); 615 | regmap_write(es8326->regmap, ES8326_RESET_00, ES8326_CSM_ON); 616 | 617 | regmap_write(es8326->regmap, 0x4d, 0x00); 618 | regmap_write(es8326->regmap, 0x27, 0x77); 619 | chip_state=1; 620 | printk("es8326 pcm normal flag %#04x",muteflag); 621 | } 622 | queue_delayed_work(system_wq, &es8326->pcm_pop_work, msecs_to_jiffies(50)); 623 | #endif 624 | } 625 | 626 | static void __exit pcm_pop_work_exit(struct es8326_priv *es8326) 627 | { 628 | int ret; 629 | ret = cancel_delayed_work(&es8326->pcm_pop_work); 630 | } 631 | #define es8326_RATES SNDRV_PCM_RATE_8000_96000 632 | 633 | #define es8326_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 634 | SNDRV_PCM_FMTBIT_S24_LE) 635 | 636 | static const struct snd_soc_dai_ops es8326_ops = { 637 | .hw_params = es8326_pcm_hw_params, 638 | .shutdown = es8326_pcm_shutdown, 639 | .set_fmt = es8326_set_dai_fmt, 640 | .set_sysclk = es8326_set_dai_sysclk, 641 | }; 642 | 643 | static struct snd_soc_dai_driver es8326_dai = { 644 | .name = "ES8326 HiFi", 645 | .playback = { 646 | .stream_name = "Playback", 647 | .channels_min = 1, 648 | .channels_max = 2, 649 | .rates = es8326_RATES, 650 | .formats = es8326_FORMATS, 651 | }, 652 | .capture = { 653 | .stream_name = "Capture", 654 | .channels_min = 1, 655 | .channels_max = 2, 656 | .rates = es8326_RATES, 657 | .formats = es8326_FORMATS, 658 | }, 659 | .ops = &es8326_ops, 660 | .symmetric_rate = 1, 661 | }; 662 | 663 | 664 | static int es8326_probe(struct snd_soc_component *component) 665 | { 666 | struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component); 667 | int ret; 668 | u8 reg; 669 | 670 | es8326->chip_state = 0; 671 | es8326->component = component; 672 | es8326->jd_inverted = device_property_read_bool(component->dev, 673 | "everest,jack-detect-inverted"); 674 | 675 | ret = device_property_read_u8(component->dev, "everest,mic1-src", &es8326->mic1_src); 676 | if (ret != 0) { 677 | dev_dbg(component->dev, "mic1-src return %d", ret); 678 | es8326->mic1_src = ES8326_ADC_AMIC; 679 | } 680 | dev_dbg(component->dev, "mic1-src %x", es8326->mic1_src); 681 | 682 | ret = device_property_read_u8(component->dev, "everest,mic2-src", &es8326->mic2_src); 683 | if (ret != 0) { 684 | dev_dbg(component->dev, "mic2-src return %d", ret); 685 | es8326->mic2_src = ES8326_ADC_DMIC; 686 | } 687 | dev_dbg(component->dev, "mic2-src %x", es8326->mic2_src); 688 | 689 | ret = device_property_read_u8(component->dev, "everest,jack-pol", &es8326->jack_pol); 690 | if (ret != 0) { 691 | dev_dbg(component->dev, "jack-pol return %d", ret); 692 | es8326->jack_pol = ES8326_HP_DET_BUTTON_POL | ES8326_HP_TYPE_OMTP; 693 | } 694 | dev_dbg(component->dev, "jack-pol %x", es8326->jack_pol); 695 | 696 | reg = snd_soc_component_read(component, ES8326_CHIP_VERSION_FF); 697 | if((reg && ES8326_VERSION_B) == 1) 698 | { 699 | regmap_write(es8326->regmap, ES8326_ANA_VSEL_1C, 0x7F); 700 | regmap_write(es8326->regmap, ES8326_VMIDLOW_22, 0x0F); 701 | regmap_write(es8326->regmap, ES8326_DAC2HPMIX_25, 0xAA); 702 | regmap_write(es8326->regmap, ES8326_HP_DRVIER_24, 0x20); 703 | } 704 | INIT_DELAYED_WORK(&es8326->pcm_pop_work, 705 | pcm_pop_work_events); 706 | 707 | return 0; 708 | } 709 | 710 | static void es8326_enable_jack_detect(struct snd_soc_component *component, 711 | struct snd_soc_jack *jack) 712 | { 713 | struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component); 714 | 715 | dev_dbg(component->dev, "Enter into %s\n", __func__); 716 | 717 | mutex_lock(&es8326->lock); 718 | if (es8326->jd_inverted) 719 | snd_soc_component_update_bits(component, ES8326_HP_DET_57, 720 | ES8326_HP_DET_JACK_POL, ~es8326->jack_pol); 721 | es8326->jack = jack; 722 | 723 | mutex_unlock(&es8326->lock); 724 | /* Enable irq and sync initial jack state */ 725 | enable_irq(es8326->irq); 726 | es8326_irq(es8326->irq, es8326); 727 | } 728 | static int es8326_suspend(struct snd_soc_component *component){ 729 | struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component); 730 | 731 | //cancel_delayed_work(&es8326->pcm_pop_work); 732 | return 0; 733 | } 734 | static void es8326_disable_jack_detect(struct snd_soc_component *component) 735 | { 736 | struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component); 737 | 738 | dev_dbg(component->dev, "Enter into %s\n", __func__); 739 | if (!es8326->jack) 740 | return; /* Already disabled (or never enabled) */ 741 | 742 | disable_irq(es8326->irq); 743 | cancel_delayed_work_sync(&es8326->jack_detect_work); 744 | pcm_pop_work_exit(es8326); 745 | mutex_lock(&es8326->lock); 746 | if (es8326->jack->status & SND_JACK_MICROPHONE) 747 | snd_soc_jack_report(es8326->jack, 0, SND_JACK_BTN_0); 748 | 749 | es8326->jack = NULL; 750 | mutex_unlock(&es8326->lock); 751 | } 752 | 753 | static int es8326_set_jack(struct snd_soc_component *component, 754 | struct snd_soc_jack *jack, void *data) 755 | { 756 | if (jack) 757 | es8326_enable_jack_detect(component, jack); 758 | else 759 | es8326_disable_jack_detect(component); 760 | 761 | return 0; 762 | } 763 | 764 | static void es8326_remove(struct snd_soc_component *component) 765 | { 766 | es8326_disable_jack_detect(component); 767 | es8326_set_bias_level(component, SND_SOC_BIAS_OFF); 768 | } 769 | 770 | static const struct snd_soc_component_driver soc_component_dev_es8326 = { 771 | .probe = es8326_probe, 772 | .remove = es8326_remove, 773 | .resume = es8326_resume, 774 | .suspend = es8326_suspend, 775 | .set_bias_level = es8326_set_bias_level, 776 | .set_jack = es8326_set_jack, 777 | 778 | .dapm_widgets = es8326_dapm_widgets, 779 | .num_dapm_widgets = ARRAY_SIZE(es8326_dapm_widgets), 780 | .dapm_routes = es8326_dapm_routes, 781 | .num_dapm_routes = ARRAY_SIZE(es8326_dapm_routes), 782 | .controls = es8326_snd_controls, 783 | .num_controls = ARRAY_SIZE(es8326_snd_controls), 784 | }; 785 | 786 | static int es8326_i2c_probe(struct i2c_client *i2c, 787 | const struct i2c_device_id *id) 788 | { 789 | struct es8326_priv *es8326; 790 | int ret; 791 | 792 | es8326 = devm_kzalloc(&i2c->dev, sizeof(struct es8326_priv), GFP_KERNEL); 793 | if (!es8326) 794 | return -ENOMEM; 795 | 796 | i2c_set_clientdata(i2c, es8326); 797 | es8326->i2c = i2c; 798 | mutex_init(&es8326->lock); 799 | es8326->regmap = devm_regmap_init_i2c(i2c, &es8326_regmap_config); 800 | if (IS_ERR(es8326->regmap)) { 801 | ret = PTR_ERR(es8326->regmap); 802 | dev_err(&i2c->dev, "Failed to init regmap: %d\n", ret); 803 | return ret; 804 | } 805 | 806 | es8326->irq = i2c->irq; 807 | /* ES8316 is level-based while ES8326 is edge-based */ 808 | ret = devm_request_threaded_irq(&i2c->dev, es8326->irq, NULL, es8326_irq, 809 | IRQF_TRIGGER_RISING | IRQF_ONESHOT, 810 | "es8326", es8326); 811 | if (ret == 0) 812 | disable_irq(es8326->irq); 813 | else 814 | dev_err(&i2c->dev, "Failed to reguest IRQ: %d\n", ret); 815 | INIT_DELAYED_WORK(&es8326->jack_detect_work, 816 | es8326_jack_detect_handler); 817 | 818 | es8326->mclk = devm_clk_get_optional(&i2c->dev, "mclk"); 819 | if (IS_ERR(es8326->mclk)) { 820 | dev_err(&i2c->dev, "unable to get mclk\n"); 821 | return PTR_ERR(es8326->mclk); 822 | } 823 | if (!es8326->mclk) 824 | dev_warn(&i2c->dev, "assuming static mclk\n"); 825 | 826 | ret = clk_prepare_enable(es8326->mclk); 827 | if (ret) { 828 | dev_err(&i2c->dev, "unable to enable mclk\n"); 829 | return ret; 830 | } 831 | return devm_snd_soc_register_component(&i2c->dev, 832 | &soc_component_dev_es8326, 833 | &es8326_dai, 1); 834 | } 835 | 836 | static const struct i2c_device_id es8326_i2c_id[] = { 837 | {"es8326", 0 }, 838 | {} 839 | }; 840 | MODULE_DEVICE_TABLE(i2c, es8326_i2c_id); 841 | 842 | #ifdef CONFIG_OF 843 | static const struct of_device_id es8326_of_match[] = { 844 | { .compatible = "everest, es8326", }, 845 | {} 846 | }; 847 | MODULE_DEVICE_TABLE(of, es8326_of_match); 848 | #endif 849 | 850 | #ifdef CONFIG_ACPI 851 | static const struct acpi_device_id es8326_acpi_match[] = { 852 | {"ESSX8326", 0}, 853 | {}, 854 | }; 855 | MODULE_DEVICE_TABLE(acpi, es8326_acpi_match); 856 | #endif 857 | 858 | static struct i2c_driver es8326_i2c_driver = { 859 | .driver = { 860 | .name = "es8326", 861 | .acpi_match_table = ACPI_PTR(es8326_acpi_match), 862 | .of_match_table = of_match_ptr(es8326_of_match), 863 | }, 864 | .probe = es8326_i2c_probe, 865 | }; 866 | module_i2c_driver(es8326_i2c_driver); 867 | 868 | MODULE_DESCRIPTION("ASoC es8326 driver"); 869 | MODULE_AUTHOR("David Yang "); 870 | MODULE_LICENSE("GPL"); 871 | 872 | 873 | 874 | -------------------------------------------------------------------------------- /ucm/sof-essx8336-8326-syntax2.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/sof-essx8336-8326-syntax2.tar.xz -------------------------------------------------------------------------------- /ucm/sof-essx8336-syntax2-8326.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/sof-essx8336-syntax2-8326.tar.xz -------------------------------------------------------------------------------- /ucm/ucm-2/sof-essx8336.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm-2/sof-essx8336.rar -------------------------------------------------------------------------------- /ucm/ucm-2/sof-essx8336/sof-essx8336.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm-2/sof-essx8336/sof-essx8336.zip -------------------------------------------------------------------------------- /ucm/ucm-2/sof-essx8336/sof-essx8336/HiFi.conf: -------------------------------------------------------------------------------- 1 | SectionVerb { 2 | EnableSequence [ 3 | cset "name='Headphone Playback Volume' 3,3" 4 | cset "name='Right Headphone Mixer Right DAC Switch' on" 5 | cset "name='Left Headphone Mixer Left DAC Switch' on" 6 | cset "name='DAC Playback Volume' 999,999" 7 | cset "name='Headphone Mixer Volume' 999,999" 8 | cset "name='ADC PGA Gain Volume' 999" 9 | cset "name='ADC Capture Volume' 999" 10 | cset "name='Internal Mic Switch' on" 11 | cset "name='Headset Mic Switch' on" 12 | cset "name='Speaker Switch' off" 13 | ] 14 | 15 | DisableSequence [ 16 | ] 17 | } 18 | 19 | 20 | SectionDevice."Headphones" { 21 | Comment "Headphones" 22 | 23 | Condition { 24 | Type ControlExists 25 | Control "name='Headphone Switch'" 26 | } 27 | True { 28 | EnableSequence [ 29 | cset "name='Headphone Switch' on" 30 | cset "name='Headphone Playback Volume' 3,3" 31 | cset "name='Right Headphone Mixer Right DAC Switch' on" 32 | cset "name='Left Headphone Mixer Left DAC Switch' on" 33 | cset "name='DAC Playback Volume' 999,999" 34 | cset "name='Headphone Mixer Volume' 999,999" 35 | ] 36 | DisableSequence [ 37 | cset "name='Headphone Switch' off" 38 | ] 39 | } 40 | 41 | Value { 42 | PlaybackPriority 9000 43 | PlaybackPCM "hw:${CardId}" 44 | PlaybackMixerElem "Headphone" 45 | PlaybackMasterElem "Master" 46 | PlaybackVolume "Headphone Volume" 47 | PlaybackSwitch "Headphone Switch" 48 | If.jack { 49 | Condition { 50 | Type ControlExists 51 | Control "iface=CARD,name='Headset Mic Jack'" 52 | } 53 | True { 54 | JackControl "Headset Mic Jack" 55 | } 56 | False { 57 | JackControl "Headphone Jack" 58 | } 59 | } 60 | } 61 | } 62 | 63 | SectionDevice."Speaker" { 64 | Comment "Speaker" 65 | 66 | Condition { 67 | Type ControlExists 68 | Control "name='Speaker Switch'" 69 | } 70 | True { 71 | EnableSequence [ 72 | cset "name='Speaker Switch' on" 73 | cset "name='Headphone Playback Volume' 3,3" 74 | cset "name='Right Headphone Mixer Right DAC Switch' on" 75 | cset "name='Left Headphone Mixer Left DAC Switch' on" 76 | cset "name='DAC Playback Volume' 999,999" 77 | cset "name='Headphone Mixer Volume' 999,999" 78 | ] 79 | 80 | DisableSequence [ 81 | cset "name='Speaker Switch' off" 82 | ] 83 | } 84 | False { 85 | EnableSequence [ 86 | cset "name='Speaker Switch' on" 87 | ] 88 | 89 | DisableSequence [ 90 | cset "name='Speaker Switch' off" 91 | ] 92 | } 93 | 94 | 95 | Value { 96 | PlaybackPriority 10000 97 | PlaybackPCM "hw:${CardId}" 98 | PlaybackMixerElem "Speaker" 99 | PlaybackMasterElem "Master" 100 | PlaybackVolume "Speaker Volume" 101 | PlaybackSwitch "Speaker Switch" 102 | } 103 | } 104 | 105 | If.hdmi1 { 106 | Condition { 107 | Type ControlExists 108 | Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'" 109 | } 110 | True { 111 | SectionDevice."HDMI1" { 112 | Comment "HDMI1/DP1 Output" 113 | 114 | EnableSequence [ 115 | cset "name='IEC958 Playback Switch' on" 116 | ] 117 | 118 | DisableSequence [ 119 | cset "name='IEC958 Playback Switch' off" 120 | ] 121 | 122 | Value { 123 | PlaybackPriority 5000 124 | PlaybackPCM "hw:${CardId},5" 125 | JackControl "HDMI/DP,pcm=5 Jack" 126 | } 127 | } 128 | } 129 | } 130 | 131 | If.hdmi2 { 132 | Condition { 133 | Type ControlExists 134 | Control "iface=CARD,name='HDMI/DP,pcm=6 Jack'" 135 | } 136 | True { 137 | SectionDevice."HDMI2" { 138 | Comment "HDMI2/DP2 Output" 139 | 140 | EnableSequence [ 141 | cset "name='IEC958 Playback Switch',index=1 on" 142 | ] 143 | 144 | DisableSequence [ 145 | cset "name='IEC958 Playback Switch',index=1 off" 146 | ] 147 | 148 | Value { 149 | PlaybackPriority 6000 150 | PlaybackPCM "hw:${CardId},6" 151 | JackControl "HDMI/DP,pcm=6 Jack" 152 | } 153 | } 154 | } 155 | } 156 | 157 | If.hdmi3 { 158 | Condition { 159 | Type ControlExists 160 | Control "iface=CARD,name='HDMI/DP,pcm=7 Jack'" 161 | } 162 | True { 163 | SectionDevice."HDMI3" { 164 | Comment "HDMI3/DP3 Output" 165 | 166 | EnableSequence [ 167 | cset "name='IEC958 Playback Switch',index=2 on" 168 | ] 169 | 170 | DisableSequence [ 171 | cset "name='IEC958 Playback Switch',index=2 off" 172 | ] 173 | 174 | Value { 175 | PlaybackPriority 7000 176 | PlaybackPCM "hw:${CardId},7" 177 | JackControl "HDMI/DP,pcm=7 Jack" 178 | } 179 | } 180 | } 181 | } 182 | 183 | If.monomic { 184 | Condition { 185 | Type ControlExists 186 | Control "name='Input Source'" 187 | ControlEnum "Headphone Mic" 188 | } 189 | After.SectionDevice "Mic1" 190 | True { 191 | SectionDevice."Mic2" { 192 | Comment "Headphones Stereo Microphone" 193 | 194 | ConflictingDevice [ 195 | "Headset" 196 | ] 197 | 198 | EnableSequence [ 199 | cset "name='Input Source' 'Headphone Mic'" 200 | ] 201 | 202 | Value { 203 | CapturePriority 200 204 | 205 | JackControl "Headphone Mic Jack" 206 | } 207 | } 208 | 209 | SectionDevice."Headset" { 210 | Comment "Headset Mono Microphone" 211 | 212 | EnableSequence [ 213 | cset "name='Input Source' Headset Mic" 214 | ] 215 | 216 | Value { 217 | CapturePriority 300 218 | 219 | JackControl "Headphone Mic Jack" 220 | } 221 | } 222 | } 223 | False { 224 | SectionDevice."Mic2" { 225 | Comment "Headphones Stereo Microphone" 226 | 227 | Value { 228 | CapturePriority 200 229 | 230 | JackControl "Mic Jack" 231 | } 232 | } 233 | } 234 | } 235 | 236 | -------------------------------------------------------------------------------- /ucm/ucm-2/sof-essx8336/sof-essx8336/sof-essx8326.conf: -------------------------------------------------------------------------------- 1 | Syntax 2 2 | 3 | SectionUseCase."HiFi" { 4 | File "HiFi.conf" 5 | Comment "Play HiFi quality Music" 6 | } 7 | -------------------------------------------------------------------------------- /ucm/ucm-2/sof-essx8336/sof-essx8336/sof-essx8336.conf: -------------------------------------------------------------------------------- 1 | Syntax 2 2 | 3 | SectionUseCase."HiFi" { 4 | File "HiFi.conf" 5 | Comment "Play HiFi quality Music" 6 | } 7 | -------------------------------------------------------------------------------- /ucm/ucm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | chip_id=$(sudo ls /sys/bus/i2c/devices/ | grep 8326) 4 | ucm=0 #ucm syntax 5 | if [ ! -d /usr/share/alsa/ucm2 ] 6 | then 7 | ucm=1 #syntax 1 8 | elif [ ! -d /usr/share/alsa/ucm2/conf.d ] 9 | then 10 | ucm=2 #syntax 2 11 | else 12 | ucm=4 #syntax 4 13 | fi 14 | 15 | if [ $chip_id ] && [ $ucm = 1 ] 16 | then 17 | echo "8326 ucm" 18 | elif [ $chip_id ] && [ $ucm = 2 ] 19 | then 20 | echo "8326 ucm2" 21 | cp -r ./ucm2/es8326/sof-essx8336 /usr/share/alsa/ucm2/ 22 | elif [ $chip_id ] && [ $ucm = 4 ] 23 | then 24 | echo "8326 ucm latest" 25 | cp -r ./ucm2_latest/sof-essx8336 /usr/share/alsa/ucm2/conf.d 26 | cp -r ./ucm2_latest/sof-essx8336 /usr/share/alsa/ucm2/Intel 27 | cp /usr/share/alsa/ucm2/conf.d/sof-essx8336/HiFi_8326.conf /usr/share/alsa/ucm2/conf.d/sof-essx8336/HiFi.conf 28 | elif [ ! $chip_id ] && [ $ucm = 1 ] 29 | then 30 | echo "8336 ucm" 31 | cp -r ./ucm/sof-essx8336 /usr/share/alsa/ucm/ 32 | elif [ ! $chip_id ] && [ $ucm = 2 ] 33 | then 34 | echo "8336 ucm2" 35 | cp -r ./ucm2/es8336/sof-essx8336 /usr/share/alsa/ucm2/ 36 | elif [ ! $chip_id ] && [ $ucm = 4 ] 37 | then 38 | echo "8336 ucm latest" 39 | cp -r ./ucm2_latest/sof-essx8336 /usr/share/alsa/ucm2/conf.d 40 | cp -r ./ucm2_latest/sof-essx8336 /usr/share/alsa/ucm2/Intel 41 | fi 42 | -------------------------------------------------------------------------------- /ucm/ucm/sof-essx8336/Hdmi1: -------------------------------------------------------------------------------- 1 | # Usecase for device HDMI1/Display Port stereo playback on Intel SKYLAKE/KABYLAKE platforms 2 | # For Audio in I2S mode 3 | 4 | SectionDevice."Hdmi1" { 5 | Comment "HDMI/Display Port 1 Stereo" 6 | 7 | EnableSequence [ 8 | cdev "hw:sofessx8336" 9 | cset "name='IEC958 Playback Switch' on" 10 | ] 11 | 12 | DisableSequence [ 13 | cset "name='IEC958 Playback Switch' off" 14 | ] 15 | 16 | Value { 17 | PlaybackPCM "hw:sofessx8336,5" 18 | PlaybackChannels "2" 19 | PlaybackPriority "3" 20 | JackControl "HDMI/DP, pcm=5 Jack" 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /ucm/ucm/sof-essx8336/Hdmi2: -------------------------------------------------------------------------------- 1 | # Usecase for device HDMI2/Display Port stereo playback on Intel SKYLAKE/KABYLAKE platforms 2 | # For Audio in I2S mode 3 | 4 | SectionDevice."Hdmi2" { 5 | Comment "HDMI/Display Port 2 Stereo" 6 | 7 | EnableSequence [ 8 | ] 9 | 10 | DisableSequence [ 11 | ] 12 | 13 | Value { 14 | PlaybackPCM "hw:sofessx8336,6" 15 | PlaybackChannels "2" 16 | PlaybackPriority "4" 17 | JackControl "HDMI/DP, pcm=6 Jack" 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /ucm/ucm/sof-essx8336/HiFi: -------------------------------------------------------------------------------- 1 | # Usecase for stereo playback Speaker and Headset, Recording on DMIC and Headset MIC. 2 | # For Audio in I2S mode on Intel SKYLAKE/KABYLAKE platforms 3 | 4 | SectionVerb { 5 | 6 | EnableSequence [ 7 | cdev "hw:sofessx8336" 8 | cset "name='Headphone Playback Volume' 3,3" 9 | cset "name='Right Headphone Mixer Right DAC Switch' on" 10 | cset "name='Left Headphone Mixer Left DAC Switch' on" 11 | cset "name='DAC Playback Volume' 999,999" 12 | cset "name='Headphone Mixer Volume' 999,999" 13 | cset "name='ADC PGA Gain Volume' 999" 14 | cset "name='ADC Capture Volume' 999" 15 | cset "name='Internal Mic Switch' on" 16 | cset "name='Headset Mic Switch' on" 17 | ] 18 | 19 | DisableSequence [ 20 | cdev "hw:sofessx8336" 21 | ] 22 | 23 | Value { 24 | TQ "HiFi" 25 | CapturePCM "hw:sofessx8336" 26 | PlaybackPCM "hw:sofessx8336" 27 | } 28 | } 29 | 30 | SectionDevice."Headphones" { 31 | Comment "Headphones" 32 | 33 | ConflictingDevice [ 34 | "Speaker" 35 | ] 36 | EnableSequence [ 37 | cdev "hw:sofessx8336" 38 | cset "name='Headphone Switch' on" 39 | cset "name='Differential Mux' 'lin2-rin2'" 40 | ] 41 | 42 | DisableSequence [ 43 | 44 | cset "name='Headphone Switch' off" 45 | ] 46 | Value { 47 | PlaybackChannels "2" 48 | PlaybackPriority "1" 49 | JackControl "Headphone Jack" 50 | JackHWMute "Speaker" 51 | } 52 | } 53 | 54 | SectionDevice."Speaker" { 55 | Comment "Speaker" 56 | 57 | ConflictingDevice [ 58 | "Headphones" 59 | ] 60 | EnableSequence [ 61 | cdev "hw:sofessx8336" 62 | cset "name='Speaker Switch' on" 63 | cset "name='Differential Mux' 'lin1-rin1'" 64 | ] 65 | 66 | DisableSequence [ 67 | cset "name='Speaker Switch' off" 68 | ] 69 | Value { 70 | PlaybackChannels "2" 71 | PlaybackPriority "1" 72 | JackHWMute "Headphones" 73 | } 74 | } 75 | 76 | SectionDevice."Mic" { 77 | Comment "Mic" 78 | EnableSequence [ 79 | cdev "hw:sofessx8336" 80 | cset "name='Internal Mic Switch' on" 81 | cset "name='Headset Mic Switch' on" 82 | ] 83 | 84 | DisableSequence [ 85 | cdev "hw:sofessx8336" 86 | ] 87 | Value { 88 | CaptureChannels "2" 89 | CapturePriority "2" 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /ucm/ucm/sof-essx8336/sof-essx8336.conf: -------------------------------------------------------------------------------- 1 | # UCM for Intel SKYLAKE/KABYLAKE platforms 2 | # For Audio in I2S mode 3 | 4 | SectionUseCase."HiFi" { 5 | File "HiFi" 6 | Comment "Play and record HiFi quality Music" 7 | } 8 | 9 | SectionUseCase."Hdmi1" { 10 | File "Hdmi1" 11 | Comment "Play on Hdmi/DP 1" 12 | } 13 | 14 | SectionUseCase."Hdmi2" { 15 | File "Hdmi2" 16 | Comment "Play on Hdmi/DP 2" 17 | } 18 | 19 | ValueDefaults { 20 | PlaybackCTL "hw:sofessx8336" 21 | CaptureCTL "hw:sofessx8336" 22 | CaptureChannels "2" 23 | CapturePriority "2" 24 | } 25 | 26 | SectionDefaults [ 27 | cdev "hw:sofessx8336" 28 | ] 29 | -------------------------------------------------------------------------------- /ucm/ucm2/es8326/sof-essx8336/HiFi.conf: -------------------------------------------------------------------------------- 1 | SectionVerb { 2 | EnableSequence [ 3 | cset "name='DAC Playback Volume' 180,180" 4 | cset "name='ADC Capture Volume' 220,220" 5 | cset "name='ADC PGA Gain Volume' 10,10" 6 | cset "name='ADC PGA Volume' 5,5" 7 | ] 8 | 9 | DisableSequence [ 10 | ] 11 | } 12 | 13 | 14 | SectionDevice."Headphones" { 15 | Comment "Headphones" 16 | 17 | ConflictingDevice[ 18 | "Speaker" 19 | ] 20 | 21 | EnableSequence [ 22 | cset "name='Headphone Switch' on" 23 | ] 24 | DisableSequence [ 25 | cset "name='Headphone Switch' off" 26 | ] 27 | 28 | Value { 29 | PlaybackPriority 6000 30 | PlaybackPCM "hw:${CardId}" 31 | PlaybackMixerElem "Headphone" 32 | PlaybackMasterElem "Master" 33 | PlaybackVolume "Headphone Volume" 34 | PlaybackSwitch "Headphone Switch" 35 | JackControl "Headphone Jack" 36 | JackHWMute "Speaker" 37 | } 38 | } 39 | 40 | SectionDevice."Speaker" { 41 | Comment "Speaker" 42 | 43 | ConflictingDevice[ 44 | "Headphones" 45 | ] 46 | 47 | EnableSequence [ 48 | cset "name='Speaker Switch' on" 49 | 50 | ] 51 | 52 | DisableSequence [ 53 | cset "name='Speaker Switch' off" 54 | ] 55 | 56 | Value { 57 | PlaybackPriority 4000 58 | PlaybackPCM "hw:${CardId}" 59 | PlaybackMixerElem "Speaker" 60 | PlaybackMasterElem "Master" 61 | PlaybackVolume "Speaker Volume" 62 | PlaybackSwitch "Speaker Switch" 63 | JackHWMute "Headphones" 64 | } 65 | } 66 | 67 | If.hdmi1 { 68 | Condition { 69 | Type ControlExists 70 | Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'" 71 | } 72 | True { 73 | SectionDevice."HDMI1" { 74 | Comment "HDMI1/DP1 Output" 75 | 76 | EnableSequence [ 77 | cset "name='IEC958 Playback Switch' on" 78 | ] 79 | 80 | DisableSequence [ 81 | cset "name='IEC958 Playback Switch' off" 82 | ] 83 | 84 | Value { 85 | PlaybackPriority 5000 86 | PlaybackPCM "hw:${CardId},5" 87 | JackControl "HDMI/DP,pcm=5 Jack" 88 | } 89 | } 90 | } 91 | } 92 | 93 | If.hdmi2 { 94 | Condition { 95 | Type ControlExists 96 | Control "iface=CARD,name='HDMI/DP,pcm=6 Jack'" 97 | } 98 | True { 99 | SectionDevice."HDMI2" { 100 | Comment "HDMI2/DP2 Output" 101 | 102 | EnableSequence [ 103 | cset "name='IEC958 Playback Switch',index=1 on" 104 | ] 105 | 106 | DisableSequence [ 107 | cset "name='IEC958 Playback Switch',index=1 off" 108 | ] 109 | 110 | Value { 111 | PlaybackPriority 6000 112 | PlaybackPCM "hw:${CardId},6" 113 | JackControl "HDMI/DP,pcm=6 Jack" 114 | } 115 | } 116 | } 117 | } 118 | 119 | If.hdmi3 { 120 | Condition { 121 | Type ControlExists 122 | Control "iface=CARD,name='HDMI/DP,pcm=7 Jack'" 123 | } 124 | True { 125 | SectionDevice."HDMI3" { 126 | Comment "HDMI3/DP3 Output" 127 | 128 | EnableSequence [ 129 | cset "name='IEC958 Playback Switch',index=2 on" 130 | ] 131 | 132 | DisableSequence [ 133 | cset "name='IEC958 Playback Switch',index=2 off" 134 | ] 135 | 136 | Value { 137 | PlaybackPriority 7000 138 | PlaybackPCM "hw:${CardId},7" 139 | JackControl "HDMI/DP,pcm=7 Jack" 140 | } 141 | } 142 | } 143 | } 144 | 145 | If.monomic { 146 | Condition { 147 | Type ControlExists 148 | Control "name='Input Source'" 149 | ControlEnum "Headphone Mic" 150 | } 151 | After.SectionDevice "Mic1" 152 | True { 153 | SectionDevice."Mic2" { 154 | Comment "Headphones Stereo Microphone" 155 | 156 | ConflictingDevice [ 157 | "Headset" 158 | ] 159 | 160 | EnableSequence [ 161 | cset "name='Input Source' 'Headphone Mic'" 162 | ] 163 | 164 | Value { 165 | CapturePriority 200 166 | 167 | JackControl "Headphone Mic Jack" 168 | } 169 | } 170 | 171 | SectionDevice."Headset" { 172 | Comment "Headset Mono Microphone" 173 | 174 | EnableSequence [ 175 | cset "name='Input Source' Headset Mic" 176 | ] 177 | 178 | Value { 179 | CapturePriority 300 180 | 181 | JackControl "Headphone Mic Jack" 182 | } 183 | } 184 | } 185 | False { 186 | SectionDevice."Mic2" { 187 | Comment "Headphones Stereo Microphone" 188 | 189 | Value { 190 | CapturePriority 200 191 | 192 | JackControl "Mic Jack" 193 | } 194 | } 195 | } 196 | } 197 | 198 | -------------------------------------------------------------------------------- /ucm/ucm2/es8326/sof-essx8336/sof-essx8326.conf: -------------------------------------------------------------------------------- 1 | Syntax 2 2 | 3 | SectionUseCase."HiFi" { 4 | File "HiFi.conf" 5 | Comment "Play HiFi quality Music" 6 | } 7 | -------------------------------------------------------------------------------- /ucm/ucm2/es8326/sof-essx8336/sof-essx8336.conf: -------------------------------------------------------------------------------- 1 | Syntax 2 2 | 3 | SectionUseCase."HiFi" { 4 | File "HiFi.conf" 5 | Comment "Play HiFi quality Music" 6 | } 7 | -------------------------------------------------------------------------------- /ucm/ucm2/es8336/sof-essx8336.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2/es8336/sof-essx8336.zip -------------------------------------------------------------------------------- /ucm/ucm2/es8336/sof-essx8336/Hdmi.conf: -------------------------------------------------------------------------------- 1 | SectionDevice."HDMI1" { 2 | Comment "HDMI/Display Port 1 Stereo" 3 | EnableSequence [ 4 | cset "name='IEC958 Playback Switch' on" 5 | ] 6 | 7 | DisableSequence [ 8 | cset "name='IEC958 Playback Switch' off" 9 | ] 10 | Value { 11 | PlaybackPCM "hw:${CardId},5" 12 | PlaybackPriority 500 13 | If.1 { 14 | Condition { 15 | Type ControlExists 16 | Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'" 17 | } 18 | True { 19 | JackControl "HDMI/DP,pcm=5 Jack" 20 | } 21 | False { 22 | JackControl "HDMI/DP, pcm=5 Jack" 23 | } 24 | } 25 | } 26 | } 27 | 28 | SectionDevice."HDMI2" { 29 | Comment "HDMI/Display Port 2 Stereo" 30 | 31 | Value { 32 | PlaybackPCM "hw:${CardId},6" 33 | PlaybackPriority 600 34 | If.1 { 35 | Condition { 36 | Type ControlExists 37 | Control "iface=CARD,name='HDMI/DP,pcm=6 Jack'" 38 | } 39 | True { 40 | JackControl "HDMI/DP,pcm=6 Jack" 41 | } 42 | False { 43 | JackControl "HDMI/DP, pcm=6 Jack" 44 | } 45 | } 46 | } 47 | } 48 | 49 | SectionDevice."HDMI3" { 50 | Comment "HDMI/Display Port 3 Stereo" 51 | 52 | Value { 53 | PlaybackPCM "hw:${CardId},7" 54 | PlaybackPriority 700 55 | If.1 { 56 | Condition { 57 | Type ControlExists 58 | Control "iface=CARD,name='HDMI/DP,pcm=7 Jack'" 59 | } 60 | True { 61 | JackControl "HDMI/DP,pcm=7 Jack" 62 | } 63 | False { 64 | JackControl "HDMI/DP, pcm=7 Jack" 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ucm/ucm2/es8336/sof-essx8336/HiFi.conf: -------------------------------------------------------------------------------- 1 | SectionVerb { 2 | 3 | EnableSequence [ 4 | cset "name='Speaker Switch' on" 5 | cset "name='Headphone Playback Volume' 3,3" 6 | cset "name='Right Headphone Mixer Right DAC Switch' on" 7 | cset "name='Left Headphone Mixer Left DAC Switch' on" 8 | cset "name='DAC Playback Volume' 999,999" 9 | cset "name='Headphone Mixer Volume' 999,999" 10 | ] 11 | } 12 | 13 | SectionDevice."Mic" { 14 | Comment "Analog Microphone" 15 | 16 | ConflictingDevice [ 17 | "Headset" 18 | ] 19 | 20 | Value { 21 | CapturePriority 100 22 | CapturePCM "hw:${CardId}" 23 | } 24 | 25 | EnableSequence [ 26 | cset "name='Internal Mic Switch' on" 27 | cset "name='Headset Mic Switch' on" 28 | cset "name='ADC PGA Gain Volume' 999" 29 | cset "name='ADC Capture Volume' 160" 30 | cset "name='Internal Mic Switch' on" 31 | ] 32 | 33 | DisableSequence [ 34 | ] 35 | } 36 | 37 | SectionDevice."Speaker" { 38 | Comment "Speaker" 39 | 40 | ConflictingDevice [ 41 | "Headphones" 42 | ] 43 | 44 | EnableSequence [ 45 | cset "name='Speaker Switch' on" 46 | cset "name='Headphone Playback Volume' 3,3" 47 | cset "name='Right Headphone Mixer Right DAC Switch' on" 48 | cset "name='Left Headphone Mixer Left DAC Switch' on" 49 | cset "name='DAC Playback Volume' 999,999" 50 | cset "name='Headphone Mixer Volume' 999,999" 51 | cset "name='Differential Mux' 'lin1-rin1'" 52 | ] 53 | 54 | DisableSequence [ 55 | cset "name='Speaker Switch' off" 56 | ] 57 | Value { 58 | PlaybackPriority 100 59 | PlaybackPCM "hw:${CardId},0" 60 | PlaybackMixerElem "Speaker" 61 | PlaybackMasterElem "Master" 62 | PlaybackVolume "Speaker Volume" 63 | PlaybackSwitch "Speaker Switch" 64 | } 65 | } 66 | 67 | SectionDevice."Headphones" { 68 | Comment "Headphones" 69 | 70 | ConflictingDevice [ 71 | "Speaker" 72 | ] 73 | 74 | EnableSequence [ 75 | cset "name='Headphone Switch' on" 76 | cset "name='Headphone Playback Volume' 3,3" 77 | cset "name='Right Headphone Mixer Right DAC Switch' on" 78 | cset "name='Left Headphone Mixer Left DAC Switch' on" 79 | cset "name='DAC Playback Volume' 999,999" 80 | cset "name='Headphone Mixer Volume' 999,999" 81 | cset "name='Differential Mux' 'lin2-rin2'" 82 | ] 83 | 84 | DisableSequence [ 85 | cset "name='Headphone Switch' off" 86 | ] 87 | 88 | Value { 89 | PlaybackPriority 300 90 | PlaybackPCM "hw:${CardId},0" 91 | PlaybackMixerElem "Headphone" 92 | PlaybackMasterElem "Master" 93 | PlaybackVolume "Headphone Volume" 94 | PlaybackSwitch "Headphone Switch" 95 | JackControl "Headphone Jack" 96 | JackHWMute "Speaker" 97 | } 98 | } 99 | 100 | SectionDevice."Headset" { 101 | Comment "Headset Microphone" 102 | 103 | ConflictingDevice [ 104 | "Mic" 105 | ] 106 | 107 | EnableSequence [ 108 | cset "name='ADC PGA Gain Volume' 999" 109 | cset "name='ADC Capture Volume' 160" 110 | cset "name='Internal Mic Switch' on" 111 | cset "name='Headset Mic Switch' on" 112 | ] 113 | 114 | DisableSequence [ 115 | ] 116 | 117 | Value { 118 | CapturePriority 300 119 | CapturePCM "hw:${CardId}" 120 | JackControl "Headphone Jack" 121 | } 122 | } 123 | 124 | Include.hdmi.File "Hdmi.conf" 125 | -------------------------------------------------------------------------------- /ucm/ucm2/es8336/sof-essx8336/sof-essx8336.conf: -------------------------------------------------------------------------------- 1 | Syntax 3 2 | 3 | SectionUseCase."HiFi" { 4 | File "HiFi.conf" 5 | Comment "Play and record HiFi quality Music" 6 | } 7 | 8 | # the kcontrols initial values, which will be set by `alsactl init` 9 | 10 | If.headphone { 11 | Condition { 12 | Type ControlExists 13 | Control "name='Headphone Playback Volume'" 14 | } 15 | True.BootSequence [ 16 | cset "name='Headphone Playback Volume' 60%" 17 | ] 18 | } 19 | 20 | If.Capture { 21 | Condition { 22 | Type ControlExists 23 | Control "name='ADC Capture Volume'" 24 | } 25 | True.BootSequence [ 26 | cset "name='ADC Capture Volume' 60%" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /ucm/ucm2_latest/README.md: -------------------------------------------------------------------------------- 1 | # custom-kernel 2 | the kernel in sof.zip is built from https://github.com/plbossart/sound/tree/fix/sof-es8336-quirk 3 | unzip the sof.zip, you should see three deb files. Put them alongside the firmware.deb. Or install them by sudo dpkg -i *.deb 4 | 5 | `sudo su` 6 | 7 | `chmod +x make.sh` 8 | 9 | `./make.sh` 10 | 11 | 12 | Common errors: 13 | 14 | 1. missing topologies: unzip everything in es8336-topologies-2.tar.gz and copy *.tplg to /lib/firmware/intel/sof-tplg/ 15 | 2. i915 errors: install lastest sof firmware from sof website 16 | 3. wifi/display errors: compile your own kernel with the correct config in /boot/ and the lastest source code (currently 5.18). Select SND_SOC_INTEL_SOF_ES8336_MACH using menuconfig. 17 | 4. ucm errors: if `alsaucm reload` shows errors: 18 | 19 | 4.1. you are using ucm2: `sudo cp -r sof-essx8336 /usr/share/alsa/ucm2/` 20 | 21 | 4.2. you are using ucm: 22 | manually open the kcontrols using 23 | 24 | amixer cset name='Speaker Switch' on 25 | 26 | amixer cset name='Headphone Playback Volume' 3,3 27 | 28 | amixer cset name='Right Headphone Mixer Right DAC Switch' on 29 | 30 | amixer cset name='Left Headphone Mixer Left DAC Switch' on 31 | 32 | amixer cset name='DAC Playback Volume' 999,999 33 | 34 | amixer cset name='Headphone Mixer Volume' 999,999 35 | 36 | -------------------------------------------------------------------------------- /ucm/ucm2_latest/es8336-topologies-2.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/es8336-topologies-2.tar.gz -------------------------------------------------------------------------------- /ucm/ucm2_latest/grub: -------------------------------------------------------------------------------- 1 | # If you change this file, run 'update-grub' afterwards to update 2 | # /boot/grub/grub.cfg. 3 | # For full documentation of the options in this file, see: 4 | # info -f grub -n 'Simple configuration' 5 | 6 | GRUB_DEFAULT=0 7 | #GRUB_TIMEOUT_STYLE=hidden 8 | GRUB_TIMEOUT=10 9 | GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` 10 | GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 11 | GRUB_CMDLINE_LINUX="" 12 | 13 | # Uncomment to enable BadRAM filtering, modify to suit your needs 14 | # This works with Linux (no patch required) and with any kernel that obtains 15 | # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) 16 | #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" 17 | 18 | # Uncomment to disable graphical terminal (grub-pc only) 19 | #GRUB_TERMINAL=console 20 | 21 | # The resolution used on graphical terminal 22 | # note that you can use only modes which your graphic card supports via VBE 23 | # you can see them in real GRUB with the command `vbeinfo' 24 | #GRUB_GFXMODE=640x480 25 | 26 | # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux 27 | #GRUB_DISABLE_LINUX_UUID=true 28 | 29 | # Uncomment to disable generation of recovery mode menu entries 30 | #GRUB_DISABLE_RECOVERY="true" 31 | 32 | # Uncomment to get a beep at grub start 33 | #GRUB_INIT_TUNE="480 440 1" 34 | -------------------------------------------------------------------------------- /ucm/ucm2_latest/make.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo install intel firmware 4 | #sudo dpkg -i --force-overwrite *.deb 5 | 6 | echo copy topology 7 | cp ./tplg/* /lib/firmware/intel/sof-tplg/ 8 | cp ./tplg/sof-glk-es8336-ssp0.tplg /lib/firmware/intel/sof-tplg/sof-tgl-es8336-ssp0.tplg 9 | cp sof-jsl.ri /lib/firmware/intel/sof/ 10 | #echo get dsdt 11 | #cat /sys/firmware/acpi/tables/DSDT > dsdt.dat 12 | #iasl -d dsdt.dat 13 | 14 | #echo get gpio 15 | #cat /sys/kernel/debug/gpio>gpio.txt 16 | 17 | cp sof-dyndbg.conf.txt /etc/modprobe.d/sof-dyndbg.conf 18 | 19 | echo allow selecting kernel from grub 20 | #cp grub /etc/default/grub 21 | 22 | #chmod +x *.sh 23 | #systemctl enable acpid.service 24 | 25 | #cp 3.sh /lib/systemd/system-sleep/ 26 | 27 | echo setting up hdmi device 28 | #FOR 22.04 syntax4 29 | cp -r sof-essx8336 /usr/share/alsa/ucm2/conf.d 30 | cp -r sof-essx8336 /usr/share/alsa/ucm2/Intel 31 | sed -i '/load-module module-suspend-on-idle/d' /etc/pulse/default.pa 32 | 33 | -------------------------------------------------------------------------------- /ucm/ucm2_latest/sof-dyndbg.conf.txt: -------------------------------------------------------------------------------- 1 | # ACPI 2 | options snd_sof_acpi dyndbg=+p 3 | options snd_sof_acpi_intel_byt dyndbg=+p 4 | options snd_sof_acpi_intel_bdw dyndbg=+p 5 | options snd_sof_intel_byt dyndbg=+p 6 | options snd_sof_intel_bdw dyndbg=+p 7 | 8 | # PCI 9 | options snd_sof_pci dyndbg=+p 10 | options snd_sof_pci_intel_apl dyndbg=+p 11 | options snd_sof_pci_intel_cnl dyndbg=+p 12 | options snd_sof_pci_intel_icl dyndbg=+p 13 | options snd_sof_pci_intel_tgl dyndbg=+p 14 | 15 | # OF 16 | options snd_sof_of dyndbg=+p 17 | 18 | # DSP selection 19 | options snd_intel_dspcfg dyndbg=+p 20 | 21 | # SOF internals 22 | options snd_sof_intel_ipc dyndbg=+p 23 | options snd_sof_intel_hda_common dyndbg=+p 24 | options snd_sof_intel_hda dyndbg=+p 25 | options snd_sof dyndbg=+p 26 | options snd_sof_nocodec dyndbg=+p 27 | 28 | # SoundWire core 29 | options soundwire_bus dyndbg=+p 30 | options soundwire_generic_allocation dyndbg=+p 31 | options soundwire_cadence dyndbg=+p 32 | options soundwire_intel_init dyndbg=+p 33 | options soundwire_intel dyndbg=+p 34 | 35 | # SoundWire codecs 36 | options snd_soc_rt700 dyndbg=+p 37 | options snd_soc_rt5682_sdw dyndbg=+p 38 | options snd_soc_rt5682 dyndbg=+p 39 | options snd_soc_rt711 dyndbg=+p 40 | options snd_soc_rt1308_sdw dyndbg=+p 41 | options snd_soc_rt1308 dyndbg=+p 42 | options snd_soc_rt715 dyndbg=+p 43 | options snd_soc_max98373_sdw dyndbg=+p 44 | options snd_soc_max98373 dyndbg=+p 45 | options snd-soc-rt711-sdca dyndbg=+p 46 | options snd-soc-rt1316-sdw dyndbg=+p 47 | options snd-soc-rt715-sdca dyndbg=+p 48 | 49 | # test stuff 50 | options snd_sof_ipc_test dyndbg=+p 51 | options snd_sof_probes dyndbg=+p 52 | options snd_sof_intel_client dyndbg=+p 53 | options snd_sof_client dyndbg=+p 54 | options snd-sof-ipc-flood-test dyndbg=+p 55 | 56 | # Legacy machine drivers for APCI platforms 57 | options snd_soc_sst_bdw_rt5677_mach dyndbg=+p 58 | options snd_soc_sst_broadwell dyndbg=+p 59 | options snd_soc_sst_byt_cht_da7213 dyndbg=+p 60 | options snd_soc_sst_byt_cht_es8316 dyndbg=+p 61 | options snd_soc_sst_bytcr_rt5640 dyndbg=+p 62 | options snd_soc_sst_bytcr_rt5651 dyndbg=+p 63 | options snd_soc_sst_cht_bsw_max98090_ti dyndbg=+p 64 | options snd_soc_sst_cht_bsw_nau8824 dyndbg=+p 65 | options snd_soc_sst_cht_bsw_rt5645 dyndbg=+p 66 | options snd_soc_sst_cht_bsw_rt5672 dyndbg=+p 67 | 68 | # Machine drivers for PCI platforms 69 | options snd_soc_sof_rt5682 dyndbg=+p 70 | options snd_soc_sof_cs42l42 dyndbg=+p 71 | options snd_soc_sst_bxt_da7219_max98357a dyndbg=+p 72 | options snd_soc_sst_bxt_rt298 dyndbg=+p 73 | options snd_soc_sst_sof_pcm512x dyndbg=+p 74 | options snd_soc_sst_sof_wm8804 dyndbg=+p 75 | options snd_soc_sst_glk_rt5682_max98357a dyndbg=+p 76 | options snd_soc_cml_rt1011_rt5682 dyndbg=+p 77 | options snd_soc_skl_hda_dsp dyndbg=+p 78 | options snd_soc_sof_da7219_max98373 dyndbg=+p 79 | options snd_soc_ehl_rt5660 dyndbg=+p 80 | options snd_soc_sof_sdw dyndbg=+p 81 | options snd_soc_sof_essx8336 dyndbg=+p 82 | options snd_soc_sof_essx8336 dyndbg=+p 83 | options snd-soc-es8316 dyndbg=+p 84 | -------------------------------------------------------------------------------- /ucm/ucm2_latest/sof-essx8336-dmic.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/sof-essx8336-dmic.zip -------------------------------------------------------------------------------- /ucm/ucm2_latest/sof-essx8336.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/sof-essx8336.zip -------------------------------------------------------------------------------- /ucm/ucm2_latest/sof-essx8336/Hdmi.conf: -------------------------------------------------------------------------------- 1 | # Use case Configuration for sof-es8336 2 | 3 | If.hdmi1 { 4 | Condition { Type String Empty "" } 5 | True { 6 | Define { 7 | HdmiNum 1 8 | HdmiPCM 5 9 | HdmiCtlIndex 0 10 | HdmiPrio 500 11 | } 12 | Include.hdmi1.File "/codecs/hda/hdmi.conf" 13 | } 14 | } 15 | 16 | If.hdmi2 { 17 | Condition { Type String Empty "" } 18 | True { 19 | Define { 20 | HdmiNum 2 21 | HdmiPCM 6 22 | HdmiCtlIndex 1 23 | HdmiPrio 600 24 | } 25 | Include.hdmi2.File "/codecs/hda/hdmi.conf" 26 | } 27 | } 28 | 29 | If.hdmi3 { 30 | Condition { Type String Empty "" } 31 | True { 32 | Define { 33 | HdmiNum 3 34 | HdmiPCM 7 35 | HdmiCtlIndex 2 36 | HdmiPrio 700 37 | } 38 | Include.hdmi3.File "/codecs/hda/hdmi.conf" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ucm/ucm2_latest/sof-essx8336/HiFi.conf: -------------------------------------------------------------------------------- 1 | SectionVerb { 2 | EnableSequence [ 3 | # Disable all inputs / outputs 4 | cset "name='Speaker Switch' off" 5 | cset "name='Headphone Switch' off" 6 | cset "name='DAC Mono Mix Switch' off" 7 | ] 8 | } 9 | 10 | SectionDevice."Mic" { 11 | Comment "Analog Microphone" 12 | 13 | ConflictingDevice [ 14 | "Headset" 15 | ] 16 | 17 | EnableSequence [ 18 | cset "name='Internal Mic Switch' on" 19 | cset "name='ADC PGA Gain Volume' 10" 20 | cset "name='ADC Capture Volume' 150" 21 | cset "name='Headset Mic Switch' on" 22 | cset "name='Digital Mic Mux' 'dmic disable'" 23 | cset "name='Differential Mux' 'lin2-rin2'" 24 | ] 25 | 26 | DisableSequence [ 27 | ] 28 | 29 | Value { 30 | CapturePriority 100 31 | CapturePCM "hw:${CardId}" 32 | CaptureMixerElem "ADC PGA Gain" 33 | CaptureMasterElem "ADC" 34 | } 35 | } 36 | 37 | 38 | SectionDevice."Speaker" { 39 | Comment "Speaker" 40 | 41 | ConflictingDevice [ 42 | "Headphones" 43 | ] 44 | 45 | EnableSequence [ 46 | cset "name='Speaker Switch' on" 47 | cset "name='Headphone Playback Volume' 3,3" 48 | cset "name='Right Headphone Mixer Right DAC Switch' on" 49 | cset "name='Left Headphone Mixer Left DAC Switch' on" 50 | cset "name='DAC Playback Volume' 999,999" 51 | cset "name='Headphone Mixer Volume' 999,999" 52 | cset "name='Differential Mux' 'lin2-rin2'" 53 | ] 54 | 55 | DisableSequence [ 56 | cset "name='Speaker Switch' off" 57 | ] 58 | Value { 59 | PlaybackPriority 100 60 | PlaybackPCM "hw:${CardId}" 61 | # The es8316 only has a HP-amp which is muxed to the speaker 62 | # or to the headpones output 63 | PlaybackMixerElem "Headphone Mixer" 64 | PlaybackMasterElem "DAC" 65 | } 66 | } 67 | 68 | SectionDevice."Headphones" { 69 | Comment "Headphones" 70 | 71 | ConflictingDevice [ 72 | "Speaker" 73 | ] 74 | 75 | EnableSequence [ 76 | cset "name='Headset Mic Switch' on" 77 | cset "name='Headphone Playback Volume' 3,3" 78 | cset "name='Right Headphone Mixer Right DAC Switch' on" 79 | cset "name='Left Headphone Mixer Left DAC Switch' on" 80 | cset "name='DAC Playback Volume' 999,999" 81 | cset "name='Headphone Mixer Volume' 999,999" 82 | cset "name='Differential Mux' 'lin1-rin1'" 83 | ] 84 | 85 | Value { 86 | PlaybackPriority 300 87 | PlaybackPCM "hw:${CardId}" 88 | PlaybackMixerElem "Headphone Mixer" 89 | PlaybackMasterElem "DAC" 90 | JackControl "Headphone Jack" 91 | JackHWMute "Speaker" 92 | } 93 | } 94 | 95 | SectionDevice."Headset" { 96 | Comment "Headset" 97 | 98 | ConflictingDevice [ 99 | "Mic" 100 | ] 101 | 102 | 103 | EnableSequence [ 104 | cset "name='ADC PGA Gain Volume' 10" 105 | cset "name='ADC Capture Volume' 150" 106 | cset "name='Headset Mic Switch' on" 107 | cset "name='Digital Mic Mux' 'dmic disable'" 108 | cset "name='Internal Mic Switch' on" 109 | cset "name='Differential Mux' 'lin1-rin1'" 110 | ] 111 | 112 | DisableSequence [ 113 | ] 114 | 115 | Value { 116 | CapturePriority 300 117 | CapturePCM "hw:${CardId}" 118 | CaptureMixerElem "ADC PGA Gain" 119 | CaptureMasterElem "ADC" 120 | JackControl "Headphone Jack" 121 | } 122 | } 123 | 124 | If.hdmi1 { 125 | Condition { Type String Empty "" } 126 | True { 127 | Define { 128 | HdmiNum 1 129 | HdmiPCM 5 130 | HdmiCtlIndex 0 131 | HdmiPrio 500 132 | } 133 | Include.hdmi1.File "/codecs/hda/hdmi.conf" 134 | } 135 | } 136 | 137 | If.hdmi2 { 138 | Condition { Type String Empty "" } 139 | True { 140 | Define { 141 | HdmiNum 2 142 | HdmiPCM 6 143 | HdmiCtlIndex 1 144 | HdmiPrio 600 145 | } 146 | Include.hdmi2.File "/codecs/hda/hdmi.conf" 147 | } 148 | } 149 | 150 | If.hdmi3 { 151 | Condition { Type String Empty "" } 152 | True { 153 | Define { 154 | HdmiNum 3 155 | HdmiPCM 7 156 | HdmiCtlIndex 2 157 | HdmiPrio 700 158 | } 159 | Include.hdmi3.File "/codecs/hda/hdmi.conf" 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /ucm/ucm2_latest/sof-essx8336/HiFi_8326.conf: -------------------------------------------------------------------------------- 1 | SectionVerb { 2 | EnableSequence [ 3 | #disdevall "" 4 | # Disable all inputs / outputs 5 | # (may be duplicated with disdevall) 6 | #cset "name='Left Headphone Mixer Left DAC Switch' on" 7 | #cset "name='Right Headphone Mixer Right DAC Switch' on" 8 | ] 9 | } 10 | 11 | SectionDevice."Mic" { 12 | Comment "Analog Microphone" 13 | 14 | EnableSequence [ 15 | cset "name='Internal Mic Switch' on" 16 | cset "name='Headset Mic Switch' on" 17 | ] 18 | 19 | DisableSequence [ 20 | 21 | ] 22 | 23 | Value { 24 | CapturePriority 100 25 | CapturePCM "hw:${CardId}" 26 | CaptureMixerElem "ADC PGA Gain" 27 | CaptureMasterElem "ADC" 28 | } 29 | } 30 | 31 | SectionDevice."Speaker" { 32 | Comment "Speakers" 33 | 34 | ConflictingDevice [ 35 | "Headphones" 36 | ] 37 | 38 | EnableSequence [ 39 | cset "name='Speaker Switch' on" 40 | ] 41 | 42 | DisableSequence [ 43 | cset "name='Speaker Switch' off" 44 | ] 45 | Value { 46 | PlaybackPriority 100 47 | PlaybackPCM "hw:${CardId}" 48 | # The es8316 only has a HP-amp which is muxed to the speaker 49 | # or to the headpones output 50 | PlaybackMixerElem "Headphone Mixer" 51 | PlaybackMasterElem "DAC" 52 | } 53 | } 54 | 55 | SectionDevice."Headphones" { 56 | Comment "Headphones" 57 | 58 | ConflictingDevice [ 59 | "Speaker" 60 | ] 61 | 62 | Value { 63 | PlaybackPriority 300 64 | PlaybackPCM "hw:${CardId}" 65 | PlaybackMixerElem "Headphone Mixer" 66 | PlaybackMasterElem "DAC" 67 | JackControl "Headphone Jack" 68 | JackHWMute "Speaker" 69 | } 70 | } 71 | 72 | Include.hdmi.File "/Intel/sof-essx8336/Hdmi.conf" 73 | -------------------------------------------------------------------------------- /ucm/ucm2_latest/sof-essx8336/HiFi_8336.conf: -------------------------------------------------------------------------------- 1 | SectionVerb { 2 | EnableSequence [ 3 | # Disable all inputs / outputs 4 | cset "name='Speaker Switch' off" 5 | #cset "name='Headphone Switch' off" 6 | cset "name='Headphone Switch' on" 7 | cset "name='DAC Mono Mix Switch' off" 8 | cset "name='DAC Soft Ramp Switch' off" 9 | ] 10 | } 11 | 12 | SectionDevice."Mic" { 13 | Comment "Analog Microphone" 14 | 15 | ConflictingDevice [ 16 | "Headset" 17 | ] 18 | 19 | EnableSequence [ 20 | cset "name='Internal Mic Switch' on" 21 | cset "name='ADC PGA Gain Volume' 9" 22 | cset "name='ADC Capture Volume' 172" 23 | cset "name='Headset Mic Switch' on" 24 | cset "name='Digital Mic Mux' 'dmic disable'" 25 | cset "name='Differential Mux' 'lin2-rin2'" 26 | ] 27 | 28 | DisableSequence [ 29 | ] 30 | 31 | Value { 32 | CapturePriority 100 33 | CapturePCM "hw:${CardId}" 34 | CaptureMixerElem "ADC PGA Gain" 35 | CaptureMasterElem "ADC" 36 | } 37 | } 38 | 39 | 40 | SectionDevice."Speaker" { 41 | Comment "Speaker" 42 | 43 | ConflictingDevice [ 44 | "Headphones" 45 | ] 46 | 47 | EnableSequence [ 48 | cset "name='Speaker Switch' on" 49 | cset "name='Headphone Playback Volume' 3,3" 50 | cset "name='Right Headphone Mixer Right DAC Switch' on" 51 | cset "name='Left Headphone Mixer Left DAC Switch' on" 52 | cset "name='DAC Playback Volume' 999,999" 53 | cset "name='Headphone Mixer Volume' 999,999" 54 | cset "name='Differential Mux' 'lin2-rin2'" 55 | ] 56 | 57 | DisableSequence [ 58 | cset "name='Speaker Switch' off" 59 | ] 60 | Value { 61 | PlaybackPriority 100 62 | PlaybackPCM "hw:${CardId}" 63 | # The es8316 only has a HP-amp which is muxed to the speaker 64 | # or to the headpones output 65 | PlaybackMixerElem "Headphone Mixer" 66 | PlaybackMasterElem "DAC" 67 | } 68 | } 69 | 70 | SectionDevice."Headphones" { 71 | Comment "Headphones" 72 | 73 | ConflictingDevice [ 74 | "Speaker" 75 | ] 76 | 77 | EnableSequence [ 78 | cset "name='Headset Mic Switch' on" 79 | cset "name='Headphone Playback Volume' 3,3" 80 | cset "name='Right Headphone Mixer Right DAC Switch' on" 81 | cset "name='Left Headphone Mixer Left DAC Switch' on" 82 | cset "name='DAC Playback Volume' 999,999" 83 | cset "name='Headphone Mixer Volume' 999,999" 84 | cset "name='Differential Mux' 'lin1-rin1'" 85 | ] 86 | 87 | Value { 88 | PlaybackPriority 300 89 | PlaybackPCM "hw:${CardId}" 90 | PlaybackMixerElem "Headphone Mixer" 91 | PlaybackMasterElem "DAC" 92 | JackControl "Headphone Jack" 93 | JackHWMute "Speaker" 94 | } 95 | } 96 | 97 | SectionDevice."Headset" { 98 | Comment "Headset" 99 | 100 | ConflictingDevice [ 101 | "Mic" 102 | ] 103 | 104 | 105 | EnableSequence [ 106 | cset "name='ADC PGA Gain Volume' 9" 107 | cset "name='ADC Capture Volume' 172" 108 | cset "name='Headset Mic Switch' on" 109 | cset "name='Digital Mic Mux' 'dmic disable'" 110 | cset "name='Internal Mic Switch' on" 111 | cset "name='Differential Mux' 'lin1-rin1'" 112 | ] 113 | 114 | DisableSequence [ 115 | ] 116 | 117 | Value { 118 | CapturePriority 300 119 | CapturePCM "hw:${CardId}" 120 | CaptureMixerElem "ADC PGA Gain" 121 | CaptureMasterElem "ADC" 122 | JackControl "Headphone Jack" 123 | } 124 | } 125 | 126 | If.hdmi1 { 127 | Condition { Type String Empty "" } 128 | True { 129 | Define { 130 | HdmiNum 1 131 | HdmiPCM 5 132 | HdmiCtlIndex 0 133 | HdmiPrio 500 134 | } 135 | Include.hdmi1.File "/codecs/hda/hdmi.conf" 136 | } 137 | } 138 | 139 | If.hdmi2 { 140 | Condition { Type String Empty "" } 141 | True { 142 | Define { 143 | HdmiNum 2 144 | HdmiPCM 6 145 | HdmiCtlIndex 1 146 | HdmiPrio 600 147 | } 148 | Include.hdmi2.File "/codecs/hda/hdmi.conf" 149 | } 150 | } 151 | 152 | If.hdmi3 { 153 | Condition { Type String Empty "" } 154 | True { 155 | Define { 156 | HdmiNum 3 157 | HdmiPCM 7 158 | HdmiCtlIndex 2 159 | HdmiPrio 700 160 | } 161 | Include.hdmi3.File "/codecs/hda/hdmi.conf" 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /ucm/ucm2_latest/sof-essx8336/sof-essx8336.conf: -------------------------------------------------------------------------------- 1 | Syntax 3 2 | 3 | BootSequence [ 4 | # Setup muxes / switches 5 | cset "name='Left Headphone Mixer Left DAC Switch' on" 6 | cset "name='Right Headphone Mixer Right DAC Switch' on" 7 | # Set digital mix mux to "dmic disable" 8 | # That doesn't affect dmic, but other values mute headset mic 9 | #cset "name='Digital Mic Mux' 0" 10 | 11 | # Set HP vol to 0 dB 12 | cset "name='Headphone Playback Volume' 100%" 13 | cset "name='Headphone Mixer Volume' 100%" 14 | 15 | # Set DAC vol 16 | cset "name='DAC Playback Volume' 60%" 17 | # LDATA TO LDAC, RDATA TO RDAC 18 | #cset "name='DAC Source Mux' 0" 19 | 20 | # Disable Auto Level Control 21 | #cset "name='ALC Capture Switch' off" 22 | 23 | # Set capture vol 24 | cset "name='ADC Capture Volume' 60%" 25 | ] 26 | 27 | Define.DeviceDmic "" 28 | 29 | If.devdmic { 30 | Condition { 31 | Type String 32 | Haystack "${CardComponents}" 33 | Needle "cfg-dmics:" 34 | } 35 | True.Define.DeviceDmic "Dmic" 36 | } 37 | 38 | SectionUseCase."HiFi" { 39 | File "/conf.d/sof-essx8336/HiFi.conf" 40 | Comment "Play and record HiFi quality Music" 41 | } 42 | If.dmic { 43 | Condition { 44 | Type String 45 | Empty "${var:DeviceDmic}" 46 | } 47 | False.If.Dmic0 { 48 | Condition { 49 | Type ControlExists 50 | Control "name='Dmic0 Capture Volume'" 51 | } 52 | True.BootSequence [ 53 | cset "name='Dmic0 Capture Volume' 70%" 54 | ] 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /ucm/ucm2_latest/sof-jsl.ri: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/sof-jsl.ri -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-apl-es8336-ssp0.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-apl-es8336-ssp0.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-apl-es8336-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-apl-es8336-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-apl-es8336-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-apl-es8336-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-apl-es8336.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-apl-es8336.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-cml-es8336-dmic2ch-ssp0.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-cml-es8336-dmic2ch-ssp0.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-cml-es8336-dmic2ch-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-cml-es8336-dmic2ch-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-cml-es8336-dmic2ch-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-cml-es8336-dmic2ch-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-cml-es8336-dmic4ch-ssp0.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-cml-es8336-dmic4ch-ssp0.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-cml-es8336-dmic4ch-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-cml-es8336-dmic4ch-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-cml-es8336-dmic4ch-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-cml-es8336-dmic4ch-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-cml-es8336-ssp0.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-cml-es8336-ssp0.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-cml-es8336-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-cml-es8336-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-cml-es8336-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-cml-es8336-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-glk-es8336-ssp0.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-glk-es8336-ssp0.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-glk-es8336-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-glk-es8336-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-glk-es8336-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-glk-es8336-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-glk-es8336.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-glk-es8336.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic2ch-ssp0.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic2ch-ssp0.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic2ch-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic2ch-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic2ch-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic2ch-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic4ch-ssp0.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic4ch-ssp0.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic4ch-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic4ch-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic4ch-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-jsl-es8336-dmic4ch-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-jsl-es8336-ssp0.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-jsl-es8336-ssp0.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-jsl-es8336-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-jsl-es8336-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-jsl-es8336-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-jsl-es8336-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic2ch-ssp0.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic2ch-ssp0.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic2ch-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic2ch-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic2ch-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic2ch-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic4ch-ssp0.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic4ch-ssp0.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic4ch-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic4ch-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic4ch-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-tgl-es8336-dmic4ch-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-tgl-es8336-ssp1.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-tgl-es8336-ssp1.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-tgl-es8336-ssp2.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-tgl-es8336-ssp2.tplg -------------------------------------------------------------------------------- /ucm/ucm2_latest/tplg/sof-tgl-es8336.tplg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangxiaohua2009/custom-kernel/6c2b2ee473c760be14a6fd2fc02826af1ac9cdf0/ucm/ucm2_latest/tplg/sof-tgl-es8336.tplg --------------------------------------------------------------------------------