Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Both HDMI and Analog output on Raspberry Pi XBMC #172

Closed
slingshot27 opened this issue Dec 18, 2012 · 109 comments
Closed

Both HDMI and Analog output on Raspberry Pi XBMC #172

slingshot27 opened this issue Dec 18, 2012 · 109 comments

Comments

@slingshot27
Copy link

Hello,

I have a hearing problem and listen to the movies on a device that is connected to the analog input of the Raspberry Pi. My wife would also like to hear sound and her sound is given by the TV via HDMI.
Now the problem is that the sound goes through HDMI or analog output.

It would be great if the audio through both HDMI and analog would be sent so we both can enjoy the movie. Is this possible?

On the internet I found the link below, only I have no linux experience. Is it someone managed to get this working?

Thank huge thanks for the help!

http://mce.commsbyte.com/index.php?option=com_content&view=article&id=114:enabel-hdmi-and-stereo-audio-at-same-tiem-ubuntu&catid=10:linux

@CurlyMoo
Copy link
Contributor

I can't test because i don't have a HDMI capable machine. So @Koenkk? or @Hexagon?

@Koenkk
Copy link
Contributor

Koenkk commented Dec 18, 2012

I do, will try this tonight.

@ghost ghost assigned Koenkk Dec 18, 2012
@slingshot27
Copy link
Author

Thank you guys for the great support!

@Koenkk
Copy link
Contributor

Koenkk commented Dec 18, 2012

I couldn't get it working, I figured out that the build we use is compiled with "--disable-alsa", that may be that reason that it ain't working. I'm going to (try) recompile XBMC with --enable-alsa. Will report back then (probably tomorrow).

@slingshot27
Copy link
Author

Thanks so much for trying! Hope you can fix it.

@Koenkk
Copy link
Contributor

Koenkk commented Dec 19, 2012

@CurlyMoo do you know if ALSA has any kernel related things? XBMC is not configuring with alsa enabled even with --enable-alsa.

@CurlyMoo
Copy link
Contributor

That's because XBMC is hard coded with alsa disabled when building for the RPi. That's why you need some extensive patching like the Raspbmc guys did.

@slingshot27
Copy link
Author

That's a pitty I guess

@slingshot27
Copy link
Author

Hi,

Botez posted the following message on tehe XBMC Forum: (http://forum.xbmc.org/showthread.php?tid=86038&pid=1272487#pid1272487)

I can verify that the solution to get dual audio mentioned in this thread (http://forum.xbmc.org/showthread.php?tid=145430&pid=127247)) worked for me using the latest release of Frodo on Openelec. So there is hope for Linux folks out there.

Does this help?

@Koenkk
Copy link
Contributor

Koenkk commented Dec 21, 2012

The problem is the AudioEngine is not enabled on the raspberry pi XBMC build. So it does not use those config files.

@slingshot27
Copy link
Author

I read somewhere OpenELEC 2.0 does support it. Have they implemented it themselves?

@CurlyMoo
Copy link
Contributor

RaspBMC supports it as well, but yes they implemented this themselves.

@slingshot27
Copy link
Author

Ok, but I would like to stick to Xbian :)

@CurlyMoo
Copy link
Contributor

Then help us implement it :)

@slingshot27
Copy link
Author

I would like too... if I only could :)

@Koenkk
Copy link
Contributor

Koenkk commented Dec 21, 2012

From a very trustable source I heard that XBMC did not implemented ALSA for the Pi because it caused a lot of problems. Openelec on the Pi does not support this (from what I heard) because of this. Raspbmc does, but this causes a lot of sideffects.

@slingshot27
Copy link
Author

What sideffects do you mean?

@CurlyMoo
Copy link
Contributor

Read this topic:
http://forum.xbmc.org/showthread.php?tid=146646

A nice discussion between the XBMC RPi developer (gimli) and the Raspbmc developer (s7mx1).

And a pull request @Koenkk can look at: xbmc/xbmc#1868

@brantje
Copy link
Member

brantje commented Dec 24, 2012

Tester reports for duty
Have HDMI and stereo sound here :)

@inspector71
Copy link

@brantje I wonder if you're missing the point? Stereo via HDMI isn't a problem AFAIK, it's getting sound pumping out through both HDMI and the analog 3.5mm port on the Raspi. Apologies if I misread your comment and my response is wrong.

@brantje
Copy link
Member

brantje commented Dec 24, 2012

@inspector71 I meant i can test new builds if Koenkk needs testers ;)

@inspector71
Copy link

@brantje: fair enough, sorry for the confusion. I'm also quite willing to test.

@stupid-boy
Copy link

This can be done in OMXAudio.cpp if "OMX.broadcom.audio_splitter" is put in OMX tunnel and 2 "OMX.broadcom.audio_mixer" are attached to its output ports. OMXPlayerAudio::OpenDecoder must be changed too as currently it makes decision where to output audio. Also, "passthrough" related stuffs in OMXPlayerAudio must be redesigned in such case. This approach is only for Raspberry Pi and doesn't deal with ALSA or PulseAudio, as all remaining RPI specific code.
Not tested.

Edit: If RPI have enough power, splitter can be put after decoder, keeping current passthrough logic for HDMI and adding separate mixer/render for analog channel.

@Koenkk
Copy link
Contributor

Koenkk commented Dec 25, 2012

@stupid-boy do you have a .patch?

@stupid-boy
Copy link

No, just idea.
I can try, but this will take longer.

@Koenkk
Copy link
Contributor

Koenkk commented Dec 25, 2012

That would be awesome!:)

@slingshot27
Copy link
Author

Sounds awesome!

@stupid-boy
Copy link

current status:
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&t=27908
no any noise from Broadcom!

@Koenkk if you wish, i can commit my work in my fork? any help are welcome. it is crazy annoying to wait min 3 hours only for linker to finish, just for one added log. i am building in 256M RPI and don't have any debugger...

@Koenkk
Copy link
Contributor

Koenkk commented Jan 3, 2013

@stupid-boy I'm fine with that :)

@CurlyMoo
Copy link
Contributor

Owk, last off topic message. If you are going to try XBian, wait for Alpha 5. That will be released anytime soon.

@Koenkk
Copy link
Contributor

Koenkk commented Feb 20, 2013

The XBMC part is commited with 90d712f , firmware still needs to be commited.

@CurlyMoo
Copy link
Contributor

Firmware commited with 857d86e

@kitefighter
Copy link

Dear all
I'm runnng Xbian 1.05a, XBMC 12.0 Git:20130127-fb595f2 (Compiled: Jan 30 2013), Kernel3.6.11, Firmware:1.2
but i'm still missing the option 'both' at audio settings.
How can i enjoy your great work on this issue? Appreciate your help.

@Koenkk
Copy link
Contributor

Koenkk commented Feb 26, 2013

@stupid-boy
Copy link

fix published in pull request at main stream repo.
... seek hangs.

@Koenkk
Copy link
Contributor

Koenkk commented Mar 7, 2013

That patch is already in our patch repo so xbmc-nightly frodo will contain it.

@stupid-boy
Copy link

really?
you are incredible fast! i pushed it just in hour ago and it is already merged at you repo? great!
did you make a mistake for which patch we talk?

@Koenkk
Copy link
Contributor

Koenkk commented Mar 7, 2013

Yes, I was talking about the seekbeforezero patch ;) Gonna merge the one you are talking about today.

@stupid-boy
Copy link

good
but strange, 'both audio' is in your nightly from relatively long time, no one spot this bug....

@Koenkk
Copy link
Contributor

Koenkk commented Mar 7, 2013

Can you give me a link to the patch file? You can also do a pull request on our patches git repo :)

@stupid-boy
Copy link

stupid-boy/xbmc@85bb82a
i can't. i even do not know where your repo is. here i see only binaries.
remember, i am not related with xbian in any way.

@CurlyMoo
Copy link
Contributor

CurlyMoo commented Mar 7, 2013

Not even as a user?

@stupid-boy
Copy link

no. i use different system. i never tried xbian.
out topic here: i started a long time ago with image from http://selfprogramming.bplaced.net/. over time i made a lot of customizations on it and now i can say, i have completely different and custom system. i use it not only for xbmc development, but for other things too. currently i have around 40% free of my 60G hdd, without single multimedia file on it, you can guess how related it is to any other.

in fact, that image was my first touch with linux at all :)

@jlucasnc
Copy link

How can I play my audio in hdmi and analog on Raspbmc?

@Koenkk
Copy link
Contributor

Koenkk commented Mar 23, 2013

Apply the patch to XBMC and then compile it...

@jlucasnc
Copy link

Where is it the patch? How compile? I'm new on this world of XBMCs :-P

@brantje
Copy link
Member

brantje commented Mar 23, 2013

Or just install xbian ;).

@jlucasnc
Copy link

but yesterday installed xbian and had no option both

@Koenkk
Copy link
Contributor

Koenkk commented Mar 23, 2013

That's because you need to update to XBMC Frodo 12.1, read http://xbian.org/2013/03/xbmc-frodo-12-1-more/

@imarkskinner
Copy link

So I'm using a standard install of Raspbmc, can I use this feature? I switched to nightly builds but still don't have the 'all' option. Can I get it working without compiling software, I'm not too confident with doing that

@Koenkk
Copy link
Contributor

Koenkk commented Mar 31, 2013

@imarkskinner this is XBian, not raspmbc ;p

@imarkskinner
Copy link

So this is Xbian specific, and can't be done on raspbmc, sorry

@CurlyMoo
Copy link
Contributor

If you want this feature on Raspbmc, you need to contact Sam, not us. Or switch to XBian.

@stupid-boy
Copy link

Yes, definitely you have to ask Sam if you want this in Raspbmc or switch to XBian. XBian team here can't help you in any way with Raspbmc. As i know, currently this feature is build only in XBian distribution and some private builds.
Here is the topic on their forum, started by the same user that start this request here:
http://forum.stmlabs.com/showthread.php?tid=5154

@imarkskinner
Copy link

Sorry, Okay I'll dig out a spare SD card and try Xbian, most online reviews say your's is better than Raspbmc anyways. Well done & keep up the good work

@Koenkk
Copy link
Contributor

Koenkk commented Apr 5, 2013

@stupid-boy the OMXAudio.cpp have been upgraded and now conflicts with your patch. (xbmc/xbmc@802a856). Can you check if you can fix these problems?

@stupid-boy
Copy link

no, sorry.
as i previously mentioned, while this pull request is not merged in mainstream, it is your responsibility to manually merge it every time some related file changes. of course, you can or can not ask for their merge plans at mainstream.

actually, if you take a look in OMXAudio.cpp, you will see it is NOT changed ( there is only one added line, which is commented out ), so this time merge must not cause any troubles. be prepared for more serious situations in future.

@Koenkk
Copy link
Contributor

Koenkk commented Apr 5, 2013

@stupid-boy thanks anyway, will look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants