alsa分析:网络资源

本文详细介绍了ALSA的驱动架构、音频编解码驱动、snd_controls/dapm/alsa-lib配置脚本等内容,同时提供了Azure的ALSA笔记、内核中与alsa-lib层相关的知识点,以及对Android音频系统的框架结构解析。

http://blog.youkuaiyun.com/doom66151/article/details/6573256关于alsa,网络上已经有很多人做了分析,有的分析的非常好,图文并茂,我就拿来主义,直接引用了。

下面是收集的一些链接,内容包括:

alsa驱动架构

audio codec的驱动

alsa的snd_controls/dapm/alsa-lib/alsa配置脚本.....

alsa的中间层:alsa-lib alsa-HAL alsa-framework

+++++++++++++++++++++++++++++++++++++++++++++++
AZURE的alsa笔记,写的非常好:
关于audio codec的driver:
ALSA之PCM分析
ALSA之Codec分析
关于snd_kcontrol  dapm等内核中与alsa-lib层相关的:
snd_kcontrol探究
snd_kcontrol_new名称中的SOURCE字段
DAPM之一:概述
DAPM之二:audio paths与dapm kcontrol
[疑问解决]Android如何找到正确的ALSA底层kcontrol接口?
DAPM之三:audio paths与asound.conf

Innost的audio深入浅出系列:
Android深入浅出之Audio 第一部分 AudioTrack分析
Android深入浅出之Audio 第二部分 AudioFlinger分析
Android深入浅出之Audio第三部分Audio Policy

钱进的技术博客:
Android 音频系统   这一篇很清晰的描述了音频系统的框架结构,以及不同应用中的数据流。

root@imx91-11x11-lpddr4-evk:~# GST_DEBUG=3 gst-launch-1.0 -v --gst-debug=qos:5 alsasrc device=hw:CARD=imxaudioxcvr,DEV=0 do-timestamp=true !emux ! decodebin ! audioconvert ! audioresample ! audio/x-raw,format=F32LE,channels=2,rate=48000 ! usrpp ! audioconvert ! identity ! alsasinD=otk6263bmaudio,DEV=0 sync=true qos=true spdif parser version: SPDIFPARSER_00.00.03 build on Mar 19 2025 10:47:37 file: /usr/lib/imx-mm/parser/libspdifparser.so information 1 gst_usrpp_init stat failed: No such file or directory read sona paras. successed! sona in normal mode!! stat failed: No such file or directory saef parse default config ok saef use user paramStr V1 sona init, inch/outCH: 2/2, fs:48000, framelen:480 ############################################# load audio flow topology from config [flow]: input:2,output:2,subflow:2, fir-options;0 audio load params from user buffer ############################################# @@#######fade out:960, mute:960, 0xe6bf78c0####@@ audioaef create ok saef init OK! [sona]aef update==> sample_rate:48000 group_mode:0 set_voice_enhance_vol:0 usr_set_voice_gain:0 Setting pipeline to PAUSED ... usrpp-GST_STATE_CHANGE_NULL_TO_READY usrpp-GST_STATE_CHANGE_READY_TO_PAUSED 0:00:00.095550708 1172 0xffff90000eb0 FIXME default gstutils.c:4089:gst_element_decorate_stream_id_internal:<alsasrc0> Creating random stream-id, consider implementing a deterministic way of creating a stream-id Pipeline is live and does not need PREROLL ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... usrpp-GST_STATE_CHANGE_PAUSED_TO_PLAYING New clock: GstAudioSrcClock /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 203174 /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10158 Redistribute latency... /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = audio/x-iec958, format=(string)U32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = audio/x-iec958, format=(string)U32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstSpdifDemux:spdifdemux0.GstPad:sink: caps = audio/x-iec958, format=(string)U32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/x-iec958, format=(string)U32LE, layout=(string)interleaved[29941.360445] set sysclk tx_id = 1 , rate=(int)44100[29941.365644] otk6263bm_hw_params: fs = 48000, bit_width = 32 , channels=(int)2, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstSpdifDemux:spdifdemux0.GstPad:src: caps = audio/x-raw, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = audio/x-raw, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = audio/x-raw, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw, rate=(int)48000, format=(string)F32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:src: caps = audio/x-raw, rate=(int)48000, format=(string)F32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/x-raw, rate=(int)48000, format=(string)F32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstUsrpp:usrpp0.GstPad:src: caps = audio/x-raw, rate=(int)48000, format=(string)F32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstAudioConvert:audioconvert1.GstPad:src: caps = audio/x-raw, rate=(int)48000, format=(string)S32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstIdentity:identity0.GstPad:src: caps = audio/x-raw, rate=(int)48000, format=(string)S32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 0:00:00.274451417 1172 0xffff90000d10 WARN alsa pcm_hw.c:1429:snd_pcm_hw_get_chmap: alsalib error: Cannot read Channel Map ctl: No such file or directory Redistribute latency... /GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = audio/x-raw, rate=(int)48000, format=(string)S32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstIdentity:identity0.GstPad:sink: caps = audio/x-raw, rate=(int)48000, format=(string)S32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstAudioConvert:audioconvert1.GstPad:sink: caps = audio/x-raw, rate=(int)48000, format=(string)F32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstUsrpp:usrpp0.GstPad:sink: caps = audio/x-raw, rate=(int)48000, format=(string)F32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = audio/x-raw, rate=(int)48000, format=(string)F32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:sink: caps = audio/x-raw, rate=(int)48000, format=(string)F32LE, channels=(int)2, layout=(string)interleaved, channel-mask=(bitmask)0x0000000000000003 /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad1: caps = audio/x-raw, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink: caps = audio/x-raw, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink: caps = audio/x-raw, format=(string)S16LE, channels=(int)2, rate=(int)48000, layout=(string)interleaved Redistribute latency... 0:17:34.6 / 99:99:99. 0:17:34.8 / 99:99:99. 0:17:35.0 / 99:99:99. 0:17:35.2 / 99:99:99. 0:17:35.5 / 99:99:99. 0:17:35.6 / 99:99:99. 0:56:36.593882786 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 1:36:18.105354672 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 2:23:04.037127385 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 3:12:32.093806633 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 3:12:53.462586893 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 4:53:28.957369271 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 6:08:30.637897668 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 7:47:17.561681994 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 8:54:17.309300453 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 9:27:44.202534076 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 16:58:00.213858000 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 20:40:25.685133364 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 23:04:20.393014481 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 25:08:08.286040648 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 26:48:10.393934093 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 26:54:09.333771514 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 28:30:05.385358926 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 29:02:14.717139804 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 30:23:02.305647824 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 30:44:59.414007910 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 31:45:06.964985381 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 34:21:45.503275195 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 36:40:34.797645542 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 36:58:24.432937302 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 37:47:03.209638027 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 40:05:21.925010651 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 40:06:14.460266801 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 41:09:52.553906913 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 41:57:22.249710064 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 42:04:09.052643300 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 44:21:20.304274683 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 47:56:42.396928386 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 48:28:39.573733509 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 49:28:00.823168415 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 52:58:01.645041049 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 53:34:14.833761502 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 53:48:45.809662959 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 54:29:09.743465615 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 57:48:14.481363310 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 58:41:28.665126542 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 58:49:33.065980814 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 60:03:16.941792174 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 60:53:36.428675572 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 61:36:58.643994438 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 62:04:50.211562943 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 62:47:12.736412447 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 62:48:11.822958809 1172 0xffff80003290 WARN alsa gstalsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 63:53:25.727241383 1172 0xffff80003290 WARN alsa gst alsasrc.c:916:xrun_recovery:<alsasrc0> xrun recovery -32: Broken pipe 帮我分析下这个log
最新发布
12-09
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值