/* This struct is defined per 2ch PDM controller available in the platform. *Normallyitissufficienttosettheusedmicrophonespecificenablesto1 *andkeepotherparametersaszero.Thecustomizationsare: * *1.Ifadevicemixesdifferentmicrophonestypeswithdifferentpolarity *and/ortheabsolutepolaritymattersthePCMsignalfromamicrophone *canbeinvertedwiththecontrols. * *2.Ifthemicrophonesinastereopairdonotappearincapturedstream *indesiredorderduetoboardschematicschoisestheycanbeswappedwith *theclk_edgeparameter. * *3.IfPDMbiterrorsareseenincapture(poorquality)theskewparameter *thatdelaysthesamplingtimeofdatabyhalfcyclesofDMICsourceclock *canbetriedforimprovement.Howeverthereisnoguaranteeforthistofix *dataintegrityproblems.
*/ struct sof_ipc_dai_dmic_pdm_ctrl { struct sof_ipc_hdr hdr;
uint16_t id; /**< PDM controller ID */
uint16_t enable_mic_a; /**< Use A (left) channel mic (0 or 1)*/
uint16_t enable_mic_b; /**< Use B (right) channel mic (0 or 1)*/
uint16_t polarity_mic_a; /**< Optionally invert mic A signal (0 or 1) */
uint16_t polarity_mic_b; /**< Optionally invert mic B signal (0 or 1) */
uint16_t clk_edge; /**< Optionally swap data clock edge (0 or 1) */
uint16_t skew; /**< Adjust PDM data sampling vs. clock (0..15) */
uint16_t reserved[3]; /**< Make sure the total size is 4 bytes aligned */
} __packed;
/* This struct contains the global settings for all 2ch PDM controllers. The *versionnumberusedinconfigurationdataischeckedvs.versionusedby *devicedriversrc/drivers/dmic.cneedtomatch.Itisincrementedfrom *initialvalue1ifupdatesdoneforthetodriverwouldaltertheoperation *ofthemicrophone. * *Note:Themicrophoneclock(pdmclk_min,pdmclk_max,duty_min,duty_max) *parametersneedtobesetasdefinedinmicrophonedatasheet.E.g.clock *range1.0-3.2MHzisusuallysupportedmicrophones.Somemicrophonesare *multi-modecapableandtheremaybedeniedmicclockfrequenciesbetween *themodes.Insuchcasesettheclockrangelimitsofthedesiredmodeto *avoidthedrivertosetclocktoanillegalrate. * *Thedutycyclecouldbesetto48-52%ifnotknown.Generallythese *parameterscanbealteredwithindatasheetspecifiedlimitstomatch *requiredaudioapplicationperformancepower. * *Themicrophoneclockneedstobeusuallyabout50-80timestheusedaudio *samplerate.Withhighestsampleratesabove48kHzthiscanrelaxed *somewhat. * *Theparameterwake_up_timedescribeshowlongtimethemicrophoneneeds *forthedatalinetoproducevalidoutputfrommicclockstart.Thedriver *willmutethecapturedaudioforthegiventime.Themin_clock_on_time *parameterisusedtopreventtooshortclockburststohappen.Thedriver *willkeeptheclockactiveaftercapturestopifthistimeisnotyet *met.Theunitforbothismicroseconds(us).Exceedof100mswillbe *treatedasanerror.
*/ struct sof_ipc_dai_dmic_params { struct sof_ipc_hdr hdr;
uint32_t driver_ipc_version; /**< Version (1..N) */
uint32_t pdmclk_min; /**< Minimum microphone clock in Hz (100000..N) */
uint32_t pdmclk_max; /**< Maximum microphone clock in Hz (min...N) */
uint32_t fifo_fs; /**< FIFO sample rate in Hz (8000..96000) */
uint32_t reserved_1; /**< Reserved */
uint16_t fifo_bits; /**< FIFO word length (16 or 32) */
uint16_t fifo_bits_b; /**< Deprecated since firmware ABI 3.0.1 */
uint16_t duty_min; /**< Min. mic clock duty cycle in % (20..80) */
uint16_t duty_max; /**< Max. mic clock duty cycle in % (min..80) */
uint32_t num_pdm_active; /**< Number of active pdm controllers. */ /**< Range is 1..SOF_DAI_INTEL_DMIC_NUM_CTRL */
uint32_t wake_up_time; /**< Time from clock start to data (us) */
uint32_t min_clock_on_time; /**< Min. time that clk is kept on (us) */
uint32_t unmute_ramp_time; /**< Length of logarithmic gain ramp (ms) */
/* reserved for future use */
uint32_t reserved[5];
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.