This patch allows ch2 registers to be set for 8 channels of audio.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
unsigned int ch1pos, ch2pos, mode, format;
uint32_t csreg;
unsigned int ch1pos, ch2pos, mode, format;
uint32_t csreg;
/*
* If a stream is already enabled,
* the registers are already set properly.
/*
* If a stream is already enabled,
* the registers are already set properly.
switch (params_channels(params)) {
case 2:
switch (params_channels(params)) {
case 2:
format = BCM2835_I2S_CH1(format) | BCM2835_I2S_CH2(format);
format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos));
format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos));
format = BCM2835_I2S_CH1(format) | BCM2835_I2S_CH2(format);
format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos));
format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos));