From 29bcccd5c94b91ada674b5dc8f5a60813ceff851 Mon Sep 17 00:00:00 2001 From: zhangzhaopeng Date: Tue, 13 May 2025 11:12:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4alsa=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=87=8F=E5=B0=8F=E9=9F=B3=E9=A2=91=E5=BB=B6=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../middleware/sun8iw21/media/audio/alsa_interface.c | 5 +++-- .../busybox-init-base-files/etc/asound.conf | 4 ++-- .../busybox-init-base-files/etc/asound.conf | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/external/eyesee-mpp/middleware/sun8iw21/media/audio/alsa_interface.c b/external/eyesee-mpp/middleware/sun8iw21/media/audio/alsa_interface.c index 9fc69179a..6423854f4 100755 --- a/external/eyesee-mpp/middleware/sun8iw21/media/audio/alsa_interface.c +++ b/external/eyesee-mpp/middleware/sun8iw21/media/audio/alsa_interface.c @@ -22,8 +22,8 @@ static char aioDebugfsPath[256] = {0}; static unsigned int updateCnt = 0; -#define PERIOD_SIZE (1024) -#define PERIOD_COUNT (8) +#define PERIOD_SIZE (256) +#define PERIOD_COUNT (4) #define UPDATE_AIO_DEBUGFS_INFO(update_flag, item_flag, item, type, buf, path) \ do { \ if (update_flag & item_flag) { \ @@ -388,6 +388,7 @@ int alsaSetPcmParams(PCM_CONFIG_S *pcmCfg) snd_pcm_uframes_t periodSize = PERIOD_SIZE; snd_pcm_uframes_t prePeriodSize = periodSize; + // alogd("size:%d count:%d\n", PERIOD_SIZE, PERIOD_COUNT); err = snd_pcm_hw_params_set_period_size_near(pcmCfg->handle, params, &periodSize, &dir); if (err < 0) { aloge("set_period_size_near error!"); diff --git a/target/allwinner/v851s-fastboot_sl100_back/busybox-init-base-files/etc/asound.conf b/target/allwinner/v851s-fastboot_sl100_back/busybox-init-base-files/etc/asound.conf index 57081c85b..a37099818 100755 --- a/target/allwinner/v851s-fastboot_sl100_back/busybox-init-base-files/etc/asound.conf +++ b/target/allwinner/v851s-fastboot_sl100_back/busybox-init-base-files/etc/asound.conf @@ -118,7 +118,7 @@ pcm.PlaybackRateDmix { } @args.PERIODSIZE { type integer - default 960 #1024 + default 256 #1024 } type plug slave.pcm { @@ -135,7 +135,7 @@ pcm.PlaybackRateDmix { rate $SAMPLERATE channels $CHNNUM period_size $PERIODSIZE - periods 8 + periods 4 } } hooks.0 { diff --git a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/etc/asound.conf b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/etc/asound.conf index 57081c85b..a37099818 100755 --- a/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/etc/asound.conf +++ b/target/allwinner/v851s3-fastboot_sl100_front/busybox-init-base-files/etc/asound.conf @@ -118,7 +118,7 @@ pcm.PlaybackRateDmix { } @args.PERIODSIZE { type integer - default 960 #1024 + default 256 #1024 } type plug slave.pcm { @@ -135,7 +135,7 @@ pcm.PlaybackRateDmix { rate $SAMPLERATE channels $CHNNUM period_size $PERIODSIZE - periods 8 + periods 4 } } hooks.0 {