我正试着用安卓的东西通过I2S播放声音,但是一直收到
E/audio_hw_hikey: cannot open pcm_out driver: cannot open device '/dev/snd/pcmC1D0p': No such file or directory 48000 2 0我已经用adb ls /dev/snd检查了音频设备,设备确实存在
000041ed 00000078 5db48f0c .
000041ed 00000500 00000008 ..
000021b0 00000000 00000002 pcmC0D1p
000021b0 00000000 00000002 controlC0
000021b0 00000000 00000002 pcmC0D0p
000021b0 00000000 00000002 timer我遗漏了什么?
发布于 2019-10-29 23:13:54
您是否正在尝试使用路径直接打开I2S总线?那行不通的。相反,您可以使用AudioTrack应用程序接口和set the preferred device,这将通过管道将其传递到I2S通道。
audioInputDevice = findAudioDevice(AudioManager.GET_DEVICES_INPUTS, AudioDeviceInfo.TYPE_BUS);
audioOutputDevice = findAudioDevice(AudioManager.GET_DEVICES_OUTPUTS, AudioDeviceInfo.TYPE_BUS);链接的样本includes some code介绍了如何做到这点。
https://stackoverflow.com/questions/58574228
复制相似问题