/* Record SSC clock dividers for use in hw_params().  */
static int atmel_ssc_set_dai_clkdiv(struct snd_soc_dai *cpu_dai, int div_id, int div)
/* Record SSC clock dividers for use in hw_params().  */
static int atmel_ssc_set_dai_clkdiv(struct snd_soc_dai *cpu_dai, int div_id, int div)
{
	struct atmel_ssc_info *ssc_p = &ssc_info[cpu_dai->id];
	switch (div_id) {
	case ATMEL_SSC_CMR_DIV:
		if (ssc_p->cmr_div == 0)
			ssc_p->cmr_div = div;
		else
			if (div != ssc_p->cmr_div)
				return -EBUSY;
		break;
	case ATMEL_SSC_TCMR_PERIOD:
		ssc_p->tcmr_period = div;
		break;
	case ATMEL_SSC_RCMR_PERIOD:
		ssc_p->rcmr_period = div;
		break;
	default:
		return -EINVAL;
	}
	return 0;
}