请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TAS2505 工具与软件:
尊敬的 TI:
当我使用"Aplay"命令进行音频驱动程序测试时、将报告以下错误:
root@tiny:~# aplay sample-3s.wav Playing WAVE 'sample-3s.wav' : [ 25.317396] tas2505-codec 2-0018: tas2505_hw_params: bit width = 16 Signed 16 bit Little Endian, Rate 44100 Hz, Stereo [ 25.347392] davinci-mcasp 2b10000.audio-controller: Sample-rate is off by 400 PPM [ 25.357478] tas2505-codec 2-0018: tas2505_set_bias_level:power on aplay: pcm_write:2146: write error: Input/output error [ 45.737567] tas2505-codec 2-0018: tas2505_set_bias_level:SND_SOC_BIAS_STANDBY [ 45.747864] tas2505-codec 2-0018: tas2505_set_bias_level:power off root@tiny:~#
tas2505的驱动程序来自以下链接: https://git.ti.com/cgit/lpaa-android-drivers/tas2505-linux-driver/ 、设备树配置也基于此链接进行配置。 但是 "CLK_McASP" 具有一个实例 "启用 GPIO" 节点、因此未对其进行配置。
/{ clk_mcasp1_fixed: clk_mcasp1_fixed { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <24576000>; }; clk_mcasp1: clk_mcasp1 { #clock-cells = <0>; compatible = "gpio-gate-clock"; clocks = <&clk_mcasp1_fixed>; //enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */ }; codec_audio: sound { compatible = "simple-audio-card"; simple-audio-card,name = "AM62x-SKEVM"; simple-audio-card,dai-link@0 { format = "i2s"; bitclock-master = <&sound0_master>; frame-master = <&sound0_master>; sound0_master: cpu { sound-dai = <&mcasp1>; clocks = <&clk_mcasp1>; }; codec { sound-dai = <&tas2505>; }; }; }; };
由于 'enable-gopios' 未配置节点、引导日志将出现以下错误:
[ 0.813168] clk_mcasp1: gpio_clk_driver_probe: Can't get 'enable' named GPIO property [ 0.821220] gpio-clk: probe of clk_mcasp1 failed with error -2
我想问的是、出现错误消息的原因是什么 "播放:PCM_WRITE:2146:写入错误:输入/输出错误" ? 与节点有关 'ENABLE-GPIOs' 未配置? 如果相关、您能告诉我如何配置 'enable-gopios' 节点?
声卡信息和设备节点信息如下:
root@tiny:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: AM62xSKEVM [AM62x-SKEVM], device 0: davinci-mcasp.0-tas2505-hifi tas2505-hifi-0 [davinci-mcasp.0-tas2505-hifi tas2505-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 root@tiny:~# cat /proc/asound/ AM62xSKEVM/ card0/ cards devices pcm timers version root@tiny:~# cat /proc/asound/cards 0 [AM62xSKEVM ]: simple-card - AM62x-SKEVM AM62x-SKEVM root@tiny:~# ls /dev/snd/ controlC0 pcmC0D0p timer root@tiny:~#