驱动 HLD

1. The audio driver picture based on alsa.


2. HIAO functions:
1) alsa_hiao_init
register the device and driver of hiao.
2) snd_hiao_pcm
register playback stream
3) snd_card_hiao_ctl
register controls such as mute or volume adjustment
4) snd_hiao_hw_params
set audio parameters, allocate memory
5) snd_hiao_playback_prepare
flush all buffer
6) snd_hiao_interrupt
Interrupt sevice program
7) snd_hiao_playback_trigger
start, stop or pause the playback
8) snd_hiao_ack
fill data to hiao buffer.
Note:
Hiao needs audio data with special format, so a special data format transform is needed.
We cannot place the transform to a tasklet. Because (1). fill one period once, if the isr is delayed and merged, it cause error.(2). Fill all free, we can not be sure the data is valid.
We place the transform to a callback after the data is written by user space program, but in memory map situation, the call back is not triggered. So we modify the alsa core to ensure the callback be triggered in memory map situation.
3. SIO functions:
1) hi_i2s_mod_init
register device and driver of sio, register dai of sio
2) godbox_aic31_mod_init
declare dai pair to connect sio with aic31
3) hi_pcm_new
register playback and record streams
4) hi_i2s_ops_hw_params, godbox_ops_hw_params
set audio parameters.
5) hi_pcm_dma_complete
Interrupt sevice program
6) hi_i2s_ops_trigger, hi_pcm_trigger
to start, stop or pause sio and dma

Note:
We use the standard aic3x driver in linux kernel.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值