Hi Mark,
+static int mc13783_set_tdm_slot_codec(struct snd_soc_dai *dai,
- unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width)
+{
- struct snd_soc_codec *codec = dai->codec;
- unsigned int reg;
- if (slots != 4)
return -EINVAL;
- reg = mc13783_read(codec, PMIC_SSI_NETWORK);
- reg &= ~(0xfff << 0);
- reg |= (0x00 << 2); /* primary timeslot RX/TX(?) is 0 */
- reg |= (0x01 << 4); /* secondary timeslot TX is 1 */
- reg |= (0x01 << 6); /* secondary timeslot RX is 1 */
This appears to be pretty much ignoring the supplied arguments and using a fixed configuration?
The problem here is that I don't really understand what arguments I should supply to this function and how to parse them to archieve what I want.
The MC13783 Voice Codec always uses a network mode to send data. It has a fixed width of four slots.
PMIC_SSI_NETWORK[2:3] defines the slot for primary transmit/receive PMIC_SSI_NETWORK[4:5] defines the secondary transmit timeslot PMIC_SSI_NETWORK[6:7] defines the secondary receive timeslot
The Codec has two channels and it's not primarily desgined to do stereo Audio. I want to put the primary channel into the first timeslot and the secondary channel into the second timeslot.
Any idea how to do this correctly?
Sascha