Linux Kernels for OpenFrame

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
User avatar
pete
Posts: 2796
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Linux Kernels with GMA500 Support

Post by pete » Tue Sep 17, 2013 7:54 pm

Guess here I am a bit late to the "party".

That said I am getting non jittery 1080 streaming running at Gb speeds but XBMC is still using the legacy EMGD driver.

Most of my IP HD CCTV cams are doing 720 and stream great with the Joggler / Openpeak emgd drivers.

The above mention will I see better with the GMA500 support?

A side note experiment was putting in a Broadcom Crystal HD mini pci card in the Joggler III (aka Openframe 2.0) build using the 2Gb partition for XBMC streams "perfect" live broadcast 1080 HD and recorded media from the MthTV box and NAS boxes. The Joggler III includes a battery to keep time.....

Thom (tschak) is also looking at this (thinking yes?)

and I invite him to participate in this specific thread.

Please let me know when and how I can partipate in testing as I have an Ubuntu build running right now on a 16Gb boot SSD and its working well and is pretty fast.
- Pete

Auto mater

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernels with GMA500 Support

Post by roobarb! » Wed Sep 18, 2013 2:52 pm

pete wrote:The above mention will I see better with the GMA500 support?
'Fraid not. None of the kernel drivers for GMA500 include hardware acceleration. If you need hardware video decoding, the EMGD drivers from Intel are the best that are available.
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

User avatar
pete
Posts: 2796
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Linux Kernels with GMA500 Support

Post by pete » Wed Sep 18, 2013 4:27 pm

Thank-you roobarb!

Yup; I did have decent live 1080 streaming; then goofing around installed asterisk on the Joggler II and 1080 live streaming got a bit slower or jittery.

I am thinking that might dinged utilization some.

That said going light with some lightPBX thing on some little box ....
- Pete

Auto mater

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernels with GMA500 Support

Post by roobarb! » Thu Oct 10, 2013 11:50 am

BuZz wrote:
pkirchhofer wrote:Hi there,

I also encountered this error. The kernel audio interface did change somewhat. To fix this I bisected the kernel source and came up with a working patch:
I was looking through your patches for 3.10 and saw https://github.com/pkirchhofer/android- ... 1a67a87ec9

Apart from that small change to switch the pin, does the sound work perfectly ? I had started porting the older audio patches over to kernel 3.11 alsa, not working yet, but the previous joggler alsa patches modify a bunch of codec parameters and has different pin ids/configs from other models. Wish I understood the hardware and hda codecs better !
I've been using these patches for 3.10.15 just now... unfortunately, that pin change alone doesn't sort out the switching from internal speakers to headphones. The sound works perfectly (no crackling, weird noises, etc) but when headphones are plugged in, it just continues to play out of the internal speakers. No audio on the cans at all.

I'll have to take another look and follow your lead in porting the audio patches. Everything else is up and running - GMA500 kernel drivers are working.
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

chris
Posts: 20
Joined: Mon Sep 09, 2013 1:01 pm

Re: Linux Kernel Talk

Post by chris » Fri Oct 11, 2013 12:50 am

When will alpha testing of 3.10 begin? :D

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernel Talk

Post by roobarb! » Fri Oct 11, 2013 9:23 am

chris wrote:When will alpha testing of 3.10 begin? :D
You can have a couple of .dpkgs now if you don't mind the audio being bust! ;)
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernels with GMA500 Support

Post by roobarb! » Fri Oct 11, 2013 11:55 am

Hmm. Still no luck with the audio, so I'm building a version with just the I2C and backlight patches, just to see where we're up to with things. Updated the patches to play nice with 3.10 too:

http://birdslikewires.co.uk/download/jo ... rnel/3.10/

Let's see what happens. :)
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

User avatar
BuZz
Site Admin
Posts: 1450
Joined: Fri Mar 04, 2011 1:15 am

Re: Linux Kernel Talk

Post by BuZz » Fri Oct 11, 2013 4:24 pm

I had thought I had missed something, as it didn't switch for me with that small hack either. I have ported across / rewritten the old audio patch to the new alsa, using the new structures etc. headphone switching not sorted yet - but I will revisit it again (I lack the low level understanding of the hda codec etc). As soon as I have something that works a little better ill post my patches. What we really need is to get a joggler over to an Alsa developer who has the time to look at it and implement properly

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernel Talk

Post by roobarb! » Fri Oct 11, 2013 4:48 pm

BuZz wrote:What we really need is to get a joggler over to an Alsa developer who has the time to look at it and implement properly
Anyone know any tame Alsa developers? :)
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernels with GMA500 Support

Post by roobarb! » Tue Oct 15, 2013 3:52 pm

Well, still had no luck with the audio. It plays fine from the internal speakers, but still nothing from the headphone socket.

I'm now knocking together a kernel that's made straight from pkirchhofer's github to see if it works from there and discover if I'm doing anything ridiculous.
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

chris
Posts: 20
Joined: Mon Sep 09, 2013 1:01 pm

Re: Linux Kernel Talk

Post by chris » Wed Oct 16, 2013 2:50 am

roobarb! wrote:
chris wrote:When will alpha testing of 3.10 begin? :D
You can have a couple of .dpkgs now if you don't mind the audio being bust! ;)
Sure. Is the issue headphone switching? I'm just trying to see if 3.10 works with my DAC.

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernel Talk

Post by roobarb! » Wed Oct 16, 2013 11:33 am

chris wrote:
roobarb! wrote:
chris wrote:When will alpha testing of 3.10 begin? :D
You can have a couple of .dpkgs now if you don't mind the audio being bust! ;)
Sure. Is the issue headphone switching? I'm just trying to see if 3.10 works with my DAC.
Yes, headphone switching is broken... in which case, seeing as you don't need it, here you go!

http://birdslikewires.co.uk/download/jo ... ncomplete/

I don't know the USB system in use on your device, so if you could find out and let me know, then if this kernel doesn't work I'll make sure to compile in the right drivers in the next one. You'll probably want to blacklist the gma500_gfx driver as well; it works, but if you're updating the kernel on a system with EMGD then there's no point in using the kernel driver.

I'll probably merge this thread with the other Linux kernel thread - I don't know why I created a second one. Silly me. MERGED!
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

chris
Posts: 20
Joined: Mon Sep 09, 2013 1:01 pm

Re: Linux Kernel Talk

Post by chris » Wed Oct 16, 2013 4:05 pm

I did not fix it :cry: . Installed the kernel and it rebooted fine. Selected external interface and relaunched SqpOS and it flashes back and forth between the squeezeplay and openpeak screens.

My DAC uses a cmedia cm6631 familly chips.

I have ArchLinux ARM running on a pogoplug. Initial install has the 3.1 kernel and I got nothing from the DAC but after updating to 3.10 it works fine.

Sorry, I wish I was more knowledgable to actually be able to properly troubleshoot this myself. :oops:

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernel Talk

Post by roobarb! » Thu Oct 17, 2013 11:15 am

chris wrote:I did not fix it :cry: .
It's probably just that the new driver for your device isn't selected for compilation into the kernel - I'll do some research to see what's expected and run another one.
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernel Talk

Post by roobarb! » Mon Oct 21, 2013 11:17 am

chris wrote:My DAC uses a cmedia cm6631 familly chips.
What was your DAC called again? I'm sure I saw it posted somewhere, but I can't find it now...
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

chris
Posts: 20
Joined: Mon Sep 09, 2013 1:01 pm

Re: Linux Kernels with GMA500 Support

Post by chris » Tue Oct 22, 2013 2:13 am

Schiit Modi.

I use a hifimediy with the joggler right now and the modi with my pogoplug, so this isn't of much importance. I'd just rather use the modi with the joggler and my "good" stereo.

User avatar
asantaga
Posts: 124
Joined: Thu Apr 14, 2011 12:31 am

Re: Linux Kernels with GMA500 Support

Post by asantaga » Tue Oct 22, 2013 2:38 pm

nice
Angelo

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernels with GMA500 Support

Post by roobarb! » Wed Nov 06, 2013 5:17 pm

No magic fix in 3.12, I'm afraid!
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

User avatar
roobarb!
Posts: 1529
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Linux Kernels with GMA500 Support

Post by roobarb! » Wed Dec 04, 2013 5:30 pm

After a lot of messing around, I have found something vaguely useful which allows for audio output on either the internal speakers or the headphone jack output, without having to do any audio patching to the 3.12 kernel.

Currently, the 3.12 kernel will output on the internal speakers only and ignores anything happening on the headphone jack. Now, in /etc/modprobe.d/joggler.conf we already make some little tweaks to the ALSA configuration. The line in question is this:

Code: Select all

# Audio fixup
options snd-hda-intel position_fix=1 bdl_pos_adj=64
If we append to this 'model=ref' and reboot (or sudo alsa force-reload):

Code: Select all

# Audio fixup
options snd-hda-intel position_fix=1 bdl_pos_adj=64 model=ref
All of a sudden, we have audio from the headphone jack and not the internal speakers. Remove 'model=ref', sudo alsa force-reload - we're back to the internal speakers again.

There are a number of such settings available which alter the pin configuration on STAC9202 (and many other) devices, and they are all set in sound/pci/hda/patch_sigmatel.c of the kernel source. In theory, it might be possible to adjust these pin settings so that 0x07 is used for detecting the presence a headphone jack (which, I am led to believe, is the right pin for the Joggler but not for most other devices, which seem to use 0x0a - see here). However, that's not something I have time to fight with right now.

Also, we can peek at everything that the card is set to in /sys/class/sound/hwC0D0. Interestingly, in there are 'driver_pin_configs', 'init_pin_configs' and 'user_pin_configs'. Now if someone could tell me what all this means:

Code: Select all

# cat /sys/class/sound/hwC0D0/init_pin_configs 
0x07 0x01c5e150
0x08 0x01451130
0x0a 0x0221401f
0x0b 0x02a19020
0x0c 0x01813021
0x0d 0x01014010
0x10 0x500701f0
0x11 0x90330122
0x15 0x50a001f1
We might be on the road to somewhere...
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

pkirchhofer
Posts: 2
Joined: Sat Feb 23, 2013 12:14 pm
Location: Karlsruhe, Germany

Re: Linux Kernels with GMA500 Support

Post by pkirchhofer » Thu Dec 05, 2013 2:07 pm

Ah, well, the sound system is a tricky beast ...
It's been a while since I hacked in the linux kernel, mainly to get Android working on the Joggler (the results are btw. available here: Android 4.0 for the O2 Joggler).

If I remember correctly I did the following steps to get the internal speaker / headphones switching to work:
  • Apply HDA: Fix Joggler sound switching patch to a 3.10 kernel
  • Enable CONFIG_SND_HDA_PATCH_LOADER in kernel config
  • Copy the joggler-sound.patch file to /lib/firmware
  • Set the corresponding kernel parameter snd_hda_intel.patch=joggler-sound.patch (or add it to /etc/modprobe.d/joggler.conf)
I hope that works :P

Post Reply