
5 Oct
2011
5 Oct
'11
1:40 p.m.
On Tue, Oct 04, 2011 at 07:17:16PM +0000, Austin, Brian wrote:
if (spc & xSPDIF_PCM) { spc &= (31 << 3); /* Clear PCM mode, set MSB->LSB */ switch(format){ case SND_SOC_DAIFMT_DSP_B: if (inv == SND_SOC_DAIFMT_IB_IF) spc |= (xPCM_MODE0 << 4); if (inv == SND_SOC_DAIFMT_IB_NF) spc |= (xPCM_MODE1 << 4); break; case SND_SOC_DAIFMT_DSP_A: if (inv == SND_SOC_DAIFMT_IB_IF) spc |= (xPCM_MODE1 << 4); break; default: return -EINVAL; } }
This looks a lot better modulo the coding style issue (switch is not a function). Using snd_soc_update_bits() would be even better.