root { platform { template codec_controller { match_attr = ""; serviceName = ""; codecDaiName = ""; } controller_0x120c1030 :: codec_controller { match_attr = "hdf_codec_driver_0"; serviceName = "codec_service_0"; codecDaiName = "codec_dai"; hwInfo = [ /* Playback/Captrue, formats, rates, rate_min, rate_max, channels_min, channels_max, buffer_bytes_max, period_bytes_min, period_bytes_max, periods_min, periods_max */ 1, 0xF, 0xFF, 8000, 96000, 1, 2, 1, 2, 3, 4, 5, 2, 0xF, 0xFF, 8000, 96000, 1, 2, 1, 2, 3, 4, 5, ]; regConfig { /* reg: register address rreg: register address shift: shift bits rshift: rshift bits min: min value max: max value mask: mask of value invert: enum InvertVal 0-uninvert 1-invert value: value */ /* reg, value */ resetSeqConfig = [ 0x00, 0x80, 0x00, 0x00, ]; /* reg, value */ initSeqConfig = [ 0x00, 0x36, 0x01, 0x60, 0x02, 0x00, 0x03, 0xf9, 0x04, 0xc0, 0x05, 0x00, 0x06, 0x00, 0x07, 0x7c, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x0b, 0x02, 0x0c, 0x4c, 0x0d, 0x02, 0x0e, 0x30, 0x0f, 0x20, 0x10, 0x00, 0x11, 0x00, 0x12, 0xea, 0x13, 0xc0, 0x14, 0x05, 0x15, 0x06, 0x16, 0x53, 0x17, 0x18, 0x18, 0x02, 0x19, 0x02, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x08, 0x1d, 0x00, 0x1e, 0x1f, 0x1f, 0xf7, 0x20, 0xfd, 0x21, 0xff, 0x22, 0x1f, 0x23, 0xf7, 0x24, 0xfd, 0x25, 0xff, 0x26, 0x00, 0x27, 0xb8, 0x28, 0x28, 0x29, 0x28, 0x2a, 0xb8, 0x2b, 0x80, 0x2c, 0x00, 0x2d, 0x00, 0x2e, 0x15, 0x2f, 0x15, 0x30, 0x15, 0x31, 0x15, 0x32, 0x00, 0x33, 0xaa, 0x34, 0xaa, 0x35, 0x00, 0x36, 0x08, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x40, 0x3c, 0x0a, 0x3d, 0xe4, 0x3e, 0x00, 0x3f, 0x00, ]; /* reg, rreg, shift, rshift, min, max, mask, invert, value */ ctrlParamsSeqConfig = [ 0x2e, 0x2f, 0, 0, 0x0, 0x21, 0xFF, 1, 0x00, // output volume(OUT1) 0x10, 0x11, 0, 0, 0x0, 0xC0, 0xFF, 1, 0x00, // capture volume(mic gain) 0x19, 0x19, 2, 2, 0x0, 0x01, 0x01, 0, 0x00, // output mute 0x0f, 0x0f, 5, 5, 0x0, 0x01, 0x01, 0, 0x00, // capture mute 0x09, 0x09, 4, 4, 0x0, 0xF, 0xF, 0, 0x00, // mic left gain 0x09, 0x09, 0, 0, 0x0, 0xF, 0xF, 0, 0x00, // mic right gain 0x35, 0x35, 0, 0, 0x0, 0x11, 0x11, 0, 0x00, // output channel unused 0x35, 0x35, 4, 4, 0x0, 0x03, 0x03, 0, 0x00 // capture channel unused ]; /* reg, rreg, shift, rshift, min, max, mask, invert, value */ daiStartupSeqConfig = [ 0x03, 0x03, 0, 0, 0x0, 0xFF, 0xFF, 0, 0x59, // es8316_adc_pdn_linsel 0x04, 0x04, 0, 0, 0x0, 0xFF, 0xFF, 0, 0x3c, // es8316_dac_pdn 0x0f, 0x0f, 0, 0, 0x0, 0xFF, 0xFF, 0, 0x20, // es8316_adc_mute(capture unmute) 0x19, 0x19, 0, 0, 0x0, 0xFF, 0xFF, 0, 0x02 // es8316_dac_set1(output unmute) ]; /* reg, rreg, shift, rshift, min, max, mask, invert, value The top three are frequency, format and channel respectively, and the others are behind */ daiParamsSeqConfig = [ // playback input params (hal input) 0x18, 0x18, 0, 0, 0x0, 0x1F, 0x1F, 0, 0x00, // i2s_frequency 0x17, 0x17, 3, 3, 0x0, 0x4, 0xFF, 0, 0x00, // i2s_format 0x1c, 0x1c, 4, 4, 0x0, 0x1, 0xFF, 0, 0x00, // i2s_channel // capture input params (hal input) 0x0d, 0x0d, 0, 0, 0x0, 0x1F, 0x1F, 0, 0x00, // capture__frequency 0x0C, 0x0C, 2, 2, 0x0, 0x4, 0x0F, 0, 0x00, // capture_format 0x0e, 0x0e, 7, 7, 0x0, 0x1, 0xF, 0, 0x00 // capture_channel ]; /* reg, value */ getStatusSeqConfig = [ 0x4F, 0x0 ]; /* "Master Playback Volume", "Master Capture Volume", "Playback Mute", "Capture Mute", "Mic Left Gain", "Mic Right Gain", "External Codec Enable", "Internally Codec Enable", "Render Channel Mode", "Captrue Channel Mode" */ /* array index, iface, enable */ controlsConfig = [ /*array index, iface, mixer/mux, enable,*/ 0, 2, 0, 1, 1, 2, 0, 1, 2, 2, 0, 1, 3, 2, 0, 1, 4, 2, 0, 1, 5, 2, 0, 1, 8, 2, 0, 1, 9, 2, 0, 1, ]; } } controller_0x120c1031 :: codec_controller { match_attr = "hdf_codec_driver_1"; serviceName = "codec_service_1"; codecDaiName = "hdmi_codec_dai"; hwInfo = [ /* Playback/Captrue, formats, rates, rate_min, rate_max, channels_min, channels_max, buffer_bytes_max, period_bytes_min, period_bytes_max, periods_min, periods_max */ 1, 0xF, 0xFF, 8000, 96000, 1, 2, 1, 2, 3, 4, 5 ]; regConfig { /* reg: register address rreg: register address shift: shift bits rshift: rshift bits min: min value max: max value mask: mask of value invert: enum InvertVal 0-uninvert 1-invert value: value */ /* reg, value */ resetSeqConfig = [ 0x00, 0x80, 0x00, 0x00, ]; /* reg, value */ initSeqConfig = [ 0x00, 0x36, 0x01, 0x60, 0x02, 0x00, 0x03, 0xf9, 0x04, 0xc0, 0x05, 0x00, 0x06, 0x00, 0x07, 0x7c, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x0b, 0x02, 0x0c, 0x4c, 0x0d, 0x02, 0x0e, 0x30, 0x0f, 0x20, 0x10, 0x00, 0x11, 0x00, 0x12, 0xea, 0x13, 0xc0, 0x14, 0x05, 0x15, 0x06, 0x16, 0x53, 0x17, 0x18, 0x18, 0x02, 0x19, 0x02, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x08, 0x1d, 0x00, 0x1e, 0x1f, 0x1f, 0xf7, 0x20, 0xfd, 0x21, 0xff, 0x22, 0x1f, 0x23, 0xf7, 0x24, 0xfd, 0x25, 0xff, 0x26, 0x00, 0x27, 0xb8, 0x28, 0x28, 0x29, 0x28, 0x2a, 0xb8, 0x2b, 0x80, 0x2c, 0x00, 0x2d, 0x00, 0x2e, 0x15, 0x2f, 0x15, 0x30, 0x15, 0x31, 0x15, 0x32, 0x00, 0x33, 0xaa, 0x34, 0xaa, 0x35, 0x00, 0x36, 0x08, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x40, 0x3c, 0x0a, 0x3d, 0xe4, 0x3e, 0x00, 0x3f, 0x00, ]; /* reg, rreg, shift, rshift, min, max, mask, invert, value */ ctrlParamsSeqConfig = [ 0x2e, 0x2f, 0, 0, 0x0, 0x21, 0xFF, 1, 0x00, // output volume(OUT1) 0x10, 0x11, 0, 0, 0x0, 0xC0, 0xFF, 1, 0x00, // capture volume(mic gain) 0x19, 0x19, 2, 2, 0x0, 0x01, 0x01, 0, 0x00, // output mute 0x0f, 0x0f, 5, 5, 0x0, 0x01, 0x01, 0, 0x00, // capture mute 0x09, 0x09, 4, 4, 0x0, 0xF, 0xF, 0, 0x00, // mic left gain 0x09, 0x09, 0, 0, 0x0, 0xF, 0xF, 0, 0x00, // mic right gain 0x35, 0x35, 0, 0, 0x0, 0x11, 0x11, 0, 0x00, // output channel unused 0x35, 0x35, 4, 4, 0x0, 0x03, 0x03, 0, 0x00 // capture channel unused ]; /* reg, rreg, shift, rshift, min, max, mask, invert, value */ daiStartupSeqConfig = [ 0x03, 0x03, 0, 0, 0x0, 0xFF, 0xFF, 0, 0x59, // es8316_adc_pdn_linsel 0x04, 0x04, 0, 0, 0x0, 0xFF, 0xFF, 0, 0x3c, // es8316_dac_pdn 0x0f, 0x0f, 0, 0, 0x0, 0xFF, 0xFF, 0, 0x20, // es8316_adc_mute(capture unmute) 0x19, 0x19, 0, 0, 0x0, 0xFF, 0xFF, 0, 0x02 // es8316_dac_set1(output unmute) ]; /* reg, rreg, shift, rshift, min, max, mask, invert, value The top three are frequency, format and channel respectively, and the others are behind */ daiParamsSeqConfig = [ // playback input params (hal input) 0x18, 0x18, 0, 0, 0x0, 0x1F, 0x1F, 0, 0x00, // i2s_frequency 0x17, 0x17, 3, 3, 0x0, 0x4, 0xFF, 0, 0x00, // i2s_format 0x1c, 0x1c, 4, 4, 0x0, 0x1, 0xFF, 0, 0x00, // i2s_channel // capture input params (hal input) 0x0d, 0x0d, 0, 0, 0x0, 0x1F, 0x1F, 0, 0x00, // capture__frequency 0x0C, 0x0C, 2, 2, 0x0, 0x4, 0x0F, 0, 0x00, // capture_format 0x0e, 0x0e, 7, 7, 0x0, 0x1, 0xF, 0, 0x00 // capture_channel ]; /* reg, value */ getStatusSeqConfig = [ 0x4F, 0x0 ]; /* "Master Playback Volume", "Master Capture Volume", "Playback Mute", "Capture Mute", "Mic Left Gain", "Mic Right Gain", "External Codec Enable", "Internally Codec Enable", "Render Channel Mode", "Captrue Channel Mode" */ /* array index, iface, enable */ controlsConfig = [ /*array index, iface, mixer/mux, enable,*/ 0, 2, 0, 1, 1, 2, 0, 1, 2, 2, 0, 1, 3, 2, 0, 1, 4, 2, 0, 1, 5, 2, 0, 1, 8, 2, 0, 1, 9, 2, 0, 1, ]; } } } }