forked from PAWPAW-Mirror/lib_xua
Mixer and non-mixer chan comms (decouple->audio path) now the same scheme.
This commit is contained in:
@@ -256,33 +256,6 @@ static inline unsigned DoSampleTransfer(chanend c_out, int readBuffNo, unsigned
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifndef MIXER // Interfaces straight to decouple()
|
|
||||||
inuint(c_out);
|
|
||||||
#if NUM_USB_CHAN_IN > 0
|
|
||||||
#pragma loop unroll
|
|
||||||
for(int i = 0; i < I2S_CHANS_ADC; i++)
|
|
||||||
{
|
|
||||||
if(readBuffNo)
|
|
||||||
outuint(c_out, samplesIn_1[i]);
|
|
||||||
else
|
|
||||||
outuint(c_out, samplesIn_0[i]);
|
|
||||||
}
|
|
||||||
/* Send over the digi channels - no odd buffering required */
|
|
||||||
#pragma loop unroll
|
|
||||||
for(int i = I2S_CHANS_ADC; i < NUM_USB_CHAN_IN; i++)
|
|
||||||
{
|
|
||||||
outuint(c_out, samplesIn_0[i]);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if NUM_USB_CHAN_OUT > 0
|
|
||||||
#pragma loop unroll
|
|
||||||
for(int i = 0; i < NUM_USB_CHAN_OUT; i++)
|
|
||||||
{
|
|
||||||
samplesOut[i] = inuint(c_out);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#else /* ifndef MIXER */
|
|
||||||
#if NUM_USB_CHAN_OUT > 0
|
#if NUM_USB_CHAN_OUT > 0
|
||||||
#pragma loop unroll
|
#pragma loop unroll
|
||||||
for(int i = 0; i < NUM_USB_CHAN_OUT; i++)
|
for(int i = 0; i < NUM_USB_CHAN_OUT; i++)
|
||||||
@@ -290,6 +263,8 @@ static inline unsigned DoSampleTransfer(chanend c_out, int readBuffNo, unsigned
|
|||||||
int tmp = inuint(c_out);
|
int tmp = inuint(c_out);
|
||||||
samplesOut[i] = tmp;
|
samplesOut[i] = tmp;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
inuint(c_out);
|
||||||
#endif
|
#endif
|
||||||
#if NUM_USB_CHAN_IN > 0
|
#if NUM_USB_CHAN_IN > 0
|
||||||
#pragma loop unroll
|
#pragma loop unroll
|
||||||
@@ -310,7 +285,6 @@ static inline unsigned DoSampleTransfer(chanend c_out, int readBuffNo, unsigned
|
|||||||
{
|
{
|
||||||
outuint(c_out, samplesIn_0[i]);
|
outuint(c_out, samplesIn_0[i]);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,10 +439,8 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
|
|||||||
#if (I2S_CHANS_ADC != 0) || defined(SPDIF_TX)
|
#if (I2S_CHANS_ADC != 0) || defined(SPDIF_TX)
|
||||||
unsigned sample;
|
unsigned sample;
|
||||||
#endif
|
#endif
|
||||||
//#if NUM_USB_CHAN_IN > 0
|
|
||||||
/* Since DAC and ADC buffered ports off by one sample we buffer previous ADC frame */
|
/* Since DAC and ADC buffered ports off by one sample we buffer previous ADC frame */
|
||||||
unsigned readBuffNo = 0;
|
unsigned readBuffNo = 0;
|
||||||
//#endif
|
|
||||||
unsigned index;
|
unsigned index;
|
||||||
|
|
||||||
#ifdef RAMP_CHECK
|
#ifdef RAMP_CHECK
|
||||||
@@ -1097,7 +1069,7 @@ chanend ?c_config, chanend ?c
|
|||||||
{
|
{
|
||||||
/* Configure audio ports */
|
/* Configure audio ports */
|
||||||
ConfigAudioPortsWrapper(
|
ConfigAudioPortsWrapper(
|
||||||
#if (I2S_CHANS_DAC != 0)
|
#if (I2S_CHANS_DAC != 0) || (DSD_CHANS_DAC != 0)
|
||||||
p_dsd_dac,
|
p_dsd_dac,
|
||||||
DSD_CHANS_DAC,
|
DSD_CHANS_DAC,
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user