summaryrefslogtreecommitdiff
path: root/apps/plugins/wavrecord.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/wavrecord.c')
-rw-r--r--apps/plugins/wavrecord.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/plugins/wavrecord.c b/apps/plugins/wavrecord.c
index 8828c1930e..645a968342 100644
--- a/apps/plugins/wavrecord.c
+++ b/apps/plugins/wavrecord.c
@@ -3524,9 +3524,7 @@ static int record_file(char *filename)
3524 rb->lcd_puts(0, 0, filename); 3524 rb->lcd_puts(0, 0, filename);
3525 rb->snprintf(buf, sizeof(buf), "%sHz 16bit %s", 3525 rb->snprintf(buf, sizeof(buf), "%sHz 16bit %s",
3526 samplerate_str[reccfg.samplerate], channel_str[reccfg.channels]); 3526 samplerate_str[reccfg.samplerate], channel_str[reccfg.channels]);
3527 rb->lcd_puts(0, 1, buf); 3527
3528 rb->lcd_update();
3529
3530 switch (reccfg.source) 3528 switch (reccfg.source)
3531 { 3529 {
3532 case SRC_LINE: 3530 case SRC_LINE:
@@ -3545,10 +3543,14 @@ static int record_file(char *filename)
3545#ifdef HAVE_SPDIF_IN 3543#ifdef HAVE_SPDIF_IN
3546 case SRC_SPDIF: 3544 case SRC_SPDIF:
3547 rb->mas_codec_writereg(0, 0x01); 3545 rb->mas_codec_writereg(0, 0x01);
3546 rb->snprintf(buf, sizeof(buf), "16bit %s",
3547 channel_str[reccfg.channels]);
3548 break; 3548 break;
3549#endif 3549#endif
3550 } 3550 }
3551 3551 rb->lcd_puts(0, 1, buf);
3552 rb->lcd_update();
3553
3552 mas = 0x0060 /* no framing, little endian */ 3554 mas = 0x0060 /* no framing, little endian */
3553 | ((reccfg.channels == 0) ? 0x10 : 0) /* mono/stereo */ 3555 | ((reccfg.channels == 0) ? 0x10 : 0) /* mono/stereo */
3554 | sampr[reccfg.samplerate][0]; 3556 | sampr[reccfg.samplerate][0];
@@ -3569,6 +3571,10 @@ static int record_file(char *filename)
3569 mas = 0x2125; /* recording, ADC input, validate */ 3571 mas = 0x2125; /* recording, ADC input, validate */
3570 rb->mas_writemem(MAS_BANK_D0, PCM_MAIN_IO_CONTROL, &mas, 1); 3572 rb->mas_writemem(MAS_BANK_D0, PCM_MAIN_IO_CONTROL, &mas, 1);
3571 3573
3574 mas = 0x80001; /* avoid distortion (overflow on full-range input samples) */
3575 rb->mas_writemem(MAS_BANK_D0, PCM_VOL_IN_LL, &mas, 1); /* LL */
3576 rb->mas_writemem(MAS_BANK_D0, PCM_VOL_IN_RR, &mas, 1); /* RR */
3577
3572 hijack_interrupts(true); 3578 hijack_interrupts(true);
3573 rec_tick_enable(true); 3579 rec_tick_enable(true);
3574 recording = true; 3580 recording = true;