From 534f5d34ce2f421dbc66c165daba664e1c4f36c8 Mon Sep 17 00:00:00 2001 From: huangxin Date: Tue, 29 Nov 2011 15:08:53 +0800 Subject: [PATCH] audiocodec:fix the bug when start play spends 0.3s --- sound/soc/sun4i/sun4i-codec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/sun4i/sun4i-codec.c b/sound/soc/sun4i/sun4i-codec.c index 2c2a0ae5d63..e086e59bee3 100755 --- a/sound/soc/sun4i/sun4i-codec.c +++ b/sound/soc/sun4i/sun4i-codec.c @@ -117,7 +117,7 @@ static struct snd_pcm_hardware sun4i_pcm_playback_hardware = .channels_min = 1, .channels_max = 2, .buffer_bytes_max = 128*1024,//最大的缓冲区大小 - .period_bytes_min = 1024*16,//最小周期大小 + .period_bytes_min = 1024*4,//最小周期大小 .period_bytes_max = 1024*32,//最大周期大小 .periods_min = 4,//最小周期数 .periods_max = 8,//最大周期数 @@ -141,7 +141,7 @@ static struct snd_pcm_hardware sun4i_pcm_capture_hardware = .channels_min = 1, .channels_max = 2, .buffer_bytes_max = 128*1024,//最大的缓冲区大小 - .period_bytes_min = 1024*16,//最小周期大小 + .period_bytes_min = 1024*4,//最小周期大小 .period_bytes_max = 1024*32,//最大周期大小 .periods_min = 4,//最小周期数 .periods_max = 8,//最大周期数 @@ -1246,7 +1246,7 @@ static int __init snd_card_sun4i_codec_pcm(struct sun4i_codec *sun4i_codec, int snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_isa_data(), - 64*1024, 64*1024); + 16*1024, 16*1024); /* * 设置PCM操作,第1个参数是snd_pcm的指针,第2 个参数是SNDRV_PCM_STREAM_PLAYBACK * 或SNDRV_ PCM_STREAM_CAPTURE,而第3 个参数是PCM 操作结构体snd_pcm_ops