linux2.6.37音频不可用修改

 


Linux 2.6.37 音频更改

#include <sound/s 3c 24xx_uda134x.h>
#include <sound/uda134x.h>

struct s 3c 24xx_uda134x_platform_data s 3c 24xx_uda134x_data = {
      .l3_clk = S 3C 2410_GPB4,
      .l3_data = S 3C 2410_GPB3,
      .l3_mode = S 3C 2410_GPB2,
      .model = UDA134X_UDA1341,
};
static struct platform_device s 3c _device_uda134x = {
      .name = "s 3c 24xx_uda134x",
      .dev = {
           .platform_data      = &s 3c 24xx_uda134x_data,
      }
};

 

de>static struct platform_device *smdk2440_devices[] __initdata = {
    &s 3c _device_usb,
    &s 3c _device_lcd,
    &s 3c _device_wdt,
    &s 3c _device_i 2c 0,
    &s 3c _device_iis,
    &s 3c _device_rtc,    
    &s 3c _device_dm9000,
    &s 3c _device_uda134x,   //
加上这句
};

 

# make menuconfig >选上以下几项:

Device Drivers --->
       <*> Sound card support --->
          --- Sound card support
              <*> Advanced Linux Sound Architecture --->
                --- Advanced Linux Sound Architecture
                   <*> OSS Mixer API
                   <*> OSS PCM (digital audio) API
                    [*] Verbose procfs contents
                   <*> ALSA for SoC audio support --->
                      --- ALSA for SoC audio support
                        <*> SoC Audio for the Samsung S3CXXXX chips
                        <*> SoC I2S Audio support UDA134X wired to a S 3C 24XXde

改正后的内核 可以看到dev/dsp设备 检查硬件电路后音频无输出,最后查证原因是linux 2.6.37 的音频不可用

更改 2.6.37 的音频

可以下载 Linux- 2.6.36 的内核源码;
然后复制 "Linux-2.6.36/sound/" 目录和 "Linux-2.6.36/include/sound/" 目录到 Linux-2.6.37 内核中替换掉对应的目录;重新编译

启动后 可以在dev下看到 dsp dsp2两个设备,测试dsp2正常

拷贝madplay 相关文件到 相应目录下

因为madplay默认的是用dsp 更改方法

 

rm dev/dsp

ln –s dsp dsp2

执行 madplay 播放正常

 

你可能感兴趣的:(音频不可用修改,linux2.6.37)