Linux-wm8960

wm8960

    一款音频编解码芯片,提供A/D,D/A转换,mixer混音器功能,具有立体声功能,带左右声道和喇叭。

    通过IIS传输音频数据,通过IIC控制CODEC芯片。

数据图

     1.串行时钟SCLK,也叫位时钟(BCLK),即对应数字音频的每一位数据,SCLK都有1个脉冲。SCLK的频率=2×采样频率×采样位数。
    2. 帧时钟LRCK,(也称WS),用于切换左右声道的数据。LRCK为“1”表示正在传输的是右声道的数据,为“0”则表示正在传输的是左声道的数据。LRCK的频率等于采样频率。
    3.串行数据SDATA,就是用二进制补码表示的音频数据。
    4.MCLK,称为主时钟,也叫系统时钟(Sys Clock),是采样频率的256倍或384倍。

ALSA 架构

    分三大块:Platform,Codec,Machine。

    Platform:作用是完成音频数据的管理,最终通过CPU的数字音频接口(DAI)通过IIS协议把音频数据传送给Codec进行处理。

    Codec:编解码器,Codec里面包含了I2S接口、D/A、A/D、Mixer、PA(功放),通常包含多种输入(Mic、Line-in、I2S、PCM)和多个输出(耳机、喇叭、听筒,Line-out),Codec和Platform一样,是可重用的部件。

    Machine:为Platform CPU、Codec、输入输出设备提供了一个载体和连接关系。

### i.MX6 Linux Kernel 5.10 with WM8960 Configuration and Driver Setup Tutorial For configuring the i.MX6 processor to work with a Linux kernel version 5.10 specifically targeting the WM8960 audio codec, several key steps must be followed carefully[^1]. The process involves ensuring that all necessary drivers are included within the kernel build or as modules. #### Preparing Development Environment Ensure an appropriate development environment is set up on Ubuntu similar to what has been used previously for other projects like AWTK transplantation mentioned earlier but focusing now on audio support instead of graphical interfaces. #### Obtaining Sources Retrieve sources compatible with both the target hardware (i.e., i.MX6) and desired peripherals such as the WM8960 from official repositories or vendor-provided trees which may contain patches not yet merged upstream into mainline kernels. #### Configuring Kernel Options When configuring the kernel using `make menuconfig`, ensure options related to sound subsystems (`SOUND`), Advanced Linux Sound Architecture (ALSA), and specific SoC platforms including Freescale/NXP's i.MX series along with their associated codecs like Wolfson Microelectronics' WM8960 are enabled either built-in or loadable: ```bash Device Drivers --> <*> Sound card support <*> Advanced Linux Sound Architecture [*] PCI sound devices <*> NXP/Freescale i.MX Audio Support <*> SOC Codec drivers ---> <*> Wolfson Microelectronics WM8960/WM8962 ``` Additionally, verify device tree settings match those required by your board design; this might involve editing `.dts/.dtsi` files found under arch/arm/boot/dts directory paths relative to where you cloned the source code repository: ```diff &sound { compatible = "fsl,imx-audio-wm8960"; model = "wm8960-audio"; }; ``` After making these changes, compile the updated Device Tree Blob(s): ```bash make dtbs ``` #### Building and Installing Modules/Kernels Proceed with compiling the entire kernel image plus any out-of-tree modules needed for proper operation post-booting into userspace applications expecting access via standard ALSA APIs provided through `/dev/snd/*` nodes created during initialization sequences executed early in bootstrapping processes managed primarily by udev rulesets defined system-wide across distributions based around Debian packaging systems common among embedded ARM boards running GNU/Linux operating environments today. Once everything compiles successfully without errors encountered throughout compilation phases, install generated artifacts onto target root filesystem images prepared ahead of time before flashing them over USB/JTAG/SPI NOR flash memory chips soldered directly onto PCB layouts designed explicitly for evaluation purposes surrounding prototype iterations leading towards mass production runs eventually resulting in consumer products hitting retail shelves worldwide once finalized after rigorous testing cycles conducted internally at manufacturing facilities specializing in electronics assembly services offered commercially available upon request depending on volume requirements specified contractually between parties involved financially invested stakeholders interested in bringing innovative solutions leveraging open-source technologies forward faster than proprietary alternatives could ever hope achieving alone due largely thanks contributions made freely accessible online communities supporting collaborative efforts advancing state-of-the-art computing paradigms continuously evolving alongside technological progressions observed historically since inception Unix-like OS architectures first conceived decades ago paving way modern-day implementations seen widespread adoption across industries ranging telecommunications automotive entertainment personal computing sectors alike.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值