/* Write the fir coefficients in the PDMs' RAM.  */
static void dai_dmic_write_coeff(const struct dai_intel_dmic *dmic, uint32_t base, const uint32_t *coeff, int length, const bool packed)
/* Write the fir coefficients in the PDMs' RAM.  */
static void dai_dmic_write_coeff(const struct dai_intel_dmic *dmic, uint32_t base, const uint32_t *coeff, int length, const bool packed)
{
	const uint8_t *coeff_in_bytes;
	uint32_t coeff_val;
	if (!packed) {
		while (length--) {
			dai_dmic_write(dmic, base, *coeff++);
			base += sizeof(uint32_t);
		}
	} else {
		coeff_in_bytes = (const uint8_t *)coeff;
		while (length--) {
			coeff_val = coeff_in_bytes[0] +
				(coeff_in_bytes[1] << 8) +
				(coeff_in_bytes[2] << 16);
			dai_dmic_write(dmic, base, coeff_val);
			base += sizeof(uint32_t);
			coeff_in_bytes += 3;
		}
	}
}