diff options
Diffstat (limited to 'firmware/target/hosted/pcm-alsa.c')
-rw-r--r-- | firmware/target/hosted/pcm-alsa.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/target/hosted/pcm-alsa.c b/firmware/target/hosted/pcm-alsa.c index 428902b82e..db86a790d2 100644 --- a/firmware/target/hosted/pcm-alsa.c +++ b/firmware/target/hosted/pcm-alsa.c | |||
@@ -454,7 +454,6 @@ void cleanup(void) | |||
454 | snd_pcm_close(handle); | 454 | snd_pcm_close(handle); |
455 | } | 455 | } |
456 | 456 | ||
457 | |||
458 | void pcm_play_dma_init(void) | 457 | void pcm_play_dma_init(void) |
459 | { | 458 | { |
460 | int err; | 459 | int err; |
@@ -533,9 +532,6 @@ static void pcm_dma_apply_settings_nolock(void) | |||
533 | /* Sony NWZ linux driver uses a nonstandard mecanism to set the sampling rate */ | 532 | /* Sony NWZ linux driver uses a nonstandard mecanism to set the sampling rate */ |
534 | audiohw_set_frequency(pcm_sampr); | 533 | audiohw_set_frequency(pcm_sampr); |
535 | #endif | 534 | #endif |
536 | #ifdef AUDIOHW_MUTE_ON_SRATE_CHANGE | ||
537 | audiohw_mute(false); | ||
538 | #endif | ||
539 | /* (Will be unmuted by pcm resuming) */ | 535 | /* (Will be unmuted by pcm resuming) */ |
540 | } | 536 | } |
541 | } | 537 | } |
@@ -564,7 +560,7 @@ void pcm_play_dma_stop(void) | |||
564 | snd_pcm_nonblock(handle, 0); | 560 | snd_pcm_nonblock(handle, 0); |
565 | snd_pcm_drain(handle); | 561 | snd_pcm_drain(handle); |
566 | snd_pcm_nonblock(handle, 1); | 562 | snd_pcm_nonblock(handle, 1); |
567 | last_sample_rate = 0; | 563 | // last_sample_rate = 0; |
568 | #ifdef AUDIOHW_MUTE_ON_PAUSE | 564 | #ifdef AUDIOHW_MUTE_ON_PAUSE |
569 | audiohw_mute(true); | 565 | audiohw_mute(true); |
570 | #endif | 566 | #endif |
@@ -579,7 +575,7 @@ void pcm_play_dma_start(const void *addr, size_t size) | |||
579 | pcm_data = addr; | 575 | pcm_data = addr; |
580 | pcm_size = size; | 576 | pcm_size = size; |
581 | 577 | ||
582 | #if !defined(AUDIOHW_MUTE_ON_PAUSE) || !defined(AUDIOHW_MUTE_ON_SRATE_CHANGE) | 578 | #if !defined(AUDIOHW_MUTE_ON_PAUSE) && defined(AUDIOHW_MUTE_ON_SRATE_CHANGE) |
583 | audiohw_mute(false); | 579 | audiohw_mute(false); |
584 | #endif | 580 | #endif |
585 | 581 | ||
@@ -615,7 +611,7 @@ void pcm_play_dma_start(const void *addr, size_t size) | |||
615 | logf("Start error: %s\n", snd_strerror(err)); | 611 | logf("Start error: %s\n", snd_strerror(err)); |
616 | return; | 612 | return; |
617 | } | 613 | } |
618 | #ifdef AUDIOHW_MUTE_ON_PAUSE | 614 | #if defined(AUDIOHW_MUTE_ON_PAUSE) |
619 | audiohw_mute(false); | 615 | audiohw_mute(false); |
620 | #endif | 616 | #endif |
621 | if (err == 0) | 617 | if (err == 0) |
@@ -652,6 +648,10 @@ const void * pcm_play_dma_get_peak_buffer(int *count) | |||
652 | void pcm_play_dma_postinit(void) | 648 | void pcm_play_dma_postinit(void) |
653 | { | 649 | { |
654 | audiohw_postinit(); | 650 | audiohw_postinit(); |
651 | |||
652 | #ifdef AUDIOHW_NEEDS_INITIAL_UNMUTE | ||
653 | audiohw_mute(false); | ||
654 | #endif | ||
655 | } | 655 | } |
656 | 656 | ||
657 | void pcm_set_mixer_volume(int volume) | 657 | void pcm_set_mixer_volume(int volume) |