Pico i.MX7Dual: I2S -> can not open pcm_out driver

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Pico i.MX7Dual: I2S -> can not open pcm_out driver

647 次查看
toni1727
Contributor I

Good Day iMX community.

This question is regarding Android of Things.

I'm a little desperate. I2S seems not to work on Pico i.MX7Dual.

If I try to play a sound with audioTrack. In the raspberry pi 3 it works without problems, but if I execute it in imx7d it gives me the following error:

  • audio_hw_primary: card 0, port 0 device 0x1000000

  • audio_hw_primary: rate 48000, channel 2 period_size 0xc0

  • audio_hw_primary: can not open pcm_out driver 0: can not set hw params: Invalid argument

The same thing happens with an i2s microphone

This is the code:

final AudioDeviceInfo audioOuputDevice = findAudioDevice(AudioManager.GET_DEVICES_OUTPUTS, AudioDeviceInfo.TYPE_BUS);

    int mBufferSize = AudioTrack.getMinBufferSize(44100, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT);

        AudioFormat audioOutputFormat = new AudioFormat.Builder()
                .setChannelMask(AudioFormat.CHANNEL_IN_MONO)
                .setEncoding(AudioFormat.ENCODING_PCM_16BIT)
                .setSampleRate(44100)
                .build();

        audioTrack = new AudioTrack.Builder()
                .setAudioFormat(audioOutputFormat)
                .setBufferSizeInBytes(mBufferSize * 2)
                .setTransferMode(AudioTrack.MODE_STREAM)
                .build();

        audioTrack.setPreferredDevice(audioOuputDevice);
        audioTrack.setPlaybackRate(44100);
        audioTrack.setVolume(AudioTrack.getMaxVolume());

It is not about pins connections (J9: 3,6,10,7), It doesn't matter, connected or unconnected. Same Result

I changed the wav format. Same result too.

Thank you very much!

标签 (1)
标记 (3)
0 项奖励
1 回复

557 次查看
CarlosCasillas
NXP Employee
NXP Employee

Hi Antonio,

I’m afraid that Pico i.MX7Dual board is not supported by NXP. You could redirect your question directly to TechNexion on the following link:

https://www.technexion.com/support/ 

Hope this will be useful for you.
Best regards!
/Carlos
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

-------------------------------------------------------------------------------

0 项奖励