[alsa-devel] Please help in adding ams-delta support to ASoC

Janusz Krzysztofik jkrzyszt at tis.icnet.pl
Wed Jun 10 14:20:01 CEST 2009


Peter Ujfalusi wrote:
> On Wednesday 10 June 2009 13:27:38 ext Janusz Krzysztofik wrote:
>> Not only this. AFAICS, there is no way of specifying single phase stereo
>> (with XPHASE/RPHASE unset), 2 words per frame (XFRLEN1/RFRLEN1(2 - 1)).
>> Isn't this required for correct DSP_A/DSP_B support?
> 
> Sure it is possible:
> 	format = mcbsp_data->fmt & SND_SOC_DAIFMT_FORMAT_MASK;
> 	wpf = channels = params_channels(params);
> 	switch (channels) {
> 	case 2:
> 		if (format == SND_SOC_DAIFMT_I2S) {
> 			/* Use dual-phase frames */
> 			regs->rcr2	|= RPHASE;
> 			regs->xcr2	|= XPHASE;
> 			/* Set 1 word per (McBSP) frame for phase1 and phase2 */
> 			wpf--;
> 			regs->rcr2	|= RFRLEN2(wpf - 1);
> 			regs->xcr2	|= XFRLEN2(wpf - 1);
> 		}
> 	case 1:
> 	case 4:
> 		/* Set word per (McBSP) frame for phase1 */
> 		regs->rcr1	|= RFRLEN1(wpf - 1);
> 		regs->xcr1	|= XFRLEN1(wpf - 1);
> 		break;
> 	default:
> 		/* Unsupported number of channels */
> 		return -EINVAL;
> 	}
> 
> wpf = channels == 2, format is not I2S --> RFRLEN1(wpf - 1), XFRLEN1(wpf - 1), 
> RFRLEN1(2 - 1), XFRLEN1(2 - 1)

OK, I see I have to update my base before commenting the code ;).

Thanks,
Janusz
--
To unsubscribe from this list: send the line "unsubscribe alsa-devel" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the Alsa-devel mailing list