record and play audio same time

If you have a simple question and just want an answer.
guodian
Member++
Posts: 21
Joined: Sat Nov 12, 2016 10:48 am

record and play audio same time

Post by guodian »

Hi ,I design a product which needs record and play the audio at the same time , we have the Multichannel Audio Platforms board :XK-AUDIO-216-MC-AB. we design own board reference it , but we find a problem that the DAC and ADC of I2S interface have the same LRCLK and BCLK ; so we think it don't implement the record and play at the same time. can I need design the DAC and ADC I2S independently ?
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

You can record and playback simultaneously with the DAC and ADC clocks tied together
guodian
Member++
Posts: 21
Joined: Sat Nov 12, 2016 10:48 am

Post by guodian »

larry wrote:You can record and playback simultaneously with the DAC and ADC clocks tied together
I think this can record an play the audio at the same time ,but the DAC and ADC have the same clock that LRCLK and SCLK, at this case ,record and play must have same Sampling Rate, but we want to recording by ADC and playing with DAC have different sampling rate.
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

Oh I see

The USB audio software is single sample rate at the moment

To add multi rate support, you need to duplicate the audio task so each path can run at a different rate. Buffering needs to change, because it's currently based on a single sample rate. It might be easier to duplicate the buffering tasks too.
guodian
Member++
Posts: 21
Joined: Sat Nov 12, 2016 10:48 am

Post by guodian »

larry wrote:Oh I see

The USB audio software is single sample rate at the moment

To add multi rate support, you need to duplicate the audio task so each path can run at a different rate. Buffering needs to change, because it's currently based on a single sample rate. It might be easier to duplicate the buffering tasks too.
thanks very much ,I also have some confuse that as you say we duplicate the audio task ,just like this we can record and play audio have different sample rate at the same time? we don't need change the hardware circuit schematic ? we don't need split the LRCLK and SCLK in different pin of Xmos microcontroller?
Dyang
Member++
Posts: 17
Joined: Tue Nov 01, 2016 2:06 am

Post by Dyang »

larry wrote:Oh I see

The USB audio software is single sample rate at the moment

To add multi rate support, you need to duplicate the audio task so each path can run at a different rate. Buffering needs to change, because it's currently based on a single sample rate. It might be easier to duplicate the buffering tasks too.

Hi,I use this board and flash it with app_usb_aud_xk_216_mc -->config=2i10o10xsxxxx_mix8,Then I use cmd :
1.arecord -Dplughw:1,0 -r 32000 -c 2 -f S16_LE test.pcm
2.aplay -Dplughw:1,0 -r 48000 -c 2 -f S16_LE myokmusic.pcm
at the same time,and all result is OK .
This I can see I can play and record at the same time with different sample rate,I don't know why?Is there anything I did wrong ? or alsa resampling ?

Thank you