summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--audio.c36
2 files changed, 23 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d32f72..0f1e2b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
User johns
Date:
+ Try smaller audio puffer, if default size fails.
Fix bug: center cut-out didn't use cut off pixels.
Fix bug #2058: support for Make.plgcfg.
Fix for compile with vdr 2.1.10, for older vdr versions.
diff --git a/audio.c b/audio.c
index a9da207..77fa650 100644
--- a/audio.c
+++ b/audio.c
@@ -1237,21 +1237,29 @@ static int AlsaSetup(int *freq, int *channels, int passthrough)
AlsaUseMmap ? SND_PCM_ACCESS_MMAP_INTERLEAVED :
SND_PCM_ACCESS_RW_INTERLEAVED, *channels, *freq, 1,
96 * 1000))) {
-
- /*
- if ( err == -EBADFD ) {
- snd_pcm_close(AlsaPCMHandle);
- AlsaPCMHandle = NULL;
- continue;
- }
- */
-
- if (!AudioDoingInit) {
- Error(_("audio/alsa: set params error: %s\n"),
- snd_strerror(err));
+ // try reduced buffer size (needed for sunxi)
+ // FIXME: alternativ make this configurable
+ if ((err =
+ snd_pcm_set_params(AlsaPCMHandle, SND_PCM_FORMAT_S16,
+ AlsaUseMmap ? SND_PCM_ACCESS_MMAP_INTERLEAVED :
+ SND_PCM_ACCESS_RW_INTERLEAVED, *channels, *freq, 1,
+ 72 * 1000))) {
+
+ /*
+ if ( err == -EBADFD ) {
+ snd_pcm_close(AlsaPCMHandle);
+ AlsaPCMHandle = NULL;
+ continue;
+ }
+ */
+
+ if (!AudioDoingInit) {
+ Error(_("audio/alsa: set params error: %s\n"),
+ snd_strerror(err));
+ }
+ // FIXME: must stop sound, AudioChannels ... invalid
+ return -1;
}
- // FIXME: must stop sound, AudioChannels ... invalid
- return -1;
}
break;
}