summaryrefslogtreecommitdiff
path: root/firmware/pcm_record.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/pcm_record.c')
-rw-r--r--firmware/pcm_record.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/firmware/pcm_record.c b/firmware/pcm_record.c
index 045ace98c4..0e0102af97 100644
--- a/firmware/pcm_record.c
+++ b/firmware/pcm_record.c
@@ -90,6 +90,7 @@ static int rec_source; /* current rec_source setting */
90static int rec_frequency; /* current frequency setting */ 90static int rec_frequency; /* current frequency setting */
91static unsigned long sample_rate; /* Sample rate in HZ */ 91static unsigned long sample_rate; /* Sample rate in HZ */
92static int num_channels; /* Current number of channels */ 92static int num_channels; /* Current number of channels */
93static int rec_mono_mode; /* how mono is created */
93static struct encoder_config enc_config; /* Current encoder configuration */ 94static struct encoder_config enc_config; /* Current encoder configuration */
94static unsigned long pre_record_ticks; /* pre-record time in ticks */ 95static unsigned long pre_record_ticks; /* pre-record time in ticks */
95 96
@@ -1178,6 +1179,7 @@ static void pcmrec_set_recording_options(
1178 rec_frequency = options->rec_frequency; 1179 rec_frequency = options->rec_frequency;
1179 rec_source = options->rec_source; 1180 rec_source = options->rec_source;
1180 num_channels = options->rec_channels == 1 ? 1 : 2; 1181 num_channels = options->rec_channels == 1 ? 1 : 2;
1182 rec_mono_mode = options->rec_mono_mode;
1181 pre_record_ticks = options->rec_prerecord_time * HZ; 1183 pre_record_ticks = options->rec_prerecord_time * HZ;
1182 enc_config = options->enc_config; 1184 enc_config = options->enc_config;
1183 enc_config.afmt = rec_format_afmt[enc_config.rec_format]; 1185 enc_config.afmt = rec_format_afmt[enc_config.rec_format];
@@ -1526,17 +1528,18 @@ void enc_get_inputs(struct enc_inputs *inputs)
1526{ 1528{
1527 inputs->sample_rate = sample_rate; 1529 inputs->sample_rate = sample_rate;
1528 inputs->num_channels = num_channels; 1530 inputs->num_channels = num_channels;
1531 inputs->rec_mono_mode = rec_mono_mode;
1529 inputs->config = &enc_config; 1532 inputs->config = &enc_config;
1530} /* enc_get_inputs */ 1533} /* enc_get_inputs */
1531 1534
1532/* set the encoder dimensions (called by encoder codec at initialization and 1535/* set the encoder dimensions (called by encoder codec at initialization and
1533 termination) */ 1536 termination) */
1534void enc_set_parameters(struct enc_parameters *params) 1537void enc_set_parameters(struct enc_parameters *params)
1535{ 1538{
1536 size_t bufsize, resbytes; 1539 size_t bufsize, resbytes;
1537 1540
1538 logf("enc_set_parameters"); 1541 logf("enc_set_parameters");
1539 1542
1540 if (!params) 1543 if (!params)
1541 { 1544 {
1542 logf("reset"); 1545 logf("reset");