ALSA在ARM(S3C6410)中的移植

软硬件平台:ARM9(S3C2410A),UDA1341, 2.6.33.1内核,arm-none-linux-gnueabi-gcc-4.3.2

ASoC:

ALSA为嵌入式系统提供的SOC级驱动,支持PCM,I2S和AC97。

详细内容可查阅:

 

(1)驱动移植

2.6.33.1已经为提供了UDA134X的ALSA驱动,只需要稍微配置即可。

在arch/arm/mach-s3c2410/mach-smdk2410.c中添加:

static struct s3c24xx_uda134x_platform_data s3c24xx_uda134x_data = {
        .l3_clk = S3C2410_GPB(4),
        .l3_data = S3C2410_GPB(3),
        .l3_mode = S3C2410_GPB(2),
        .model = UDA134X_UDA1341,
};

static struct platform_device s3c24xx_uda134x = {
        .name = "s3c24xx_uda134x",
        .dev = {
                .platform_data    = &s3c24xx_uda134x_data,
        }
};

在smdk2410_devices[]添加一项:&s3c24xx_uda134x

配置内核选项,选中ALSA支持。

 

更新内核,启动显示

usbcore: registered new interface driver usbhid                                
usbhid: USB HID core driver                                                    
usbcore: registered new interface driver snd-usb-audio                         
usbcore: registered new interface driver snd-usb-caiaq                         
No device for DAI UDA134X                                                      
No device for DAI s3c24xx-i2s                                                  
S3C24XX_UDA134X SoC Audio driver                                               
UDA134X SoC Audio Codec
                                                        
asoc: UDA134X <-> s3c24xx-i2s mapping ok                                       
usb 1-1: new full speed USB device using s3c2410-ohci and address 2            
ALSA device list:                                                              
  #0: S3C24XX_UDA134X (UDA134X)

 

驱动移植成功。可以支持板子的UDA1341,可支持我的usb声卡了。

(此处也可以直接使用alsa-driver提供驱动程序,具体我没有做)

 

(2)alsa-lib移植

版本alsa-lib-1.0.22

./configure --host=arm-linux --target=arm-linux --prefix=/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr --enable-static --enable-shared --disable-python --with-configdir=/usr/local/share --with-plugindir=/usr/local/lib/alsa_lib

编译安装,将库文件、配置文件和插件文件转移到嵌入式文件系统的对应目录上。

 

(3)alsa-utils移植

版本alsa-utils-1.0.23

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wysygz.html