2

I implemented an application run on Raspberry Pi 3 using Android Things. This application will be able to play rtsp video and output to screen via HDMI port. But the audio is not working with jack 3.5mm. Below is my code:

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        VideoView videoView = findViewById(R.id.video_view);
        videoView.setVideoPath("rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov");
        videoView.start();
    }
}

How can I fix it?

tlhIngan
  • 3,372
  • 5
  • 21
  • 33
mr.icetea
  • 121
  • 3

3 Answers3

2

The problem is that if you connect the hdmi first, it will use the hdmi as the audio output.

Try connecting the audio jack first. This solved it for me.

0

Add this line in config.txt file:

hdmi_ignore_edid_audio=1
Bex
  • 2,929
  • 3
  • 26
  • 34
0

If you cannot get the 3.5" jack working, Android Things also supports USB audio as well. A viable solution might be to just get a $7 USB audio card that has 3.5mm jacks on it, something like this:

Generic USB audio card with 3.5mm jacks for speaker and microphone

I found a good question/answer related to this in another post HERE.

Good Luck, and please write back here to let us know what you found!

MrChips
  • 993
  • 1
  • 5
  • 11