Bug 466038 - no sound on olpc via speakers
Summary: no sound on olpc via speakers
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FedoraOnXO
TreeView+ depends on / blocked
 
Reported: 2008-10-07 20:26 UTC by Jeremy Katz
Modified: 2008-11-07 22:00 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-07 22:00:46 UTC
Type: ---


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.