Audio on HeadPhone Not Working!

When I play any video on the youtube app, I get audio from the built in speakers on the connected LED panel, But when I insert Headphone into audio jack of my pi board, the audio still runs on the built in speakers. I need to run audio on my headphones. How can I do that.

I tried to change the media scenario, first I checked the current media scenario using following luna-send

luna-send -n 1 -f luna://com.webos.service.audio/media/getCurrentScenario '{}'

It returned following values.

{
"scenario": "media_back_speaker",
"returnValue": true
}

They I tried to change the scenario, using following luna-send

luna-send -n 1 -f luna://com.webos.service.audio/media/enableScenario '{"scenario":"media__default"}'

but it throws an error

{
"errorCode": 3,
"returnValue": false,
"errorText": "Invalid 'scenario' string parameter value or file not found."
}

Any solutions !

I didn't test it using headphone but I will see it soon. Thanks for your report.

1 Like

@shahbaz
I checked our media team and current we don't support headphone.
If you would like to use headphone, you need to change source code and then compile again.

In https://github.com/webosose/libndl-directmedia2/blob/master/src/esplayer.cpp, please change below

#define AUDIO_OUTPUT_DESTINATION "hdmi" -> #define AUDIO_OUTPUT_DESTINATION "analogue"

2 Likes

@Changhyeok
Thanks for your help, I shall recompile the source code and get back with results !