linux音频子系统 - ASoc框架

为什么要设计ASoC

引用linux Document中的解释:
The overall project goal of the ALSA System on Chip (ASoC) layer is to
provide better ALSA support for embedded system-on-chip processors and
portable audio codecs.

ASoC的特性:

  • Codec independence. Allows reuse of codec drivers on other platforms
    and machines.

  • Easy I2S/PCM audio interface setup between codec and SoC. Each SoC
    interface and codec registers its audio interface capabilities with the
    core and are subsequently matched and configured when the application
    hardware parameters are known.

  • Dynamic Audio Power Management (DAPM). DAPM automatically sets the codec to
    its minimum power state at all times. This includes powering up/down
    internal power blocks depending on the internal codec audio routing and any
    active streams.

  • Pop and click reduction. Pops and clicks can be reduced by powering the
    codec up/down in the correct sequence (including using digital mute). ASoC
    signals the codec when to change power states.

  • Machine specific controls: Allow machines to add controls to the sound card
    (e.g. volume control for speaker amplifier).

ASoc框架

这里写图片描述

ASoC-pcm结构

pcm这块主要分codec/platform/machine,codec主要对应的是音频的ADC/DAC硬件(包括外围器件和soc器件),platform一般主要是平台上的设备,比如DMA设备,machine相当于board,主要是负责声卡的注册,每个machine对应的codec/platform都是不一样的,这样可以自由组合使用。

  • Codec driver: The codec driver is platform independent and contains audio
    controls, audio interface capabilities, codec DAPM definition and codec IO
    functions.
  • Platform driver: The platform driver contains the audio DMA engine and audio
    interface drivers (e.g. I2S, AC97, PCM) for that platform.
  • Machine driver: The machine driver handles any machine specific controls and
    audio events (e.g. turning on an amp at start of playback).

ASoC-control结构

ASoC这边在control里主要加入了DAPM,具体细节后文介绍,DAPM主要就是在你每次set/get操作的时候,都会按照既定的原则,来对链表上的设备按顺序turn/off

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值