Bug 466038

Summary: no sound on olpc via speakers
Product: [Fedora] Fedora Reporter: Jeremy Katz <katzj>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bkearney, bressers, jspaar, kernel-maint, malines
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-07 22:00:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 461806    

Description Jeremy Katz 2008-10-07 20:26:50 UTC
We don't get any sound output on the OLPC although the mixer looks like it has appropriate volume knobs and they're all on and unmuted (and I've also tried muted just for kicks)

Comment 1 Bryan Kearney 2008-10-15 17:49:50 UTC
I dont know if this matters, but I see this in the dmesg file.

ALSA sound/pci/cs5535audio/cs5535audio.c:113: Failure reading codec reg 0x7e,Last value=0x7e805368

ALSA sound/pci/cs5535audio/cs5535audio.c:113: Failure reading codec reg 0x7e,Last value=0x7e805368

Comment 2 Jack Spaar 2008-10-15 23:27:57 UTC
(In reply to comment #1)
> I dont know if this matters, but I see this in the dmesg file.
> 
> ALSA sound/pci/cs5535audio/cs5535audio.c:113: Failure reading codec reg
> 0x7e,Last value=0x7e805368
> 
> ALSA sound/pci/cs5535audio/cs5535audio.c:113: Failure reading codec reg
> 0x7e,Last value=0x7e805368

It turns out that these codec error msgs occur with OLPC's own kernel in 767, which has working sound.

Also, I do get sound with F10 snapshot1, but only on the headphones.  I was only able to test without X running due to memory issues.

Repeat by:
1) Boot F10 snapshot1 on XO in run-level 3  (by editing /boot/olpc.fth to include "3" in the kernel args)
2) At console, start pulseaudio: # pulseaudio > /dev/null 2>&1 &
3) aplay /usr/share/sounds/startup3.wav
*hear no sound on speakers*
4) plug in headphones
5) aplay /usr/share/sounds/startup3.wav
*hear sound on headphones*

Comment 3 Jeremy Katz 2008-10-20 19:29:06 UTC
Indeed, headphones do work.  Adjusting the summary accordingly; thanks for the catch!

Comment 4 Josh Bressers 2008-10-24 18:26:08 UTC
You can get sound out of the speakers if you disable the "external amplifier" mixer setting. (It's not displayed by default via the mixer applet, but has to be enabled via the mixer preferences).

Comment 5 Jeremy Katz 2008-10-26 16:49:42 UTC
It looks like we probably just need something like
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535a
index 1d8b160..5982a47 100644
--- a/sound/pci/cs5535audio/cs5535audio.c
+++ b/sound/pci/cs5535audio/cs5535audio.c
@@ -163,6 +163,9 @@ static int __devinit snd_cs5535audio_mixer(struct cs5535audi
        ac97.private_data = cs5535au;
        ac97.pci = cs5535au->pci;
 
+       if (machine_is_olpc())
+               ac97->scaps |= AC97_SCAP_INV_EAPD;
+
        if ((err = snd_ac97_mixer(pbus, &ac97, &cs5535au->ac97)) < 0) {
                snd_printk(KERN_ERR "mixer failed\n");
                return err;


I'll try to get an image built with a test kernel over the next couple of days

Comment 6 Jeremy Katz 2008-10-28 02:12:31 UTC
Applied the above with its compile fixes for the next build