Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update codec to use mux not mixer #703

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
151,417 changes: 151,417 additions & 0 deletions codec_3263_32khz/version001.pfw

Large diffs are not rendered by default.

241,941 changes: 241,941 additions & 0 deletions codec_3263_32khz/version002_no_mixing.pfw

Large diffs are not rendered by default.

12,602 changes: 6,723 additions & 5,879 deletions kitsune/audio_codec_pps_driver.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion kitsune/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -2159,7 +2159,7 @@ tCmdLineEntry g_sCmdTable[] = {
{"pn",cmd_audio_self_test,""},
{"tap", cmd_tap, ""},
{"flipped", cmd_flipped, ""},

{"pingpong",Cmd_set_ping_pong_mode,""},
{ 0, 0, 0 } };


Expand Down
9 changes: 2 additions & 7 deletions kitsune/lfsr/pn_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define NUM_CHANNELS (4)
#define PN_LEN_SAMPLES PN_LEN_10
#define PN_INIT pn_init_with_mask_10
#define PN_AMPLITUDE (8*1024)
#define PN_AMPLITUDE (2*1024)

#define ABS(x) ( (x) < 0 ? -(x) : (x) )

Expand Down Expand Up @@ -435,9 +435,7 @@ void pn_write_task( void * params ) {

for (ichannel = 0; ichannel < NUM_CHANNELS; ichannel++) {

if (ichannel == AEC_CHANNEL) {
continue;
}


for (i = 0; i < WRITE_LEN_SAMPLES; i++) {
samples[i] = ctx.samples[i*NUM_CHANNELS + ichannel];
Expand All @@ -457,9 +455,6 @@ void pn_write_task( void * params ) {
for (ichannel = 0; ichannel < NUM_CHANNELS; ichannel++) {
uint32_t channel_index = results.peak_indices[ichannel];

if (ichannel == AEC_CHANNEL) {
continue;
}

if( results.peak_indices[ichannel] > maxidx ) {
maxidx = results.peak_indices[ichannel];
Expand Down
11 changes: 11 additions & 0 deletions kitsune/pcm_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,17 @@ void pcm_set_ping_pong_incoming_stream_mode(const int mode) {
}


int Cmd_set_ping_pong_mode(int argc, char *argv[]) {
if (argc <= 1) {
return 0;
}

pcm_set_ping_pong_incoming_stream_mode(atoi(argv[1]));

return 0;

}

/* << 20 because I2SIntStatus() shifts DMA_RIS contents by 20.
*/
#define MCASP_WR_DMA_DONE_INT_STS_ACTIVE ((1UL << 11) << 20)
Expand Down
2 changes: 2 additions & 0 deletions kitsune/pcm_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ extern "C"
#define PCM_PING_PONG_MODE_SINGLE_CHANNEL_FULL_RATE (1)
#define PCM_PING_PONG_MODE_ALL_CHANNELS_FULL_RATE (2)

int Cmd_set_ping_pong_mode(int argc, char *argv[]);

void pcm_set_ping_pong_incoming_stream_mode(const int mode);


Expand Down