When I am reading the DM646x McASP datasheet, I get some confusion that the usage of XROT bits in XFMT register.
1.What's the different between Q31 fraction and Integer. Different internal numeric may affect the XROT mainly. How can I make sure the correct internal numeric on DM6467?
2.If I only set the XMASK register(not set XROT) like bolow.(slot = 16bits, I2S format)
mcasp_set_reg(dev->base + DAVINCI_MCASP_TXMASK_REG, 0x0000FFFF); mcasp_set_reg(dev->base + DAVINCI_MCASP_RXMASK_REG, 0x0000FFFF); |
then I use the aplay to test the driver, I coundn't heard any voice from the sound card.
but when I set the XROT bits like below:
mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, TXROT(rotate), TXROT(7)); mcasp_mod_bits(dev->base + DAVINCI_MCASP_RXFMT_REG, RXROT(rotate), RXROT(7)); mcasp_set_reg(dev->base + DAVINCI_MCASP_TXMASK_REG, 0x0000FFFF); mcasp_set_reg(dev->base + DAVINCI_MCASP_RXMASK_REG, 0x0000FFFF); |
everything is ok!
So, What exactly does XROT doing in my scenario?
thanks!