Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bugs on aspire one A150

9 views
Skip to first unread message

Maxim Levitsky

unread,
Nov 7, 2008, 10:30:08 PM11/7/08
to
I have just bought an Aspire one A150, XP version,
as it was the only available here, and installed ubuntu on it.

Bugs I discovered so far:


** 1 - embedded controler works in polling mode, due to this:

[ 0.708571] ACPI: EC: non-query interrupt received, switching to interrupt mode
[ 1.224043] ACPI: EC: missing confirmations, switch off interrupt mode.


Maybe this is the reason for the fact that gnome power manager freezes when I unplug
the AC, and freezes often when I try to see battery status.


(Note: same is seen on my acer aspire 5720)


** 2 - wireless: not to mention the fact that ath5k wasn't installed by default in ubuntu...
wireless more or less works, but kernel log is full of backtraces.
Was able to connect to my WPA2 access point.
Sometimes wireless fails completely, especially after suspend to ram.
Advanced features like monitor/injection work, but when I changed the card's
mac address it stopped working.
I also noticed that if I then start airodump, then wireless works with new mac.

** 3 - internal mic doesn't work.
tried model=acer, model=auto.
Overall it seems that alsa misprograms O/B realteck
codec.
I talk about this later.
Have same issue on my acer 5720

** 4 - wireless led doesn't work.
ath5k devs, can you fix this?


** 5 - coretemp doesn't show cpu temperature,
I have seen somewhere that atom support same thermal diode as core2
and only patch to detect it is needed.
Please include such path in 2.6.28 if exists.


** 6 - both card readers are missing from lspci, is this normal?

** 7 - opengl is broken, I tried running neverball in fullscreen, but it shows wrong/corrupted
textures (compiz is running, and working well thought)

Now I installed 2.6.28-rc3 (actually latest -git)


Sadly nothing improved.
I only found few regressions:

* Wireless now drops connection from my WPA2 access point after few minutes.
I changed temporarily its wireless protection to WEP and open mode, and both work
fine, maybe this is related to periodic key exchange WPA does?

* System doesn't reboot/shutdown, just hangs.

Best regards,
Maxim Levitsky.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Alan Jenkins

unread,
Nov 8, 2008, 7:00:10 AM11/8/08
to
Maxim Levitsky wrote:
> I have just bought an Aspire one A150, XP version,
> as it was the only available here, and installed ubuntu on it.
>
> Bugs I discovered so far:
>
>
> ** 1 - embedded controler works in polling mode, due to this:
>
> [ 0.708571] ACPI: EC: non-query interrupt received, switching to interrupt mode
> [ 1.224043] ACPI: EC: missing confirmations, switch off interrupt mode.
>
>
> Maybe this is the reason for the fact that gnome power manager freezes when I unplug
> the AC, and freezes often when I try to see battery status.
>
>
> (Note: same is seen on my acer aspire 5720)

That sounds like a known issue. It has been resolved by "ACPI: EC: revert msleep patch". Happily Len submitted it for mainline this week. You will also find it if you try the acpi-test git tree. We're all hoping 2.6.28 will be much improved in terms of reliable operation of different ECs :).

> ** 2 - wireless: not to mention the fact that ath5k wasn't installed by default in ubuntu...
> wireless more or less works, but kernel log is full of backtraces.

Well, that doesn't tell us much. Did they still happen after upgrading to 2.6.28-rc3? Can we see them?

> Was able to connect to my WPA2 access point.
> Sometimes wireless fails completely, especially after suspend to ram.
> Advanced features like monitor/injection work, but when I changed the card's
> mac address it stopped working.
> I also noticed that if I then start airodump, then wireless works with new mac.
>
>
>
> ** 3 - internal mic doesn't work.
> tried model=acer, model=auto.
> Overall it seems that alsa misprograms O/B realteck
> codec.
> I talk about this later.
> Have same issue on my acer 5720
>
>
>
> ** 4 - wireless led doesn't work.
> ath5k devs, can you fix this?
>
>
> ** 5 - coretemp doesn't show cpu temperature,
> I have seen somewhere that atom support same thermal diode as core2
> and only patch to detect it is needed.
> Please include such path in 2.6.28 if exists.
>
>
> ** 6 - both card readers are missing from lspci, is this normal?

A similar bug has been reported as a regression:

<http://bugzilla.kernel.org/show_bug.cgi?id=11828>

so one assumes that it worked on the machines with linux pre-installed. Hopefully without requiring any hacks.

It seems that for now a workaround may be to pass the option debug_quirks=1 to the sdhci module...

<http://marc.info/?l=linux-kernel&m=122509648027303&w=2>

...or that it may help if you insert an SD card before booting.

Apparently the reporter also investigated pcie hotplug. Probably the BIOS doesn't provide the normal support. You can try "modprobe pciehp pciehp_force=1", maybe it helps the kernel discover the devices. It worked for something else on my EeePC. But then it will reportedly disappear the ethernet controller.

However, at the moment pciehp can cause delays of 10s of seconds during resume.



> ** 7 - opengl is broken, I tried running neverball in fullscreen, but it shows wrong/corrupted
> textures (compiz is running, and working well thought)
>
> Now I installed 2.6.28-rc3 (actually latest -git)
>
>
> Sadly nothing improved.
> I only found few regressions:
>
>
>
> * Wireless now drops connection from my WPA2 access point after few minutes.
> I changed temporarily its wireless protection to WEP and open mode, and both work
> fine, maybe this is related to periodic key exchange WPA does?
>
> * System doesn't reboot/shutdown, just hangs.

Could be this:

<http://bugzilla.kernel.org/show_bug.cgi?id=11942>

As a fix, 8fd145917fb62368a9b80db59562c20576238f5a was reverted from the acpi tree. This has also been submitted to mainline.

Thanks for your work! If you continue with this, I suggest CC'ing <kernel-...@vger.kernel.org>. That will help Rafael the regression hunter pick it up.

Alan

Maxim Levitsky

unread,
Nov 8, 2008, 8:00:15 PM11/8/08
to
Alan Jenkins wrote:
> Maxim Levitsky wrote:
>> I have just bought an Aspire one A150, XP version,
>> as it was the only available here, and installed ubuntu on it.
>>
>> Bugs I discovered so far:
>>
>>
>> ** 1 - embedded controler works in polling mode, due to this:
>>
>> [ 0.708571] ACPI: EC: non-query interrupt received, switching to interrupt mode
>> [ 1.224043] ACPI: EC: missing confirmations, switch off interrupt mode.
>>
>>
>> Maybe this is the reason for the fact that gnome power manager freezes when I unplug
>> the AC, and freezes often when I try to see battery status.
>>
>>
>> (Note: same is seen on my acer aspire 5720)
>
> That sounds like a known issue. It has been resolved by "ACPI: EC: revert msleep patch". Happily Len submitted it for mainline this week. You will also find it if you try the acpi-test git tree. We're all hoping 2.6.28 will be much improved in terms of reliable operation of different ECs :).
>
Yes, this almost fixes all issues with that.
Almost because, it looks like the EC changes screen brightness on his own when battery is plugged/unplugged,
but so does the gnome-power-manager, and thus it still hangs as before on battery removal (but doesn't hang otherwise)
I disabled that behaver in gnome-power-manager and now no more hangs.

I see that this fix fixes the polled mode. Any chance to make irq mode work?

>> ** 2 - wireless: not to mention the fact that ath5k wasn't installed by default in ubuntu...
>> wireless more or less works, but kernel log is full of backtraces.
>
> Well, that doesn't tell us much. Did they still happen after upgrading to 2.6.28-rc3? Can we see them?

Fixed completely, looking through the git log I have seen a commit that fixes exactly same backtrace I had.
No more errors in kernel log.


>
>> Was able to connect to my WPA2 access point.
>> Sometimes wireless fails completely, especially after suspend to ram.
>> Advanced features like monitor/injection work, but when I changed the card's
>> mac address it stopped working.
>> I also noticed that if I then start airodump, then wireless works with new mac.

This still not fixed, I ask about this again in separate mail.


>>
>>
>>
>> ** 3 - internal mic doesn't work.
>> tried model=acer, model=auto.
>> Overall it seems that alsa misprograms O/B realteck
>> codec.
>> I talk about this later.

Surprisingly, this is almost fixed.
I can record from both internal mic and external mic
(Quality is not so good, but is the same as in windows)

Almost, is that to increase capture level, I have to set "one" channel of it.
Eg: if I set 100% left and 100% right then capture level is very low.
But when I set 100% left and 0% right or vice versa it works fine.

Also the "mic boost" doesn't change capture volume for internal mic.
also the "mic boost" if set to high value works like analog loopback
(I hear what I say in mic in headphones, same happens on my main notebook acer 5720)


>> Have same issue on my acer 5720
>>
>>
>>
>> ** 4 - wireless led doesn't work.
>> ath5k devs, can you fix this?
>>
>>
>> ** 5 - coretemp doesn't show cpu temperature,
>> I have seen somewhere that atom support same thermal diode as core2
>> and only patch to detect it is needed.
>> Please include such path in 2.6.28 if exists.
>>
>>
>> ** 6 - both card readers are missing from lspci, is this normal?
>
> A similar bug has been reported as a regression:
>
> <http://bugzilla.kernel.org/show_bug.cgi?id=11828>
>
> so one assumes that it worked on the machines with linux pre-installed. Hopefully without requiring any hacks.
>
> It seems that for now a workaround may be to pass the option debug_quirks=1 to the sdhci module...
>
> <http://marc.info/?l=linux-kernel&m=122509648027303&w=2>
>
> ...or that it may help if you insert an SD card before booting.
>
> Apparently the reporter also investigated pcie hotplug. Probably the BIOS doesn't provide the normal support. You can try "modprobe pciehp pciehp_force=1", maybe it helps the kernel discover the devices. It worked for something else on my EeePC. But then it will reportedly disappear the ethernet controller.
>
> However, at the moment pciehp can cause delays of 10s of seconds during resume.

I am aware of this, but don't yet have a SD card to test.


>
>> ** 7 - opengl is broken, I tried running neverball in fullscreen, but it shows wrong/corrupted
>> textures (compiz is running, and working well thought)

Without compiz neveball works fine (slow, but this is very slow hardware)

>>
>> Now I installed 2.6.28-rc3 (actually latest -git)
>>
>>
>> Sadly nothing improved.
>> I only found few regressions:
>>
>>
>>
>> * Wireless now drops connection from my WPA2 access point after few minutes.
>> I changed temporarily its wireless protection to WEP and open mode, and both work
>> fine, maybe this is related to periodic key exchange WPA does?

Now fixed, big thanks.

>>
>> * System doesn't reboot/shutdown, just hangs.
>
> Could be this:
>
> <http://bugzilla.kernel.org/show_bug.cgi?id=11942>
>
> As a fix, 8fd145917fb62368a9b80db59562c20576238f5a was reverted from the acpi tree. This has also been submitted to mainline.

Also fixed big thanks.


Also noticed another bug:


If I suspend/resume with compiz running, on resume I see wallpaper and mouse cursor, everything hangs for
minute or two, and sometimes forever.

2.6.27 worked fine.


Also hibernate doesn't work on my main notebook, but it is probably fixed, I update kernel to really latest -git
and tell you.


Big thanks for bugfixes, you saved me a lot of work and bisecting.

Biggest solvable problem now is sound support now I think, datasheets are there, and
I take a look at them.


Best regards,
Maxim Levitsky

Takashi Iwai

unread,
Nov 9, 2008, 4:00:16 AM11/9/08
to
[Only about sound stuff, stripped irrelevant addresses from cc]

At Sun, 09 Nov 2008 02:52:05 +0200,


Maxim Levitsky wrote:
>
> >> ** 3 - internal mic doesn't work.
> >> tried model=acer, model=auto.
> >> Overall it seems that alsa misprograms O/B realteck
> >> codec.
> >> I talk about this later.
> Surprisingly, this is almost fixed.
> I can record from both internal mic and external mic
> (Quality is not so good, but is the same as in windows)
>
> Almost, is that to increase capture level, I have to set "one" channel of it.
> Eg: if I set 100% left and 100% right then capture level is very low.
> But when I set 100% left and 0% right or vice versa it works fine.
>
> Also the "mic boost" doesn't change capture volume for internal mic.
> also the "mic boost" if set to high value works like analog loopback
> (I hear what I say in mic in headphones, same happens on my main notebook acer 5720)

Interesting. Is it with or without model option? There is a model
option specific for aspire one (acer-aspire). Doesn't it work better?

For comparing the hardware setting, please you run alsa-info.sh with
--no-upload option, and attach the generated file at each state. This
shows the real codec register values.

Also, please run the same procedure for acer 5720, too.


thanks,

Takashi

Alan Jenkins

unread,
Nov 9, 2008, 5:50:07 AM11/9/08
to

Please do report it as an ACPI EC bug. It's popular hardware, and if
nothing else it is important that upstream be aware of the workarounds
people are having to use.

> I see that this fix fixes the polled mode. Any chance to make irq mode
> work?
>

Probably not. It doesn't seem important, it may not be possible, and
even if you could fix the EC driver for your hardware, there's the risk
of breaking other peoples hardware.

The presumption is that you have weird hardware and it genuinely needs a
polling workaround. It's not too bad, now it uses udelay() it should
not impose any wakeups or significant latency, just some extra cpu time
in a busy loop. EC events such as acpi hotkeys are still received as
interrupts (although we then have to query the type of event using a
polled transaction).


I assume you get something like (text not exact):

"EC: started in polling mode"
...


"EC: non-query interrupt received, switching to interrupt mode"

...
"EC: missing confirmations, switching to polling mode"

all during boot.


There's one outstanding issue on a different machine, where the
occasional EC read fails and triggers polling mode sometime _after_
boot. It can be fixed by retrying the transaction

http://bugzilla.kernel.org/show_bug.cgi?id=11896

but I don't really expect your machine has the same problem.

<snip non-acpi problems>

>
> Also noticed another bug:
>
>
> If I suspend/resume with compiz running, on resume I see wallpaper and
> mouse cursor, everything hangs for minute or two, and sometimes forever.
>
> 2.6.27 worked fine.

Weird.

Did you try sysrq-W during the hang? That's supposed to dump a list of
blocked tasks to dmesg.

>
> Also hibernate doesn't work on my main notebook, but it is probably
> fixed, I update kernel to really latest -git
> and tell you.
>

But suspend to ram works? Usually it is the other way round :). If you
haven't already, you might read

Documentation/power/basic-pm-debugging.txt

it suggests some tests to narrow down the problem.

>
> Big thanks for bugfixes, you saved me a lot of work and bisecting.
>

I can't take credit for actual fixes. But I'm very happy to help people
avoid bisecting for known problems. I hope you have time to crack the
unknown ones :).

Alan

Andreas Mohr

unread,
Nov 9, 2008, 8:40:11 AM11/9/08
to
Hi,

[Takashi]:


> Interesting. Is it with or without model option? There is a model
> option specific for aspire one (acer-aspire). Doesn't it work better?

I had already tried 2.6.28-rc3 on A110L (also plus hand-patched digital-mic patch of
patch_realtek.c) and it still didn't work for me.
I didn't use the acer one model parameter, though.

Well, now I just did use it, and it didn't work either AFAICT, with lots
of mixer fumbling again.

And I'm not sure whether the model name should be "acer-aspire" instead
of "acer-aspireone" since Aspire is the name of an entire series
which might possibly have incompatible requirements.
Also, I'm not really happy with the fact that snd_hda_intel doesn't even
log the model name chosen/selected on module initialisation.

Frankly I've had so much snd_hda_intel codec-specific trouble on pretty much all of the
few notebooks/machines that I touched in the last year (that's not an
understatement!) that I think it would be a very nice idea to write a _very_ visible
HOWTO (search words: intel-hda alsa HOWTO codec etc.) detailling how to improve
codec-specific support for snd_hda_intel (this should best be done by explaining
how one arrived at a particular patch for a certain codec, e.g. take the
recent ALC268 work, i.e. check /proc/asound/Intel/codec#0 and look at which part
is not supported by the snd_hda_intel patch file yet and then explain how to add stuff
to it, in very verbose and generic words to let layman people know how to do
this).

As already said, I've (and certainly not only me!) been bitten
again and again and AGAIN by incomplete codec support in snd_hda_intel, thus
we need to make damn sure people can help themselves as well as remotely
possible, to ensure sufficiently fast and sufficiently complete support
for new HDA codecs (which seem to appear each new month or week even,
unfortunately!).
If people don't even know how to tackle this easily, then patch submissions for new
codecs aren't too likely...

And the A110L has been on the shelves for 4 or 5 months already (with 5 to 6
million units sold, they say!!), a time where full support would have been in order.
But it's certainly a major fault of Acer to not have provided full ALSA
support for this (note that I'm not sure about Mic support in its
pre-installed Linpus installation), the ALSA people certainly don't have
any responsibility for this.

Thanks,

Andreas Mohr

Andreas Mohr

unread,
Nov 9, 2008, 10:20:06 AM11/9/08
to
Hi,

[Takashi]:


> Interesting. Is it with or without model option? There is a model
> option specific for aspire one (acer-aspire). Doesn't it work better?

OK, _THIS_ time I actually did get the correct model (last time I tried
modprobe with model=acer-aspire, but apparently it then used the
/etc/modprobe.d/ model=toshiba setting, since this time gamix showed
entirely different controls with i-Mic etc.) - all the more reason to
log the model name chosen/selected by the driver!!
--> I have to admit that usability sucks^Hcould be a lot better.
It's perfectly fine for ALSA to not have support for newish codecs or newish
machines with weird setups, but basic usability and or documentation
should thus be as good as can be to make sure that weaknesses can get detected
and fixed in no time, even by "interested parties".

i-Mic on Ekiga with lotsa mixer fiddling didn't work either this time.

> For comparing the hardware setting, please you run alsa-info.sh with
> --no-upload option, and attach the generated file at each state. This
> shows the real codec register values.

OK, here it is (-rc3 with model=acer-aspire):


name=root&type=33&description=/tmp/alsa-info.txt&expiry=&s=Submit+Post&content=
!!################################
!!ALSA Information Script v 0.4.48
!!################################

!!Script ran on: Sun Nov 9 16:00:38 CET 2008


!!Linux Distribution
!!------------------

Ubuntu 8.10 \n \l DISTRIB_ID=Ubuntu DISTRIB_DESCRIPTION="Ubuntu 8.10"


!!Kernel Information
!!------------------

Kernel release: 2.6.28-rc3
Operating System: GNU/Linux
Architecture: i686
Processor: unknown
SMP Enabled: Yes


!!ALSA Version
!!------------

Driver version: 1.0.18rc3
Library version:
Utilities version: 1.0.17


!!Loaded ALSA modules
!!-------------------

snd_hda_intel


!!Soundcards recognised by ALSA
!!-----------------------------

0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0x38540000 irq 16


!!PCI Soundcards installed in the system
!!--------------------------------------

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)


!!Advanced information - PCI Vendor/Device/Susbsystem ID's
!!--------------------------------------------------------

00:1b.0 0403: 8086:27d8 (rev 02)
Subsystem: 1025:015b


!!Modprobe options (Sound related)
!!--------------------------------

snd-hda-intel: model=acer-aspire
snd-atiixp-modem: index=-2
snd-intel8x0m: index=-2
snd-via82xx-modem: index=-2
snd-usb-audio: index=-2
snd-usb-usx2y: index=-2
snd-usb-caiaq: index=-2
snd-cmipci: mpu_port=0x330 fm_port=0x388
snd-pcsp: index=-2


!!Loaded sound module options
!!--------------------------

!!Module: snd_hda_intel
bdl_pos_adj : 1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
enable_msi : 0
id : <NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
model : acer-aspire,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>,<NULL>
position_fix : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
power_save : 10
power_save_controller : Y
probe_mask : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
single_cmd : N


!!HDA-Intel Codec information
!!---------------------------
--startcollapse--

Codec: Realtek ALC268
Address: 0
Vendor Id: 0x10ec0268
Subsystem Id: 0x1025015b
Revision Id: 0x100101
No Modem Function Group found
Default PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=4, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0
Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x3a 0x3a]
Converter: stream=0, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x03 [Audio Output] wcaps 0x1d: Stereo Amp-Out
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x3a 0x3a]
Converter: stream=0, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x04 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x05 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
PCM:
rates [0x5e0]: 44100 48000 88200 96000 192000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
Node 0x07 [Audio Input] wcaps 0x100111: Stereo
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Connection: 1
0x24
Node 0x08 [Audio Input] wcaps 0x100111: Stereo
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Connection: 1
0x23
Node 0x09 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0a [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0b [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0c [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0d [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x0e [Audio Mixer] wcaps 0x20010a: Mono Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00]
Connection: 1
0x02
Node 0x0f [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00]
Connection: 2
0x02 0x1d
Node 0x10 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80] [0x80 0x80]
Connection: 3
0x03 0x1d 0x02
Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x12 [Pin Complex] wcaps 0x400001: Stereo
Pincap 0x00000020: IN
Pin Default 0x99a30920: [Fixed] Mic at Int ATAPI
Conn = ATAPI, Color = Unknown
DefAssociation = 0x2, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Node 0x13 [Pin Complex] wcaps 0x400001: Stereo
Pincap 0x00000020: IN
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0001003c: IN OUT HP EAPD Detect
EAPD 0x2: EAPD
Pin Default 0x99130110: [Fixed] Speaker at Int ATAPI
Conn = ATAPI, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Connection: 1
0x0f
Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0001003c: IN OUT HP EAPD Detect
EAPD 0x2: EAPD
Pin Default 0x0321401f: [Jack] HP Out at Ext Left
Conn = 1/8, Color = Green
DefAssociation = 0x1, Sequence = 0xf
Pin-ctls: 0xc0: OUT HP
Unsolicited: tag=04, enabled=1
Connection: 1
0x10
Node 0x16 [Pin Complex] wcaps 0x40010c: Mono Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80]
Pincap 0x00000010: OUT
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Connection: 1
0x0e
Node 0x17 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x02, stepsize=0x4f, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x00003734: IN OUT Detect
Vref caps: HIZ 50 GRD 80 100
Pin Default 0x03a19830: [Jack] Mic at Ext Left
Conn = 1/8, Color = Pink
DefAssociation = 0x3, Sequence = 0x0
Pin-ctls: 0x24: IN VREF_80
Unsolicited: tag=08, enabled=1
Connection: 1
0x02
Node 0x19 [Pin Complex] wcaps 0x40008b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x02, stepsize=0x4f, mute=0
Amp-In vals: [0x00 0x00]
Pincap 0x00003724: IN Detect
Vref caps: HIZ 50 GRD 80 100
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x24: IN VREF_80
Unsolicited: tag=00, enabled=0
Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x02, stepsize=0x4f, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x00003734: IN OUT Detect
Vref caps: HIZ 50 GRD 80 100
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x02
Node 0x1b [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x1c [Pin Complex] wcaps 0x400001: Stereo
Pincap 0x00000020: IN
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Node 0x1d [Pin Complex] wcaps 0x400000: Mono
Pincap 0x00000020: IN
Pin Default 0x4015812d: [N/A] Speaker at Ext N/A
Conn = Optical, Color = Purple
DefAssociation = 0x2, Sequence = 0xd
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Node 0x1e [Pin Complex] wcaps 0x400380: Mono Digital
Pincap 0x00000010: OUT
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Connection: 1
0x06
Node 0x1f [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
Processing caps: benign=0, ncoeff=10
Node 0x21 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x22 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x23 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
Amp-Out caps: ofs=0x0a, nsteps=0x1f, stepsize=0x05, mute=1
Amp-Out vals: [0x1f 0x1f]
Connection: 7
0x18 0x19 0x1a 0x1c 0x14 0x15 0x12*
Node 0x24 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
Amp-Out caps: ofs=0x0a, nsteps=0x1f, stepsize=0x05, mute=1
Amp-Out vals: [0x00 0x00]
Connection: 7
0x18* 0x19 0x1a 0x1c 0x14 0x15 0x13
--endcollapse--


!!ALSA Device nodes
!!-----------------

crw-rw----+ 1 root audio 116, 6 2008-11-09 15:59 /dev/snd/controlC0
crw-rw----+ 1 root audio 116, 5 2008-11-09 15:59 /dev/snd/pcmC0D0c
crw-rw----+ 1 root audio 116, 4 2008-11-09 15:59 /dev/snd/pcmC0D0p
crw-rw----+ 1 root audio 116, 3 2008-11-09 15:58 /dev/snd/seq
crw-rw----+ 1 root audio 116, 2 2008-11-09 15:58 /dev/snd/timer


!!Aplay/Arecord output
!!------------

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC268 Analog [ALC268 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0

ARECORD

**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC268 Analog [ALC268 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0

!!Amixer output
!!-------------

!!-------Mixer controls for card 0 [Intel]

Simple mixer control 'Master',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 58 [91%] [-6.00dB] [on]
Front Right: Playback 58 [91%] [-6.00dB] [on]
Simple mixer control 'PCM',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 255 [100%] [0.00dB]
Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic Boost',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 2
Front Left: Capture 0 [0%] [0.00dB]
Front Right: Capture 0 [0%] [0.00dB]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 31
Front Left: Capture 31 [100%] [31.50dB] [on]
Front Right: Capture 31 [100%] [31.50dB] [on]
Simple mixer control 'Digital',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 120
Front Left: Capture 120 [100%] [30.00dB]
Front Right: Capture 120 [100%] [30.00dB]
Simple mixer control 'Input Source',0
Capabilities: cenum
Items: 'i-Mic' 'E-Mic'
Item0: 'i-Mic'


!!Alsactl output
!!-------------

--startcollapse--
state.Intel {
control.1 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 64'
comment.dbmin -6400
comment.dbmax 0
iface MIXER
name 'Master Playback Volume'
value.0 58
value.1 58
}
control.2 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'Master Playback Switch'
value.0 true
value.1 true
}
control.3 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 2'
comment.dbmin 0
comment.dbmax 4000
iface MIXER
name 'Mic Boost Capture Volume'
value.0 0
value.1 0
}
control.4 {
comment.access 'read write'
comment.type INTEGER
comment.count 2
comment.range '0 - 31'
comment.dbmin -1500
comment.dbmax 3150
iface MIXER
name 'Capture Volume'
value.0 31
value.1 31
}
control.5 {
comment.access 'read write'
comment.type BOOLEAN
comment.count 2
iface MIXER
name 'Capture Switch'
value.0 true
value.1 true
}
control.6 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
comment.item.0 i-Mic
comment.item.1 E-Mic
iface MIXER
name 'Input Source'
value i-Mic
}
control.7 {
comment.access 'read write user'
comment.type INTEGER
comment.count 2
comment.range '0 - 255'
comment.tlv '0000000100000008ffffec1400000014'
comment.dbmin -5100
comment.dbmax 0
iface MIXER
name 'PCM Playback Volume'
value.0 255
value.1 255
}
control.8 {
comment.access 'read write user'
comment.type INTEGER
comment.count 2
comment.range '0 - 120'
comment.tlv '0000000100000008fffff44800000032'
comment.dbmin -3000
comment.dbmax 3000
iface MIXER
name 'Digital Capture Volume'
value.0 120
value.1 120
}
}
--endcollapse--


!!All Loaded Modules
!!------------------

Module
af_packet
i915
drm
binfmt_misc
sco
bridge
stp
llc
rfcomm
bnep
l2cap
bluetooth
ppdev
acpi_cpufreq
cpufreq_stats
pci_slot
cpufreq_ondemand
freq_table
container
cpufreq_userspace
cpufreq_conservative
sbs
sbshc
cpufreq_powersave
microcode
iptable_filter
ip_tables
x_tables
parport_pc
lp
parport
loop
joydev
ipv6
mmc_block
snd_hda_intel
snd_pcm_oss
snd_mixer_oss
acer_wmi
rfkill
snd_pcm
evdev
uvcvideo
compat_ioctl32
videodev
v4l1_compat
snd_seq_dummy
psmouse
serio_raw
arc4
ecb
video
output
sdhci_pci
sdhci
wmi
snd_seq_oss
snd_seq_midi
snd_rawmidi
ath5k
snd_seq_midi_event
mac80211
mmc_core
led_class
cfg80211
snd_seq
battery
ac
button
snd_timer
snd_seq_device
pcspkr
snd
iTCO_wdt
iTCO_vendor_support
soundcore
snd_page_alloc
intel_agp
agpgart
shpchp
pci_hotplug
ext3
jbd
mbcache
sd_mod
crc_t10dif
sg
pata_acpi
ata_generic
ata_piix
libata
ehci_hcd
uhci_hcd
scsi_mod
usbcore
r8169
mii
thermal
processor
fan
fuse

Thanks,

Andreas Mohr

Takashi Iwai

unread,
Nov 9, 2008, 2:00:19 PM11/9/08
to
At Sun, 9 Nov 2008 16:13:23 +0100,

Andreas Mohr wrote:
>
> Hi,
>
> [Takashi]:
> > Interesting. Is it with or without model option? There is a model
> > option specific for aspire one (acer-aspire). Doesn't it work better?
>
> OK, _THIS_ time I actually did get the correct model (last time I tried
> modprobe with model=acer-aspire, but apparently it then used the
> /etc/modprobe.d/ model=toshiba setting, since this time gamix showed
> entirely different controls with i-Mic etc.) - all the more reason to
> log the model name chosen/selected by the driver!!

Build with the debug option (why turned off even if you *are*
debugging?). Then the driver will show you details.

> --> I have to admit that usability sucks^Hcould be a lot better.

One would call it rather debuggability than usability.
These are completely different things.

> It's perfectly fine for ALSA to not have support for newish codecs or newish
> machines with weird setups, but basic usability and or documentation
> should thus be as good as can be to make sure that weaknesses can get detected
> and fixed in no time, even by "interested parties".
>
> i-Mic on Ekiga with lotsa mixer fiddling didn't work either this time.

OK, then something is missing. But you should test by arecord first
than any complicated applications as a primary test.

Anyway, the acer-aspire support code was written by Realtek guys, so
it'd be best to ask them...


thanks,

Takashi

Andreas Mohr

unread,
Nov 9, 2008, 3:20:14 PM11/9/08
to
On Sun, Nov 09, 2008 at 07:58:17PM +0100, Takashi Iwai wrote:
> At Sun, 9 Nov 2008 16:13:23 +0100,
> Andreas Mohr wrote:
> > OK, _THIS_ time I actually did get the correct model (last time I tried
> > modprobe with model=acer-aspire, but apparently it then used the
> > /etc/modprobe.d/ model=toshiba setting, since this time gamix showed
> > entirely different controls with i-Mic etc.) - all the more reason to
> > log the model name chosen/selected by the driver!!
>
> Build with the debug option (why turned off even if you *are*
> debugging?). Then the driver will show you details.

Hmm, right, that would have been an (very useful) option, but not for the
majority of users OTOH.
Especially since this is a user-visible module parameter which should thus
be confirmed in mainstream user code, via logging.
Admittedly not many modules log their settings during startup,
but for snd_hda_intel with its two myriads of codec/machine variants
and a resulting quarter myriad of issues that would be very useful.

> > --> I have to admit that usability sucks^Hcould be a lot better.
>
> One would call it rather debuggability than usability.
> These are completely different things.

See above ;)

> > i-Mic on Ekiga with lotsa mixer fiddling didn't work either this time.
>
> OK, then something is missing. But you should test by arecord first
> than any complicated applications as a primary test.

Good point, will do.

Oh, and is there a way to manually alter codec registers?

> Anyway, the acer-aspire support code was written by Realtek guys, so
> it'd be best to ask them...

Indeed, and far too late (they have submitted it in September I think)
for guaranteeing non-problematic hardware behaviour...
(I'd guesstimate the Realtek submission to be based on Acer activity)
Anyway, still very nice to see that companies do submit patches after all.

Thanks,

Andreas

Bob Copeland

unread,
Nov 10, 2008, 12:00:17 PM11/10/08
to
On Fri, Nov 7, 2008 at 10:26 PM, Maxim Levitsky <maximl...@gmail.com> wrote:
> ** 2 - wireless: not to mention the fact that ath5k wasn't installed by
> default in ubuntu...
> wireless more or less works, but kernel log is full of backtraces.

As you've seen, these should at least be gone now...

> Was able to connect to my WPA2 access point.
> Sometimes wireless fails completely, especially after suspend to ram.

Did you get noise calibration failures in dmesg at this point? Felix posted
a patch recently that handles them better.

> Advanced features like monitor/injection work, but when I changed the card's
> mac address it stopped working.
> I also noticed that if I then start airodump, then wireless works with new
> mac.

> ** 4 - wireless led doesn't work.


> ath5k devs, can you fix this?

Currently all the LED code we have in there is for setting a particular gpio
for particular laptops (and they differ between models). We only have quirks
for IBM and HP, none for Acer. Also, the legacy-hal seems to have a different
strategy for 2425 chips. I can try to hack up some code for you to test.

--
Bob Copeland %% www.bobcopeland.com

Maxim Levitsky

unread,
Nov 10, 2008, 4:40:10 PM11/10/08
to
Bob Copeland wrote:
> On Fri, Nov 7, 2008 at 10:26 PM, Maxim Levitsky <maximl...@gmail.com> wrote:
>> ** 2 - wireless: not to mention the fact that ath5k wasn't installed by
>> default in ubuntu...
>> wireless more or less works, but kernel log is full of backtraces.
>
> As you've seen, these should at least be gone now...
>
>> Was able to connect to my WPA2 access point.
>> Sometimes wireless fails completely, especially after suspend to ram.
>
> Did you get noise calibration failures in dmesg at this point? Felix posted
> a patch recently that handles them better.
Yep, but they seems to be gone in latest -git too.
Wireless work fine now, it seems like my iwl3945.

>
>> Advanced features like monitor/injection work, but when I changed the card's
>> mac address it stopped working.
>> I also noticed that if I then start airodump, then wireless works with new
>> mac.

Why it doesn't accept new mac?, can this be fixed?


>
>> ** 4 - wireless led doesn't work.
>> ath5k devs, can you fix this?
>
> Currently all the LED code we have in there is for setting a particular gpio
> for particular laptops (and they differ between models). We only have quirks
> for IBM and HP, none for Acer. Also, the legacy-hal seems to have a different
> strategy for 2425 chips. I can try to hack up some code for you to test.
>

I have seen on the web that madwifi did support the led with some gpio settings

sysctl -w dev.wifi0.ledpin=3
sysctl -w dev.wifi0.softled=1

from https://help.ubuntu.com/community/AspireOne

Best regards,
Maxim Levitsky

Nick Kossifidis

unread,
Nov 10, 2008, 5:20:10 PM11/10/08
to
2008/11/10 Maxim Levitsky <maximl...@gmail.com>:

i think that some led settings are stored on EEPROM, let me check it out...


--
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

Takashi Iwai

unread,
Nov 12, 2008, 6:10:07 AM11/12/08
to
At Sun, 9 Nov 2008 21:09:29 +0100,

Andreas Mohr wrote:
>
> On Sun, Nov 09, 2008 at 07:58:17PM +0100, Takashi Iwai wrote:
> > At Sun, 9 Nov 2008 16:13:23 +0100,
> > Andreas Mohr wrote:
> > > OK, _THIS_ time I actually did get the correct model (last time I tried
> > > modprobe with model=acer-aspire, but apparently it then used the
> > > /etc/modprobe.d/ model=toshiba setting, since this time gamix showed
> > > entirely different controls with i-Mic etc.) - all the more reason to
> > > log the model name chosen/selected by the driver!!
> >
> > Build with the debug option (why turned off even if you *are*
> > debugging?). Then the driver will show you details.
>
> Hmm, right, that would have been an (very useful) option, but not for the
> majority of users OTOH.

I thought many ditros set this option...

> Especially since this is a user-visible module parameter which should thus
> be confirmed in mainstream user code, via logging.

You can check via /sys/modules/snd_hda_intel/parameters/model whether
you passed correctly or not, at least :)

> Admittedly not many modules log their settings during startup,
> but for snd_hda_intel with its two myriads of codec/machine variants
> and a resulting quarter myriad of issues that would be very useful.

Passing the model option is already a kind of debugging work, IMO.
You shouldn't do it unless you need it, indeed.

> > > --> I have to admit that usability sucks^Hcould be a lot better.
> >
> > One would call it rather debuggability than usability.
> > These are completely different things.
>
> See above ;)
>
> > > i-Mic on Ekiga with lotsa mixer fiddling didn't work either this time.
> >
> > OK, then something is missing. But you should test by arecord first
> > than any complicated applications as a primary test.
>
> Good point, will do.
>
> Oh, and is there a way to manually alter codec registers?

Try hda-verb program. Build your kernel with CONFIG_SND_HDA_HWDEP=y
and access via the hwdep device.
ftp://ftp.suse.com/pub/people/tiwai/misc/hda-verb-0.2.tar.bz2


Takashi

Maxim Levitsky

unread,
Nov 12, 2008, 12:10:07 PM11/12/08
to


Hi,

I pretty much studied the datasheet and driver, and this is what I found:
btw, my acer 5720 and aspire one share same ALC268.
Some stuff is trivially fixable, some seems to be unfixable at all:

model=acer is used on my regular laptop.
model-acer-aspire is used on aspire one laptop, and it needs to be renamed, as both are aspire.


1) internal beep volume/mute isn't preserved on resume on acer (I call the big laptop this way).
2) aspire one, has same beep routing, but it isn't supported by this model, it should be added I think.

3) on acer internal mic is mapped wrongly, it assumes that it is a digital mic, while in fact this is
analog mic, and pin configs are set correctly, but they are ignored. fix is trivial, but might break other laptops.
Maybe add this as a new input, like analog mic, at least it can be added for aspire 5720.


4) There is really no internal mic boost on aspire, it is digital, not a bug.

5) Codec supports two ADCs, and so does the driver, but for some models second ADC is ignored.
alc268_capture_alt_mixer is used instead of alc268_capture_mixer.

Here on acer both ADCs are present, and it might be worth to use them both (record from line in and mic)
on aspire one there is only external and internal mic, probably doesn't worth it.

6) Codec supports two DACs too, so it is in theory possible to play different streams on speakers and headphones.
2nd DAC is connected only to headphones, while 1st DAC is connected to all. But here on acer they reversed the connections
and connected speakers to headphones output and headphones to speakers, so probably useless, and besides this doesn't worth the trouble probably.

7) SPDIF is supported on my notebook, but no by the driver, don't yet have a device to test it againt thought, but adding support should be easy.
it is shared with headphones output.
How we can detect that digital headphones are connected, don't know, probably impossible in hardware.


8) The issue of capture volume on aspire one:
when I try to increase internal mic's volume I have to increase ether left
or right channel but not both.

Well, first of all, aspire one mic is really digital.
then, digital mic inputs are supposed to be connected by two mics each resulting in total
of 4 mics.

ADC multiplexers hide difference between analog and digital pins, but of course digital pins
aren't really processed by ADC in analog sense, their input is probably sampled, and digitaly amplified.
Maybe we really need to use only left or right channel there.
I'll test this more carefully.

And now for unfixable problems:

1) There is strong DC offset on all inputs.
it is even different on left/right and depends on capture volume.
I tried to change the VREF only param that could help, but it doesn't.
I feel that this is hardware flaw.
(It is possible that voltage on inputs is created by circuit made by acer, and then ALC268 amplifies it.)

2) That 'analog loopback' when setting any 'boost' setting to high.
The is no mention of that in datasheets, and thus I strongly suspect that this should be called crosstalk.
I understand the block diagram of the chip and there is no loopback, so this isn't alsa bug.


Lastly I noticed that datasheet mentions so called 'coefficients':
the codecs exposes lots of internal and undocumented registers using set address/ get/set value scheme.
maybe some of above bugs are fixable there, but ether realtek has to provide data for that or reverse engineering of
windows driver is required.

(I will test whenever the above happens in windows, at least the #2)

And I hope those registers are for debuging only.

Best regards,
Maxim Levitsky

Maxim Levitsky

unread,
Nov 12, 2008, 12:30:24 PM11/12/08
to


For the reference this this list of nodes on ALC268 (main mobo):

0x01 - params


output streams:
0x02 - DAC1 + volume
0x03 - DAC2 + volume (only headphones)
0x06 - s/pdif-out
0x1D - BEEP


input streams:
0x07 - ADC1
0x23 - ADC1 multiplexer + volume
0x08 - ADC2
0x24 - ADC2 multiplexer + volume


output pins(*): (***)

0x14 - LINE-OUT headphones <- 0x0f - line-out (mixer) <- DAC1 + beep
0x15 - HP-OUT speakers <- 0x10 - hp-out (mixer) <- DAC1 + DAC2 + beep
0x16 - MONO-OUT N/A <- 0x0e - mono out (mixer) <- DAC1
0x1E - spdif


input pins(**):
0x12 - DMIC1/2 N/A
0x13 - DMIC3/4 N/A
0x18 - MIC1 external mic + boost
0x19 - MIC2 internal mic + boost
0x1A - LINE-IN line-in + boost
0x1C - CD-IN N/A


* Most output pins may be used as input pins
** LINE-IN, MIC1 might be output of DAC1
*** those are pins that are connected on my main mobo.


/proc/asound/card0/codec#0 is attached (also for main computer, I will
test the 'one' tomorrow


Best regards,
Maxim Levitsky

codec.txt

Maxim Levitsky

unread,
Nov 12, 2008, 12:50:10 PM11/12/08
to
Yes, this is what I see.

>
>
> There's one outstanding issue on a different machine, where the
> occasional EC read fails and triggers polling mode sometime _after_
> boot. It can be fixed by retrying the transaction
>
> http://bugzilla.kernel.org/show_bug.cgi?id=11896
>
> but I don't really expect your machine has the same problem.
>
> <snip non-acpi problems>
>
>> Also noticed another bug:
>>
>>
>> If I suspend/resume with compiz running, on resume I see wallpaper and
>> mouse cursor, everything hangs for minute or two, and sometimes forever.
>>
>> 2.6.27 worked fine.
>
> Weird.
>
> Did you try sysrq-W during the hang? That's supposed to dump a list of
> blocked tasks to dmesg.

Well, I see the wallpaper and can move the mouse, I will try to suspend from console
I think this is graphics bug.
nether ctrl+alt+bks nor SAK kill X.

After 2 minute wait, kernel log doesn't show anything unusual.
printk times, jump that 2 minutes around wireless association, but I tested it without ath5k loaded
and still the same happens.

Also if I disable compiz, everything resumes correctly, and instantly.

>
>> Also hibernate doesn't work on my main notebook, but it is probably
>> fixed, I update kernel to really latest -git
>> and tell you.
>>
>
> But suspend to ram works? Usually it is the other way round :). If you
> haven't already, you might read
>
> Documentation/power/basic-pm-debugging.txt
>

Well, this is long story
details at http://lkml.org/lkml/2008/9/20/75
speaking shortly, bios doesn't pass control to kernel on second resume.
Thus I don't test it, but I see how it works now.

Suspend to disk still doesn't work.
First of all system hangs in the end of image writeout.
If I power it down manually, and boot, system resumes from disk, and then hangs.
2.6.27 works fine.

(This is about my main notebook)


> it suggests some tests to narrow down the problem.
>
>> Big thanks for bugfixes, you saved me a lot of work and bisecting.
>>
>
> I can't take credit for actual fixes. But I'm very happy to help people
> avoid bisecting for known problems. I hope you have time to crack the
> unknown ones :).
>
> Alan


Best regards,
Maxim Levitsky


PS: sorry for late reply

Maxim Levitsky

unread,
Nov 12, 2008, 1:00:13 PM11/12/08
to
Nick Kossifidis wrote:
> 2008/11/10 Maxim Levitsky <maximl...@gmail.com>:
>> Bob Copeland wrote:
>>> On Fri, Nov 7, 2008 at 10:26 PM, Maxim Levitsky <maximl...@gmail.com> wrote:
>>>> ** 2 - wireless: not to mention the fact that ath5k wasn't installed by
>>>> default in ubuntu...
>>>> wireless more or less works, but kernel log is full of backtraces.
>>> As you've seen, these should at least be gone now...
>>>
>>>> Was able to connect to my WPA2 access point.
>>>> Sometimes wireless fails completely, especially after suspend to ram.
>>> Did you get noise calibration failures in dmesg at this point? Felix posted
>>> a patch recently that handles them better.
>> Yep, but they seems to be gone in latest -git too.
>> Wireless work fine now, it seems like my iwl3945.
>>
>>>> Advanced features like monitor/injection work, but when I changed the card's
>>>> mac address it stopped working.
>>>> I also noticed that if I then start airodump, then wireless works with new
>>>> mac.
>> Why it doesn't accept new mac?, can this be fixed?

Any update on mac changer status?

>>
>>
>>>> ** 4 - wireless led doesn't work.
>>>> ath5k devs, can you fix this?
>>> Currently all the LED code we have in there is for setting a particular gpio
>>> for particular laptops (and they differ between models). We only have quirks
>>> for IBM and HP, none for Acer. Also, the legacy-hal seems to have a different
>>> strategy for 2425 chips. I can try to hack up some code for you to test.
>>>
>> I have seen on the web that madwifi did support the led with some gpio settings
>>
>> sysctl -w dev.wifi0.ledpin=3
>> sysctl -w dev.wifi0.softled=1
>>
>> from https://help.ubuntu.com/community/AspireOne
>>
>> Best regards,
>> Maxim Levitsky
>
> i think that some led settings are stored on EEPROM, let me check it out...
>

Thanks a lot.


>

Best regards,
Maxim Levitsky

Andreas Mohr

unread,
Nov 12, 2008, 1:10:17 PM11/12/08
to
Hi,

On Wed, Nov 12, 2008 at 07:07:04PM +0200, Maxim Levitsky wrote:
> I pretty much studied the datasheet and driver, and this is what I found:
> btw, my acer 5720 and aspire one share same ALC268.
> Some stuff is trivially fixable, some seems to be unfixable at all:

Wow, what an extremely in-depth analysis!
I just intended to dive into getting mic routing corrected myself,
thus you saved me a lot of time!

> model=acer is used on my regular laptop.
> model-acer-aspire is used on aspire one laptop, and it needs to be renamed, as both are aspire.

+1 (your analysis of both being rather different - as already pondered -
confirms this necessity)

> And now for unfixable problems:
>
> 1) There is strong DC offset on all inputs.
> it is even different on left/right and depends on capture volume.
> I tried to change the VREF only param that could help, but it doesn't.
> I feel that this is hardware flaw.
> (It is possible that voltage on inputs is created by circuit made by acer, and then ALC268 amplifies it.)

Sounds like really bad circuit design then.
One would think that the Intel HDA architecture might have builtin
measures to compensate for this if needed? DC offset issues on
soundcards aren't exactly a new phenomenon after all...

> Lastly I noticed that datasheet mentions so called 'coefficients':
> the codecs exposes lots of internal and undocumented registers using set address/ get/set value scheme.
> maybe some of above bugs are fixable there, but ether realtek has to provide data for that or reverse engineering of
> windows driver is required.

I've actually had a peek at the .inf files since I thought that it would
already contain register values in those registry keys that it creates on
install, but yeah, that's all in-driver it seems.
Probably time to ask Acer about specifics, especially since I didn't spot
any hda-intel changes in their linux-2.6.23.9lw source.

Thank you very much,

Andreas Mohr

Takashi Iwai

unread,
Nov 12, 2008, 2:00:22 PM11/12/08
to
At Wed, 12 Nov 2008 12:08:28 +0100,

I wrote:
>
> > > > i-Mic on Ekiga with lotsa mixer fiddling didn't work either this time.
> > >
> > > OK, then something is missing. But you should test by arecord first
> > > than any complicated applications as a primary test.
> >
> > Good point, will do.
> >
> > Oh, and is there a way to manually alter codec registers?
>
> Try hda-verb program. Build your kernel with CONFIG_SND_HDA_HWDEP=y
> and access via the hwdep device.
> ftp://ftp.suse.com/pub/people/tiwai/misc/hda-verb-0.2.tar.bz2

BTW, for whom would like to fulfill the masochistic joy of debugging
on HD-audio, I uploaded my half-finished HD-audio emulator program.
The package is found at:
ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/hda-emu-0.0.1.tar.gz
or
ftp://ftp.suse.com/pub/people/tiwai/misc/hda-emu-0.0.1.tar.gz

Have fun,

Bob Copeland

unread,
Nov 13, 2008, 10:00:20 AM11/13/08
to
On Wed, 12 Nov 2008 19:51:47 +0200, Maxim Levitsky wrote

> >> Why it doesn't accept new mac?, can this be fixed?
>
> Any update on mac changer status?

Yeah, we appear to only set the mac address at probe time to the one in the
eeprom. It should be easy enough to fix.

--
Bob Copeland %% www.bobcopeland.com

Bob Copeland

unread,
Nov 13, 2008, 10:50:08 PM11/13/08
to
On Wed, Nov 12, 2008 at 07:51:47PM +0200, Maxim Levitsky wrote:
> >>Why it doesn't accept new mac?, can this be fixed?
>
> Any update on mac changer status?

As a first stab, can you try this patch? This sets the address on
add_interface and clears it on remove_interface, instead of only doing
it at probe time. I only compile-tested it.

diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 5ef8cc4..6c56893 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -2765,6 +2765,7 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
/* Set to a reasonable value. Note that this will
* be set to mac80211's value at ath5k_config(). */
sc->bintval = 1000;
+ ath5k_hw_set_lladdr(sc->ah, conf->mac_addr);

ret = 0;
end:
@@ -2777,11 +2778,13 @@ ath5k_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_if_init_conf *conf)
{
struct ath5k_softc *sc = hw->priv;
+ u8 mac[ETH_ALEN] = {};

mutex_lock(&sc->lock);
if (sc->vif != conf->vif)
goto end;

+ ath5k_hw_set_lladdr(sc->ah, mac);
sc->vif = NULL;
end:
mutex_unlock(&sc->lock);

--
Bob Copeland %% www.bobcopeland.com

--

Maxim Levitsky

unread,
Nov 14, 2008, 1:10:07 PM11/14/08
to

Small update:

1) The dc offset isn't present on aspire one, really is a circuit design bug I guess
2) Internal mic works perfectly on aspire one, can reproduce the strange behaver at all,
Probably this was mixer bug.

So aspire one support is almost, only need to add support to restore beep volume
after resume.


Best regards,
Maxim Levitsky

Maxim Levitsky

unread,
Nov 14, 2008, 2:00:20 PM11/14/08
to

Works almost perfectly,


when I load the module, then run macchanger, and then ifconfig wlan0 up
then it works, if I do an ifconfig up once, then ifdowning the interface, it doesn't.

my iwl3945 allows me to

ifconfig wlan0 down
macchanger ....
ifconfig wlan0 up


The noise floor calibration issue bites me again and gain.
When it shows up, usually card continues to work, but at next assotiation stops working.
Maybe this is unrelated, don't know.
Reboot doesn't help, only a cold reboot/suspend to ram helps.
(Module reload doesn't help too).

Transfer speeds are unusually low:
Currently I compile kernel on main laptop, and copy files over nfs to aspire one.
Copying takes ages, and transfer speeds are at 200 Kbytes/s.
(AP isn't involved in direct transfers between stations, right?)

Both notebooks are in same room.


Also noticed, that continued transfer of large volumes (like the above) triggers
noise calibration time-outs, and when it does transfer speeds drop to 50Kbytes/s
Next assotiation usually fails, and only on/off cycle fixes this.

Best regards, and big thanks for help,
Maxim Levitsky

Maxim Levitsky

unread,
Nov 14, 2008, 2:10:05 PM11/14/08
to
Patch for that does exits, but doesn't apply to latest git,
I will apply in manually.
This should go to .28 I think, this is trivial thing.


>>
>>
>> ** 6 - both card readers are missing from lspci, is this normal?
>
> A similar bug has been reported as a regression:
>
> <http://bugzilla.kernel.org/show_bug.cgi?id=11828>
>
> so one assumes that it worked on the machines with linux pre-installed. Hopefully without requiring any hacks.
>
> It seems that for now a workaround may be to pass the option debug_quirks=1 to the sdhci module...
>
> <http://marc.info/?l=linux-kernel&m=122509648027303&w=2>
>
> ...or that it may help if you insert an SD card before booting.
>
> Apparently the reporter also investigated pcie hotplug. Probably the BIOS doesn't provide the normal support. You can try "modprobe pciehp pciehp_force=1", maybe it helps the kernel discover the devices. It worked for something else on my EeePC. But then it will reportedly disappear the ethernet controller.
>
> However, at the moment pciehp can cause delays of 10s of seconds during resume.

Got, a SD card, and with help of pciehp it works almost perfectly in both slots.
Almost, due to the fact that R/O switch is ignored.
(Just as I expected, a s/w switch, couldn't they think more, and include a hardware switch?)
On my main acer R/O switch works.

However I have to use pciehp_force=1, I understand that probably acpi tables are broken,
but could you add a workaround (dmi quirk?)

Also, there is a acpiphp driver, which doesn't work here.
pciehp is supposed to support so called native mode, don't yet know what it is,
but here it still uses acpi.


>
>> ** 7 - opengl is broken, I tried running neverball in fullscreen, but it shows wrong/corrupted
>> textures (compiz is running, and working well thought)

I almost sure why this happens, opengl application is out of textures,
I need to install gem enabled intel driver here, and see how it works.

Best regards,
Maxim Levitsky

Alan Jenkins

unread,
Nov 14, 2008, 3:00:13 PM11/14/08
to

Matthew Garret tells me the Aspire One should be handled by acpiphp
patches he posted on the linux acpi mailing list recently.

--
A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>> A: Top-posting.
>>> Q: What is the most annoying thing in e-mail?

Matthew Garrett

unread,
Nov 15, 2008, 8:00:18 AM11/15/08
to
On Sat, Nov 15, 2008 at 02:52:36PM +0200, Maxim Levitsky wrote:

> I applied his first patch, and now acpiphp works great
> (loads fast, and detects both readers)

Excellent, good to know.

--
Matthew Garrett | mj...@srcf.ucam.org

Maxim Levitsky

unread,
Nov 15, 2008, 8:00:16 AM11/15/08
to
I applied his first patch, and now acpiphp works great
(loads fast, and detects both readers)


Best regards,
Maxim Levitsky

Bob Copeland

unread,
Nov 17, 2008, 12:30:14 PM11/17/08
to
On Fri, 14 Nov 2008 20:57:22 +0200, Maxim Levitsky wrote

> Bob Copeland wrote:
> > On Wed, Nov 12, 2008 at 07:51:47PM +0200, Maxim Levitsky wrote:
> >>>> Why it doesn't accept new mac?, can this be fixed?
> >> Any update on mac changer status?
> >
> > As a first stab, can you try this patch? This sets the address on
>
> Works almost perfectly,
>
> when I load the module, then run macchanger, and then ifconfig wlan0 up
> then it works, if I do an ifconfig up once, then ifdowning the interface, it
> doesn't.

Yeah, I had actually written more for that patch originally, but didn't
post it because it was a bit more invasive. I think the issue is just that
start() shouldn't program the mac at all and let add_interface handle that.
I'll post a revised patch in a day or two.

> The noise floor calibration issue bites me again and gain.
> When it shows up, usually card continues to work, but at next assotiation
> stops working.

Does this help?
http://marc.info/?l=linux-wireless&m=122570806813839&w=2

> Transfer speeds are unusually low:

You can try using the minstrel rate control algorithm, it may help.

--
Bob Copeland %% www.bobcopeland.com

Maxim Levitsky

unread,
Nov 17, 2008, 2:00:16 PM11/17/08
to
Bob Copeland wrote:
> On Fri, 14 Nov 2008 20:57:22 +0200, Maxim Levitsky wrote
>> Bob Copeland wrote:
>>> On Wed, Nov 12, 2008 at 07:51:47PM +0200, Maxim Levitsky wrote:
>>>>>> Why it doesn't accept new mac?, can this be fixed?
>>>> Any update on mac changer status?
>>> As a first stab, can you try this patch? This sets the address on
>> Works almost perfectly,
>>
>> when I load the module, then run macchanger, and then ifconfig wlan0 up
>> then it works, if I do an ifconfig up once, then ifdowning the interface, it
>> doesn't.
>
> Yeah, I had actually written more for that patch originally, but didn't
> post it because it was a bit more invasive. I think the issue is just that
> start() shouldn't program the mac at all and let add_interface handle that.
> I'll post a revised patch in a day or two.

>
>> The noise floor calibration issue bites me again and gain.
>> When it shows up, usually card continues to work, but at next assotiation
>> stops working.
>
> Does this help?
> http://marc.info/?l=linux-wireless&m=122570806813839&w=2

I'll test this, I guess that it should indeed help.

>
>> Transfer speeds are unusually low:
>
> You can try using the minstrel rate control algorithm, it may help.

> s
This actually seems to be iwl3945 bug.

This is the tests I did:


1 . Upload / download from my desktop computer (connected via wired interface)
Speeds are rock solid 1.3 Mbytes/s in both directions

2. Then I tried to upload to my laptop (iwl3945)
Speeds were around 600 Kbytes/s, then after few minutes the ath5k dropped association, associated
again and transfer speed dropped below 64 Kbyte/s
(They didn't stall thought)

3. Then I reloaded the ath5k, it didn't help, 64 Kbyte/s again.

4. Then I tried to transfer files to desktop, 1.3 Mbytes/s again.

5. then tried the laptop, 64 Kbyte/s again

6. Then I reloaded the iwl3945 on laptop, and got 600 Kbytes/s.

It still isn't very clear who is responsible, but this is very fishy.
Maybe the ath5k shouldn't drop association, though.

600 Kbytes/s isn't good ether.


Also ath5k stopped working at all, when I did long test transfer between desktop and laptop, dmesg was full
of some strange message repeated, I haven't been able to reproduce that again, when I do, I will post that message.


In general, ath5k works nice here, big thanks to you for such great work.


Best regards,
Maxim Levitsky

Maxim Levitsky

unread,
Nov 22, 2008, 2:10:12 PM11/22/08
to
Finally, I found how to reproduce that bug,
I mean to get normal volume on internal mic, I have to increase volume
only on left or right channel.

So, this happens always, and _only_ when recording _mono_ sound from internal
mic.

Since hardware doesn't support hardware mono input, tested with -D hw:0
I suspect this to be alsa-lib bug, any ideas?
Happens with arecord -D plughw:0 -c1 .

Best regards,
Maxim Levitsky

Andreas Mohr

unread,
Nov 22, 2008, 2:50:09 PM11/22/08
to
Hi,

On Sat, Nov 22, 2008 at 09:00:18PM +0200, Maxim Levitsky wrote:
> Maxim Levitsky wrote:
>> 1) The dc offset isn't present on aspire one, really is a circuit
>> design bug I guess 2) Internal mic works perfectly on aspire one, can
>> reproduce the strange behaver at all,
>> Probably this was mixer bug.
> Finally, I found how to reproduce that bug,
> I mean to get normal volume on internal mic, I have to increase volume
> only on left or right channel.
>
> So, this happens always, and _only_ when recording _mono_ sound from internal
> mic.
>
> Since hardware doesn't support hardware mono input, tested with -D hw:0
> I suspect this to be alsa-lib bug, any ideas?
> Happens with arecord -D plughw:0 -c1 .

Wow, nice analysis!
I had already intended to report that you're #2 who told me that Mic does work
(and I was starting to feel weird since I'm the only one who cannot
get it to work!)
Given your analysis, things start to make a lot more sense now.

That probably means that Ekiga Wizard uses mono input (since it does not work
for me), whereas many other apps use stereo input as (natively!) supported
by this hardware setup?

--> alsa lib bug sounds like a good guess.

Thanks,

Andreas Mohr

Takashi Iwai

unread,
Nov 24, 2008, 9:40:09 AM11/24/08
to
At Sat, 22 Nov 2008 21:00:18 +0200,

What does show with -v option?


Takashi

Maxim Levitsky

unread,
Dec 1, 2008, 10:40:13 AM12/1/08
to
Hi,
Any update on that?

Best regards,
Maxim Levitsky

Maxim Levitsky

unread,
Dec 13, 2008, 8:20:09 AM12/13/08
to

So, big thanks for everything.

Now aspire one linux support is very close to perfect,
(only problem left is that wireless is limited to 18Mbits/s raw rate,
but at some point I or developers of ath5k will get to the bottom of
this)

I also noticed, that now the SD only card reader is always enabled
regardless of card been there while booting, and same happens in
windows, I suspect that this is permanent hardware change, which worries
me, but this reader works fine otherwise.
(This is another reason why binary bioses are evil, go and find out why
it enables it)


Also forgot to mention that both readers ignore write protect tab on SD
card, and I will report this to correct mailing list soon.
Everything else works fine

please include acpiphp fix in 2.6.28.
Also I applied patch to coretemp to make it show cpu temperature.

Thanks again,

Maxim Levitsky

unread,
Dec 13, 2008, 8:30:13 AM12/13/08
to
On Tue, 2008-11-11 at 00:12 +0200, Nick Kossifidis wrote:


Hi,

Indeed gpio #3 controls the led.
I patched ath5k to use it, and led works now fine.


What I dislike is the way led blinks:

While nether I like constant rate blinking implemented in windows
driver, I don't like the fact that led blinks too fast, sometimes the
blink time is so short that led doesn't show full brightness.

I think there should be a minimal interval for blinking.

Also I don't know what is assumed better, when led is always on, but
turns off when active of vise versa?
(Due to short intervals, when I set it for first option, it is almost
always on, and I almost don't see the interval when it is off)


Best regards,
Maxim Levitsky

Rafael J. Wysocki

unread,
Dec 13, 2008, 8:40:09 AM12/13/08
to
On Saturday, 13 of December 2008, Maxim Levitsky wrote:
>
> So, big thanks for everything.
>
> Now aspire one linux support is very close to perfect,
> (only problem left is that wireless is limited to 18Mbits/s raw rate,
> but at some point I or developers of ath5k will get to the bottom of
> this)
>
> I also noticed, that now the SD only card reader is always enabled
> regardless of card been there while booting, and same happens in
> windows, I suspect that this is permanent hardware change, which worries
> me, but this reader works fine otherwise.
> (This is another reason why binary bioses are evil, go and find out why
> it enables it)
>
>
> Also forgot to mention that both readers ignore write protect tab on SD
> card, and I will report this to correct mailing list soon.
> Everything else works fine
>
> please include acpiphp fix in 2.6.28.

Which one is this?

Rafael

Nick Kossifidis

unread,
Dec 13, 2008, 9:10:08 AM12/13/08
to
2008/12/13 Maxim Levitsky <maximl...@gmail.com>:

>
> Hi,
>
> Indeed gpio #3 controls the led.
> I patched ath5k to use it, and led works now fine.
>
>

Please share your patch with the rest and also post an lspci -vnn for
your card so we can handle this in a generic way


--
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

Bob Copeland

unread,
Dec 13, 2008, 9:30:15 AM12/13/08
to
[trimmed a couple of lists from CC]

On Sat, Dec 13, 2008 at 03:28:24PM +0200, Maxim Levitsky wrote:
> > i think that some led settings are stored on EEPROM, let me check it out...
>

> Indeed gpio #3 controls the led.
> I patched ath5k to use it, and led works now fine.

BTW I looked for settings in EEPROM and didn't find any.

> What I dislike is the way led blinks:

This is something that should rather change in mac80211, I think. It
just toggles the state on every packet, and we just do the same when
mac80211 says so (ath5k *could* set up timers like b43, but it's a
lot of extra code, and every driver shouldn't have to do so.)

--
Bob Copeland %% www.bobcopeland.com

--

Maxim Levitsky

unread,
Dec 13, 2008, 9:30:17 AM12/13/08
to
On Sat, 2008-12-13 at 14:35 +0100, Rafael J. Wysocki wrote:
> On Saturday, 13 of December 2008, Maxim Levitsky wrote:
> >
> > So, big thanks for everything.
> >
> > Now aspire one linux support is very close to perfect,
> > (only problem left is that wireless is limited to 18Mbits/s raw rate,
> > but at some point I or developers of ath5k will get to the bottom of
> > this)
> >
> > I also noticed, that now the SD only card reader is always enabled
> > regardless of card been there while booting, and same happens in
> > windows, I suspect that this is permanent hardware change, which worries
> > me, but this reader works fine otherwise.
> > (This is another reason why binary bioses are evil, go and find out why
> > it enables it)
> >
> >
> > Also forgot to mention that both readers ignore write protect tab on SD
> > card, and I will report this to correct mailing list soon.
> > Everything else works fine
> >
> > please include acpiphp fix in 2.6.28.
>
> Which one is this?

acpiphp: Identify more removable slots

According to section 6.3.6 of the ACPI spec, the presence of an _RMV
method that evaluates to 1 is sufficient to indicate that a slot is
removable without needing an eject method. This patch refactors the
ejectable slot detection code a little in order to flag these slots as
ejectable and register them. Acpihp therefore binds to the expresscard
slot on my HP test machine.

Signed-off-by: Matthew Garrett <m...@redhat.com>


this makes acpiphp handle hotplug of (now one, sd reader is somehow
always present) card reader.


Best regards,
Maxim Levitsky

Maxim Levitsky

unread,
Dec 13, 2008, 9:40:05 AM12/13/08
to
On Sat, 2008-12-13 at 09:24 -0500, Bob Copeland wrote:
> [trimmed a couple of lists from CC]
>
> On Sat, Dec 13, 2008 at 03:28:24PM +0200, Maxim Levitsky wrote:
> > > i think that some led settings are stored on EEPROM, let me check it out...
> >
> > Indeed gpio #3 controls the led.
> > I patched ath5k to use it, and led works now fine.
>
> BTW I looked for settings in EEPROM and didn't find any.
Then maybe create a whitelist of vendors vs gpio numbers?
Also a module param to set the gpio pin won't hurt.

>
> > What I dislike is the way led blinks:
>
> This is something that should rather change in mac80211, I think. It
> just toggles the state on every packet, and we just do the same when
> mac80211 says so (ath5k *could* set up timers like b43, but it's a
> lot of extra code, and every driver shouldn't have to do so.)
>

IWL3945 sets timers too, and this does look ugly.

Also I noticed that sometimes led state gets inverted and it stuck until
I reload the module.

Best regards,
Maxim Levitsky

Maxim Levitsky

unread,
Dec 13, 2008, 9:40:11 AM12/13/08
to
On Sat, 2008-12-13 at 16:36 +0200, Maxim Levitsky wrote:

> On Sat, 2008-12-13 at 16:08 +0200, Nick Kossifidis wrote:
> > 2008/12/13 Maxim Levitsky <maximl...@gmail.com>:
> > >
> > > Hi,
> > >
> > > Indeed gpio #3 controls the led.
> > > I patched ath5k to use it, and led works now fine.
> > >
> > >
> >
> > Please share your patch with the rest and also post an lspci -vnn for
> > your card so we can handle this in a generic way
>
> This just a one liner hack
>
> diff --git a/drivers/net/wireless/ath5k/base.c
> b/drivers/net/wireless/ath5k/base.c
> index 9d2c597..a447937 100644
> --- a/drivers/net/wireless/ath5k/base.c
> +++ b/drivers/net/wireless/ath5k/base.c
> @@ -2595,6 +2595,11 @@ ath5k_init_leds(struct ath5k_softc *sc)
> sc->led_pin = 1;
> sc->led_on = 1; /* active high */
> }
> +
> + __set_bit(ATH_STAT_LEDSOFT, sc->status);
> + sc->led_pin = 3;
> + sc->led_on = 1;
> +
> if (!test_bit(ATH_STAT_LEDSOFT, sc->status))
> goto out;
>
>
>

>
> Best regards,
> Maxim Levitsky
>

Note: thus makes led to be off by default, otherwise set
sc->led_on = 0

this also works

Regards,
Maxim Levitsky

Maxim Levitsky

unread,
Dec 13, 2008, 9:40:11 AM12/13/08
to
On Sat, 2008-12-13 at 16:08 +0200, Nick Kossifidis wrote:
> 2008/12/13 Maxim Levitsky <maximl...@gmail.com>:
> >
> > Hi,
> >
> > Indeed gpio #3 controls the led.
> > I patched ath5k to use it, and led works now fine.
> >
> >
>
> Please share your patch with the rest and also post an lspci -vnn for
> your card so we can handle this in a generic way

This just a one liner hack

diff --git a/drivers/net/wireless/ath5k/base.c
b/drivers/net/wireless/ath5k/base.c
index 9d2c597..a447937 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -2595,6 +2595,11 @@ ath5k_init_leds(struct ath5k_softc *sc)
sc->led_pin = 1;
sc->led_on = 1; /* active high */
}
+
+ __set_bit(ATH_STAT_LEDSOFT, sc->status);
+ sc->led_pin = 3;
+ sc->led_on = 1;
+
if (!test_bit(ATH_STAT_LEDSOFT, sc->status))
goto out;


lspci -vnn:

03:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x
802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01)
Subsystem: Foxconn International, Inc. Device [105b:e008]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 18
Region 0: Memory at 55200000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: ath5k
Kernel modules: ath5k


Best regards,
Maxim Levitsky

Rafael J. Wysocki

unread,
Dec 13, 2008, 12:50:09 PM12/13/08
to

This is
http://git.kernel.org/?p=linux/kernel/git/jbarnes/pci-2.6.git;a=commit;h=db9fe9a7230d65916c9938c4f91c75f9c5e00cb7
in the PCI tree.

It's scheduled for 2.6.29 and may be included into 2.6.28 -stable, but please
remember to notify the stable team as soon as this patch gets merged into the
mainline.

Thanks,
Rafael

Maxim Levitsky

unread,
Dec 13, 2008, 1:10:04 PM12/13/08
to

I will, sure.


Just to note, that I might not need that patch as I told that now one of
readers is permanently enabled, I don't know why but this seems to be
hardware failure.

I disconnected power/battery, no cards are in slots, and yet on boot
there is a sd reader in lspci.
Same happens in windows.
It could happen due to suspend/resume, If I remember correctly I put
card once in slot, and then for whole week system wasn't rebooted, but
instead went through suspend/resume cycles.

One thing for sure, nobody will fix this (I mean no point to call acer
support, this is too minor problem)


What I worry about is that second one could show same behavier.
I like this hotplug, as it allows me to test pci hotplug code for real.
Besides, this isn't done without purpose, device might draw less power
this way.


Best regards,
Maxim Levitsky

J.A. Magallón

unread,
Dec 14, 2008, 5:40:07 PM12/14/08
to
On Sat, 13 Dec 2008 15:15:38 +0200, Maxim Levitsky <maximl...@gmail.com> wrote:

>
> So, big thanks for everything.
>
> Now aspire one linux support is very close to perfect,
> (only problem left is that wireless is limited to 18Mbits/s raw rate,
> but at some point I or developers of ath5k will get to the bottom of
> this)
>

I have seen ine gone to 24 and 36 Mb/s, doing a copy in gnome GUI via
sftp (at a couple feet from the router ;).

But at some point, the copy blocked and dmesg said:

ath5k phy0: unsupported jumbo
ath5k phy0: unsupported jumbo

Apart from that, and the led problem, wifi works pretty fine.

--
J.A. Magallon <jamagallon()ono!com> \ Software is like sex:
\ It's better when it's free
Mandriva Linux release 2009.1 (Cooker) for x86_64
Linux 2.6.27.5-desktop-1mnb (gcc 4.3.2 (GCC) #1 Sun Nov

J.A. Magallón

unread,
Dec 14, 2008, 6:00:09 PM12/14/08
to
On Sat, 13 Dec 2008 15:15:38 +0200, Maxim Levitsky <maximl...@gmail.com> wrote:

>
> I also noticed, that now the SD only card reader is always enabled
> regardless of card been there while booting, and same happens in
> windows, I suspect that this is permanent hardware change, which worries
> me, but this reader works fine otherwise.
> (This is another reason why binary bioses are evil, go and find out why
> it enables it)
>

Which BIOS ? Mine is 3304, kernel is 2.6.28-rc8, and LEFT card is not detected
unless I use this option:

options sdhci debug_quirks=1

I have downloaded BIOS 3308, but it is to big to fit in my 1.4 floppy image
(I still have a flooy image I dd on a USB flash, but have not managed to grow
it - wouldn't you know how to do it ?)


--
J.A. Magallon <jamagallon()ono!com> \ Software is like sex:
\ It's better when it's free
Mandriva Linux release 2009.1 (Cooker) for x86_64
Linux 2.6.27.5-desktop-1mnb (gcc 4.3.2 (GCC) #1 Sun Nov

Maxim Levitsky

unread,
Dec 14, 2008, 6:20:08 PM12/14/08
to
On Sun, 2008-12-14 at 23:57 +0100, J.A. Magallón wrote:
> On Sat, 13 Dec 2008 15:15:38 +0200, Maxim Levitsky <maximl...@gmail.com> wrote:
>
> >
> > I also noticed, that now the SD only card reader is always enabled
> > regardless of card been there while booting, and same happens in
> > windows, I suspect that this is permanent hardware change, which worries
> > me, but this reader works fine otherwise.
> > (This is another reason why binary bioses are evil, go and find out why
> > it enables it)
> >
>
> Which BIOS ? Mine is 3304, kernel is 2.6.28-rc8, and LEFT card is not detected
> unless I use this option:
>
> options sdhci debug_quirks=1
>
v0.3301

left read was and does work fine, but before some time it wasn't present
on boot, if there were no card in it, but was hotplugged using acpiphp
when I put it there, but now it is present regardless of card, and I did
no changes in system, so it must be a hardware malfunction/bug.

Best regards,
Maxim Levitsky

J.A. Magallón

unread,
Dec 14, 2008, 6:30:14 PM12/14/08
to
On Mon, 15 Dec 2008 01:18:28 +0200, Maxim Levitsky <maximl...@gmail.com> wrote:

> On Sun, 2008-12-14 at 23:57 +0100, J.A. Magallón wrote:
> > On Sat, 13 Dec 2008 15:15:38 +0200, Maxim Levitsky <maximl...@gmail.com> wrote:
> >
> > >
> > > I also noticed, that now the SD only card reader is always enabled
> > > regardless of card been there while booting, and same happens in
> > > windows, I suspect that this is permanent hardware change, which worries
> > > me, but this reader works fine otherwise.
> > > (This is another reason why binary bioses are evil, go and find out why
> > > it enables it)
> > >
> >
> > Which BIOS ? Mine is 3304, kernel is 2.6.28-rc8, and LEFT card is not detected
> > unless I use this option:
> >
> > options sdhci debug_quirks=1
> >
> v0.3301
>
> left read was and does work fine, but before some time it wasn't present
> on boot, if there were no card in it, but was hotplugged using acpiphp
> when I put it there, but now it is present regardless of card, and I did
> no changes in system, so it must be a hardware malfunction/bug.
>

But how do you load acpiphp ? I try and I just get:

one:/etc# modprobe acpiphp debug=1
FATAL: Error inserting acpiphp (/lib/modules/2.6.28-desktop-0.rc8.1mnb/kernel/drivers/pci/hotplug/acpiphp.ko.gz): No such device

from syslog:

acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
acpiphp_glue: Total 0 slots

??

--
J.A. Magallon <jamagallon()ono!com> \ Software is like sex:
\ It's better when it's free
Mandriva Linux release 2009.1 (Cooker) for x86_64
Linux 2.6.27.5-desktop-1mnb (gcc 4.3.2 (GCC) #1 Sun Nov

J.A. Magallón

unread,
Dec 14, 2008, 6:40:12 PM12/14/08
to
On Sat, 13 Dec 2008 15:15:38 +0200, Maxim Levitsky <maximl...@gmail.com> wrote:

>
> So, big thanks for everything.
>
> Now aspire one linux support is very close to perfect,

And this is the past one in my list...

With latest updates (kernel rc8, intel video driver 2.5.1, ...), MTRRs are
setup ok:

one:~# cat /proc/mtrr
reg00: base=0x000000000 ( 0MB), size= 512MB, count=1: write-back
reg01: base=0x01f500000 ( 501MB), size= 1MB, count=1: uncachable
reg02: base=0x01f600000 ( 502MB), size= 2MB, count=1: uncachable
reg03: base=0x01f800000 ( 504MB), size= 8MB, count=1: uncachable

But X still has some kind of problem:

[drm] Initialized drm 1.1.0 20060810
pci 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
pci 0000:00:02.0: setting latency timer to 64
[drm] Initialized i915 1.6.0 20080730 on minor 0
X:2877 conflicting memory types 20000000-30000000 write-combining<->uncached-minus
reserve_memtype failed 0x20000000-0x30000000, track write-combining, req write-combining
X:2877 conflicting memory types 20000000-30000000 write-combining<->uncached-minus
reserve_memtype failed 0x20000000-0x30000000, track write-combining, req write-combining
X:3008 freeing invalid memtype 20000000-30000000
X:2877 conflicting memory types 20000000-30000000 write-combining<->uncached-minus
reserve_memtype failed 0x20000000-0x30000000, track write-combining, req write-combining
X:3009 freeing invalid memtype 20000000-30000000

Don't know it its a problem, as DRI works and 'gears' (I know, gears is not
a benchmark...) has raised from about 500 in the best times I remember to
750!!.
Perhaps if X could set its MTRR things would be even faster ??

TIA

--
J.A. Magallon <jamagallon()ono!com> \ Software is like sex:
\ It's better when it's free
Mandriva Linux release 2009.1 (Cooker) for x86_64
Linux 2.6.27.5-desktop-1mnb (gcc 4.3.2 (GCC) #1 Sun Nov

Bob Copeland

unread,
Dec 29, 2008, 11:30:07 PM12/29/08
to
On Sat, Dec 13, 2008 at 09:24:45AM -0500, Bob Copeland wrote:
> > Indeed gpio #3 controls the led.
> > I patched ath5k to use it, and led works now fine.

Sorry for the delay, can you test this patch?

From: Bob Copeland <m...@bobcopeland.com>
Date: Mon, 29 Dec 2008 23:14:24 -0500
Subject: [PATCH] ath5k: support LEDs on aspire one laptop

Add vendor ID for Foxconn and use it to set the ath5k LED gpio and
polarity for Acer branded laptops.

base.c:
Changes-licensed-under: 3-Clause-BSD

Reported-by: Maxim Levitsky <maximl...@gmail.com>
Signed-off-by: Bob Copeland <m...@bobcopeland.com>
---
drivers/net/wireless/ath5k/base.c | 7 +++++++
include/linux/pci_ids.h | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 40c0155..eb0675f 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -2595,6 +2595,13 @@ ath5k_init_leds(struct ath5k_softc *sc)


sc->led_pin = 1;
sc->led_on = 1; /* active high */
}

+ /* Pin 3 on Foxconn chips used in Aspire One A150 (0x105b:e008) */
+ if (pdev->subsystem_vendor == PCI_VENDOR_ID_FOXCONN) {


+ __set_bit(ATH_STAT_LEDSOFT, sc->status);
+ sc->led_pin = 3;

+ sc->led_on = 1; /* active high */
+ }
+


if (!test_bit(ATH_STAT_LEDSOFT, sc->status))
goto out;

diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 1800f1d..c1fb01c 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -834,6 +834,8 @@
#define PCI_DEVICE_ID_PROMISE_20276 0x5275
#define PCI_DEVICE_ID_PROMISE_20277 0x7275

+#define PCI_VENDOR_ID_FOXCONN 0x105b
+
#define PCI_VENDOR_ID_UMC 0x1060
#define PCI_DEVICE_ID_UMC_UM8673F 0x0101
#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a
--
1.6.0.4

Maxim Levitsky

unread,
Dec 30, 2008, 7:50:04 AM12/30/08
to

Sure, will test, I am also sure that this will work.

Unfortunely mac8211 is broken in regard to led handling.

Since ath5k doesn't do timers, led blinks very often, thus usually I
don't even see it, and moreover sometimes it gets 'inverted' and I
tested and this looks like software issue, just writing numbers to /sys
led interface works but triggers from mac8211, they are inverted.

This issue is masked on my iwl3945 since they use mac led triggers only
as a "suggestion" and blink the leds according to their own traffic
measurement, and timers (and still the code that should blink led at
different rates doesn't work, still led ether blinks or not at constant
rate)

Best regards,
Maxim Levitsky

Andreas Mohr

unread,
Dec 31, 2008, 4:20:10 AM12/31/08
to
Hi,

> Sure, will test, I am also sure that this will work.

A110L, 2.6.28, success (also inverted here, traffic blanks it).

Note that CONFIG_LEDS_TRIGGER_DEFAULT_ON=m, might be related
(possibly ath5k is just mis-using LEDs API, in light of this setting?).

Thanks a lot!

Andreas Mohr

Andreas Mohr

unread,
Dec 31, 2008, 9:00:10 AM12/31/08
to
Hi,

On Wed, Dec 31, 2008 at 10:18:45AM +0100, Andreas Mohr wrote:
> Hi,
>
> > Sure, will test, I am also sure that this will work.
>
> A110L, 2.6.28, success (also inverted here, traffic blanks it).
>
> Note that CONFIG_LEDS_TRIGGER_DEFAULT_ON=m, might be related
> (possibly ath5k is just mis-using LEDs API, in light of this setting?).

Nope, genuinely inverted, modprobe ledtrig-default-on and
# echo default-on > /sys/class/leds/ath5k-phy0\:\:*x/trigger
actually blanks the LED.
ledtrig-heartbeat exhibits a weird inverted but actually heartbeat-like pattern,
too.

IOW, our hardware _is_ inverted for real I believe and the driver needs
to be fixed.

Oh, and what about the second LED on the left side? That one would be
available for driver implementation, too, right?
Or is that one hard-wired (via Embedded Controller?)
to rfkill mechanical switch?

(default use for those two would then be rfkill / Rx/Tx triggers, right?)

Bob Copeland

unread,
Dec 31, 2008, 9:10:05 AM12/31/08
to
On Wed, Dec 31, 2008 at 10:18:45AM +0100, Andreas Mohr wrote:
> Hi,
>
> > Sure, will test, I am also sure that this will work.
>
> A110L, 2.6.28, success (also inverted here, traffic blanks it).

Thanks for testing.

By inverted, do you mean that it is off when it should be on and
vice-versa? If so, you can change it to 'sc->led_on = 0' instead
of 1. Let me know if I should make that change in the patch.

--
Bob Copeland %% www.bobcopeland.com

--

Bob Copeland

unread,
Dec 31, 2008, 9:10:11 AM12/31/08
to
On Wed, Dec 31, 2008 at 02:59:15PM +0100, Andreas Mohr wrote:
> IOW, our hardware _is_ inverted for real I believe and the driver needs
> to be fixed.

Ok please try the change I suggested in the other email.

> Oh, and what about the second LED on the left side? That one would be
> available for driver implementation, too, right?
> Or is that one hard-wired (via Embedded Controller?)
> to rfkill mechanical switch?

Every laptop is wired differently (in my case I don't even have an LED).
So, you can experiment with different gpios to see if the other LED will
work. Right now the driver only supports a single led pin but it
wouldn't be hard to change.

--
Bob Copeland %% www.bobcopeland.com

--

Maxim Levitsky

unread,
Dec 31, 2008, 12:00:10 PM12/31/08
to
On Wed, 2008-12-31 at 09:03 -0500, Bob Copeland wrote:
> On Wed, Dec 31, 2008 at 10:18:45AM +0100, Andreas Mohr wrote:
> > Hi,
> >
> > > Sure, will test, I am also sure that this will work.
> >
> > A110L, 2.6.28, success (also inverted here, traffic blanks it).
>
> Thanks for testing.
>
> By inverted, do you mean that it is off when it should be on and
> vice-versa? If so, you can change it to 'sc->led_on = 0' instead
> of 1. Let me know if I should make that change in the patch.
>

Actually, I even thought that this is right behavior, here on iwl3945
led is always on, and blinks while traffic is send, also same on
windows, but feel free to invert the polarity.

What does bother me is, that led state gets inverted dynamically, that
is system starts with default 'led always on', but after some time
switches to 'always led off' and after sometime again switches back.
This does seem to be software problem, at least according to sysfs
interace.

And I think led blinks too fast, sometimes it is hard to even see it.
It might even shorten led life, but this is just a guess.

Best regards,
Maxim Levitsky

Andreas Mohr

unread,
Jan 1, 2009, 8:50:07 AM1/1/09
to
Hi,

On Wed, Dec 31, 2008 at 06:51:31PM +0200, Maxim Levitsky wrote:
> On Wed, 2008-12-31 at 09:03 -0500, Bob Copeland wrote:
> > On Wed, Dec 31, 2008 at 10:18:45AM +0100, Andreas Mohr wrote:
> > > Hi,
> > >
> > > > Sure, will test, I am also sure that this will work.
> > >
> > > A110L, 2.6.28, success (also inverted here, traffic blanks it).
> >
> > Thanks for testing.
> >
> > By inverted, do you mean that it is off when it should be on and
> > vice-versa? If so, you can change it to 'sc->led_on = 0' instead
> > of 1. Let me know if I should make that change in the patch.
> >
>
> Actually, I even thought that this is right behavior, here on iwl3945
> led is always on, and blinks while traffic is send, also same on
> windows, but feel free to invert the polarity.

It's not:
Inversion of the led_on flag does make LED state work properly
and is the right thing to do since an LED
_as seen by the authoritative LED layer_
__has__ to have proper on/off configuration,
regardless of whether having a WLAN LED on-by-default and
off-on-traffic _in the WLAN layer_ is desireable.
(witness wrong state of default-on and heartbeat triggers)

Or, IOW: logical state has to be maintained properly,
at _each layer_ that is involved.

> What does bother me is, that led state gets inverted dynamically, that
> is system starts with default 'led always on', but after some time
> switches to 'always led off' and after sometime again switches back.
> This does seem to be software problem, at least according to sysfs
> interace.

linux/net/mac80211/led.c/ieee80211_led_rx() does simple on/off alternation
via a counter increment modulo, thus somewhat weird LED state toggling
does seem a natural outcome given the current implementation.

I believe the 80211 layer itself should provide some generic LED
handling which then provide for reliable and _identical_ displaying of
WLAN LEDs. It's not a good idea to have individual drivers
mess with custom rssi-indicating LED type implementations,
this should be centralized to have one template for an RSSI LED.

More notes:
. checks of AR5K_NUM_GPIO most certainly are buggy: off-by-1
(range sems to be 0-5, _not_ 1-6)
. prepend "Acer" to "Aspire One" in this patch
since Acer is major AR5007EG customer
. testing GPIOs other than 3 (0-6) didn't succeed in making the other
LED work - what is the behaviour with Linpus, is there an rfkill LED
there?

Andreas Mohr

Maxim Levitsky

unread,
Jan 1, 2009, 9:20:07 AM1/1/09
to

Completely agree with you.

Nether does second led works here, even with Win XP that this netbook
came with.

I suspect, that this is usual outcome of an acer tradition, I mean
shipping notebooks with all bluetooch equipment except the actual device
(I mean my notebook has a BT led, BT button, but not a BT device)

I suspect that this led is intended for BT.

Also there is a wireless sign near wireless led, and none near the other
led, and I guess there should have been a BT sign.


Best regards,
Maxim Levitsky

Bob Copeland

unread,
Jan 1, 2009, 10:20:08 AM1/1/09
to
On Thu, Jan 01, 2009 at 02:41:00PM +0100, Andreas Mohr wrote:
> I believe the 80211 layer itself should provide some generic LED
> handling which then provide for reliable and _identical_ displaying of
> mess with custom rssi-indicating LED type implementations,
> this should be centralized to have one template for an RSSI LED.

Agreed, I suggested this in another thread. I don't have any LEDs so it
would be better if someone else did the work. (I should really build a
little usb->serial device with a couple of lights on it and hook it up
to the triggers so I can pretend...)

> More notes:


> checks of AR5K_NUM_GPIO most certainly are buggy: off-by-1
> (range sems to be 0-5, _not_ 1-6)

Nice catch, that has been there since day 0.

> prepend "Acer" to "Aspire One" in this patch

Will do and I'll invert the logic level in the resend. Thanks for the
feedback.

--
Bob Copeland %% www.bobcopeland.com

--

Andreas Mohr

unread,
Jan 1, 2009, 3:30:10 PM1/1/09
to
Hi,

On Thu, Jan 01, 2009 at 04:15:17PM +0200, Maxim Levitsky wrote:
> Nether does second led works here, even with Win XP that this netbook
> came with.
> I suspect, that this is usual outcome of an acer tradition, I mean
> shipping notebooks with all bluetooch equipment except the actual device
> (I mean my notebook has a BT led, BT button, but not a BT device)
>
> I suspect that this led is intended for BT.
>
> Also there is a wireless sign near wireless led, and none near the other
> led, and I guess there should have been a BT sign.

Not BT, unallocated 3G socket!
(at least that's what i strongly suspect)

Then the question would be how this is hooked up - hard-wired to 3G
socket or possibly via a function in the Embedded Controller?? (which one could
then abuse for other things)

And many thanks to Bob for his new iteration of LED / GPIO count patches!

Andreas Mohr

Andreas Mohr

unread,
Mar 15, 2009, 5:30:11 AM3/15/09
to
Hi,

On Mon, Nov 24, 2008 at 03:35:10PM +0100, Takashi Iwai wrote:
> At Sat, 22 Nov 2008 21:00:18 +0200,
> Maxim Levitsky wrote:


> >
> > Maxim Levitsky wrote:
> > > Andreas Mohr wrote:
> > >> Hi,
> > >>

> > >> On Wed, Nov 12, 2008 at 07:07:04PM +0200, Maxim Levitsky wrote:
> > >>> I pretty much studied the datasheet and driver, and this is what I
> > >>> found:
> > >>> btw, my acer 5720 and aspire one share same ALC268.
> > >>> Some stuff is trivially fixable, some seems to be unfixable at all:
> > >>
> > >> Wow, what an extremely in-depth analysis!
> > >> I just intended to dive into getting mic routing corrected myself,
> > >> thus you saved me a lot of time!
> > >>
> > >>> model=acer is used on my regular laptop.
> > >>> model-acer-aspire is used on aspire one laptop, and it needs to be
> > >>> renamed, as both are aspire.
> > >>
> > >> +1 (your analysis of both being rather different - as already pondered -
> > >> confirms this necessity)
> > >>
> > >>> And now for unfixable problems:
> > >>>
> > >>> 1) There is strong DC offset on all inputs.
> > >>> it is even different on left/right and depends on capture volume.
> > >>> I tried to change the VREF only param that could help, but it doesn't.
> > >>> I feel that this is hardware flaw.
> > >>> (It is possible that voltage on inputs is created by circuit made by
> > >>> acer, and then ALC268 amplifies it.)
> > >>
> > >> Sounds like really bad circuit design then.
> > >> One would think that the Intel HDA architecture might have builtin
> > >> measures to compensate for this if needed? DC offset issues on
> > >> soundcards aren't exactly a new phenomenon after all...
> > >>
> > >>> Lastly I noticed that datasheet mentions so called 'coefficients':
> > >>> the codecs exposes lots of internal and undocumented registers using
> > >>> set address/ get/set value scheme.
> > >>> maybe some of above bugs are fixable there, but ether realtek has to
> > >>> provide data for that or reverse engineering of
> > >>> windows driver is required.
> > >>
> > >> I've actually had a peek at the .inf files since I thought that it would
> > >> already contain register values in those registry keys that it creates on
> > >> install, but yeah, that's all in-driver it seems.
> > >> Probably time to ask Acer about specifics, especially since I didn't spot
> > >> any hda-intel changes in their linux-2.6.23.9lw source.
> > >>
> > >> Thank you very much,
> > >>
> > >> Andreas Mohr
> > >
> > > Small update:
> > >
> > > 1) The dc offset isn't present on aspire one, really is a circuit design
> > > bug I guess 2) Internal mic works perfectly on aspire one, can reproduce
> > > the strange behaver at all,
> > > Probably this was mixer bug.
> > Finally, I found how to reproduce that bug,
> > I mean to get normal volume on internal mic, I have to increase volume
> > only on left or right channel.
> >
> > So, this happens always, and _only_ when recording _mono_ sound from internal
> > mic.
> >
> > Since hardware doesn't support hardware mono input, tested with -D hw:0
> > I suspect this to be alsa-lib bug, any ideas?
> > Happens with arecord -D plughw:0 -c1 .
>
> What does show with -v option?

OK, I could fully reproduce this now (sorry for the delay!).

Currently 2.6.28, u8.10, model acer-aspire, libasound2 1.0.17a-0ubuntu4,
libasound2-plugins 1.0.17-0ubuntu5.

Recording from i-Mic does work (minus some pretty annoying background noise)
if in gamix I open either left _or_ right channel of the "Capture" control,
but the more both channel sliders progress towards an (almost) equal level,
the more the recording gets reduced to bit changes distantly resembling
the time curve of the recorded signal (but this is not a linear effect,
only the last 5% difference of the slider are dramatic).
IOW you get a "bit buzzing" which clearly distantly resembles the speech
you recorded, something like
"Hello, Test!" --> "crch........crch......crch..."
"(H).ee.(l)..oooo..(T).eee.(st)."
I'm wondering whether these are MSB bit, not LSB, remains of the original
signal here... (since they are clearly audible which LSB wouldn't be)

Anyway, we clearly have some differential logic of the two channels
here, which certainly shouldn't be the case, IOW most likely a bug.


Working test (Capture sliders NOT equal, recorded signal audible):

andi@andinet:~$ arecord -v -D plughw:0 -c1 test.wav
Recording WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
Plug PCM: Rate conversion PCM (48000, sformat=U8)
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : U8
subformat : STD
channels : 1
rate : 8000
exact rate : 8000 (8000/1)
msbits : 8
buffer_size : 2730
period_size : 682
period_time : 85333
tstamp_mode : NONE
period_step : 1
avail_min : 682
period_event : 0
start_threshold : 1
stop_threshold : 2730
silence_threshold: 0
silence_size : 0
boundary : 178913280
Slave: Route conversion PCM (sformat=S16_LE)
Transformation table:
0 <- 0*0.5 + 1*0.5
Its setup is:
stream : CAPTURE
access : MMAP_INTERLEAVED
format : U8
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 8
buffer_size : 16384
period_size : 4096
period_time : 85333
tstamp_mode : NONE
period_step : 1
avail_min : 4096
period_event : 0
start_threshold : 6
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 1073741824
Slave: Hardware PCM card 0 'HDA Intel' device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 4096
period_time : 85333
tstamp_mode : NONE
period_step : 1
avail_min : 4096
period_event : 0
start_threshold : 6
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 1073741824
^CAborted by signal Interrupt...
andi@andinet:~$ aplay test.wav
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
andi@andinet:~$

Non-working test (Capture sliders are equal):

andi@andinet:~$ arecord -v -D plughw:0 -c1 test.wav
Recording WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
Plug PCM: Rate conversion PCM (48000, sformat=U8)
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : U8
subformat : STD
channels : 1
rate : 8000
exact rate : 8000 (8000/1)
msbits : 8
buffer_size : 2730
period_size : 682
period_time : 85333
tstamp_mode : NONE
period_step : 1
avail_min : 682
period_event : 0
start_threshold : 1
stop_threshold : 2730
silence_threshold: 0
silence_size : 0
boundary : 178913280
Slave: Route conversion PCM (sformat=S16_LE)
Transformation table:
0 <- 0*0.5 + 1*0.5
Its setup is:
stream : CAPTURE
access : MMAP_INTERLEAVED
format : U8
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 8
buffer_size : 16384
period_size : 4096
period_time : 85333
tstamp_mode : NONE
period_step : 1
avail_min : 4096
period_event : 0
start_threshold : 6
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 1073741824
Slave: Hardware PCM card 0 'HDA Intel' device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 4096
period_time : 85333
tstamp_mode : NONE
period_step : 1
avail_min : 4096
period_event : 0
start_threshold : 6
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 1073741824
^CAborted by signal Interrupt...
andi@andinet:~$ aplay test.wav
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
andi@andinet:~$


I did a diff of the two test logs above, and they were identical.


Ekiga recording test does work with the sliders being opposite,
but audio quality in general is very poor and buggy (only the first
seconds were played back audibly, and in general the speakers have some
background noise which is being switched on/off from time to time at will,
and somehow the whole codec / setup doesn't seem solid).

Any ideas?

Will now try to upgrade to newer ALSA userspace at least.

Thanks,

Andreas Mohr

unread,
Mar 16, 2009, 8:10:08 AM3/16/09
to
Hi,

On Sun, Mar 15, 2009 at 10:21:17AM +0100, Andreas Mohr wrote:
> Hi,
>

> On Mon, Nov 24, 2008 at 03:35:10PM +0100, Takashi Iwai wrote:
> > At Sat, 22 Nov 2008 21:00:18 +0200,
> > Maxim Levitsky wrote:
> > > Finally, I found how to reproduce that bug,
> > > I mean to get normal volume on internal mic, I have to increase volume
> > > only on left or right channel.
> > >
> > > So, this happens always, and _only_ when recording _mono_ sound from internal
> > > mic.
> > >
> > > Since hardware doesn't support hardware mono input, tested with -D hw:0
> > > I suspect this to be alsa-lib bug, any ideas?
> > > Happens with arecord -D plughw:0 -c1 .
> >
> > What does show with -v option?
>
> OK, I could fully reproduce this now (sorry for the delay!).
>
> Currently 2.6.28, u8.10, model acer-aspire, libasound2 1.0.17a-0ubuntu4,
> libasound2-plugins 1.0.17-0ubuntu5.

Same microphone behaviour on 2.6.29-rc8 (additionally remembered to enable
CONFIG_SND_HDA_HWDEP for further testing!), u9.04, model acer-aspire,
libasound2 1.0.18-1ubuntu7, libasound2-plugins 1.0.18-1ubuntu4
(yes, I've just done some monster upgrade).

Will try to eventually analyze things using your _HWDEP-related tools.


2.6.29-rc8, in contrast to several other kernel upgrade occasions,
seems pretty solid so far, BTW.

Takashi Iwai

unread,
Mar 16, 2009, 8:20:14 AM3/16/09
to
At Mon, 16 Mar 2009 13:03:12 +0100,

Andreas Mohr wrote:
>
> Hi,
>
> On Sun, Mar 15, 2009 at 10:21:17AM +0100, Andreas Mohr wrote:
> > Hi,
> >
> > On Mon, Nov 24, 2008 at 03:35:10PM +0100, Takashi Iwai wrote:
> > > At Sat, 22 Nov 2008 21:00:18 +0200,
> > > Maxim Levitsky wrote:
> > > > Finally, I found how to reproduce that bug,
> > > > I mean to get normal volume on internal mic, I have to increase volume
> > > > only on left or right channel.
> > > >
> > > > So, this happens always, and _only_ when recording _mono_ sound from internal
> > > > mic.
> > > >
> > > > Since hardware doesn't support hardware mono input, tested with -D hw:0
> > > > I suspect this to be alsa-lib bug, any ideas?
> > > > Happens with arecord -D plughw:0 -c1 .
> > >
> > > What does show with -v option?
> >
> > OK, I could fully reproduce this now (sorry for the delay!).
> >
> > Currently 2.6.28, u8.10, model acer-aspire, libasound2 1.0.17a-0ubuntu4,
> > libasound2-plugins 1.0.17-0ubuntu5.
>
> Same microphone behaviour on 2.6.29-rc8 (additionally remembered to enable
> CONFIG_SND_HDA_HWDEP for further testing!), u9.04, model acer-aspire,
> libasound2 1.0.18-1ubuntu7, libasound2-plugins 1.0.18-1ubuntu4
> (yes, I've just done some monster upgrade).
>
> Will try to eventually analyze things using your _HWDEP-related tools.

The question in the top priority is whether it's a kernel driver
issue or alsa-lib converter issue. Could you check whether the sounds
recorded with -Dhw (and with matching rate, format, etc) have the same
noise problem at first?

And, if it's about the alsa-lib conversion problem, we can reproduce
without the hardware, e.g. via file plugin...


thanks,

Takashi

Andreas Mohr

unread,
Mar 16, 2009, 9:40:15 AM3/16/09
to
Hi,

OK, tried arecord -v -D hw:0 -c1 test.wav, which ended with
arecord: set_params:961: Sample format non available
.

arecord -v -D hw:0 -c1 -f S16_LE test.wav then ended with
arecord: set_params:966: Channels count non available
thus completing it into a
arecord -v -D hw:0 -c2 -f S16_LE test.wav
worked.

Trying this line with plughw then worked (of course, since two channels
never has any problems).

Interestingly when using plughw there seems to be some LPF effect, since
with hw I get lots of white noise whereas with plughw the recorded sound
is dark (no higher-frequency components at all).

And audio is always being recorded properly no matter which Capture
sliders position.


To state it more clearly, both hw and plughw have no issues whatsoever
with -c2 -f S16_LE, any sliders position.
If I then switch to plughw:0 -c2 -f U8 (IOW change to U8 format),
no problems either. Trouble starts if I then change to -c1 and have
both channel sliders about equal (if they're not equal then I'm getting
audio returned properly).

> And, if it's about the alsa-lib conversion problem, we can reproduce
> without the hardware, e.g. via file plugin...

So, what to do?

> thanks,
>
> Takashi

Thank You,

Andreas

Takashi Iwai

unread,
Mar 16, 2009, 10:20:05 AM3/16/09
to
At Mon, 16 Mar 2009 14:30:01 +0100,

So, the following is also problematic

% arecord -fdat -c1 -Dplughw ng.wav

while the below works?

% arecord -fdat -Dhw good.wav

> > And, if it's about the alsa-lib conversion problem, we can reproduce
> > without the hardware, e.g. via file plugin...
>
> So, what to do?

Does the conversion by sox from good.wav to a mono-channel file work?


Takashi

Andreas Mohr

unread,
Mar 16, 2009, 10:40:16 AM3/16/09
to
Hi,

Indeed, the above has problems with problematic slider positions whereas
the below never has.

>
> > > And, if it's about the alsa-lib conversion problem, we can reproduce
> > > without the hardware, e.g. via file plugin...
> >
> > So, what to do?
>
> Does the conversion by sox from good.wav to a mono-channel file work?

I assume I should be using
sox good.wav -c1 good1.wav
?

If so, yes, this works, audio is there.


Side note: I've got HDA power management activated (with some bad
effects - no sound at all on entire first playback after idle),
but this shouldn't matter here.

Andreas

Takashi Iwai

unread,
Mar 16, 2009, 10:50:17 AM3/16/09
to
At Mon, 16 Mar 2009 15:31:58 +0100,

Err, could you be more specific about "slider positions"?


> > > > And, if it's about the alsa-lib conversion problem, we can reproduce
> > > > without the hardware, e.g. via file plugin...
> > >
> > > So, what to do?
> >
> > Does the conversion by sox from good.wav to a mono-channel file work?
>
> I assume I should be using
> sox good.wav -c1 good1.wav
> ?
>
> If so, yes, this works, audio is there.

Just to be sure - what about below?
sox good.wav -c1 good1.wav mixer 0.5,0.5


Takashi

Andreas Mohr

unread,
Mar 16, 2009, 11:00:15 AM3/16/09
to
Hi,

On Mon, Mar 16, 2009 at 03:42:54PM +0100, Takashi Iwai wrote:
> At Mon, 16 Mar 2009 15:31:58 +0100,
> Andreas Mohr wrote:
> >
> > Hi,
> >
> > On Mon, Mar 16, 2009 at 03:18:20PM +0100, Takashi Iwai wrote:
> > > So, the following is also problematic
> > >
> > > % arecord -fdat -c1 -Dplughw ng.wav
> > >
> > > while the below works?
> > >
> > > % arecord -fdat -Dhw good.wav
> >
> > Indeed, the above has problems with problematic slider positions whereas
> > the below never has.
>
> Err, could you be more specific about "slider positions"?

Hmm, I thought I was... (elsewhere)

In the problematic case (using plughw),
whenever left channel / right channel sliders are equal, no sound gets recorded.
IOW, there has to be a huge difference (in either direction)
between left and right channel slider to hear anything. And that is Not
A Good Feature to have ;)


> > > Does the conversion by sox from good.wav to a mono-channel file work?
> >
> > I assume I should be using
> > sox good.wav -c1 good1.wav
> > ?
> >
> > If so, yes, this works, audio is there.
>
> Just to be sure - what about below?
> sox good.wav -c1 good1.wav mixer 0.5,0.5

Yep, still works.

Thanks,

Andreas

Takashi Iwai

unread,
Mar 16, 2009, 11:40:15 AM3/16/09
to
At Mon, 16 Mar 2009 15:50:36 +0100,

Andreas Mohr wrote:
>
> Hi,
>
> On Mon, Mar 16, 2009 at 03:42:54PM +0100, Takashi Iwai wrote:
> > At Mon, 16 Mar 2009 15:31:58 +0100,
> > Andreas Mohr wrote:
> > >
> > > Hi,
> > >
> > > On Mon, Mar 16, 2009 at 03:18:20PM +0100, Takashi Iwai wrote:
> > > > So, the following is also problematic
> > > >
> > > > % arecord -fdat -c1 -Dplughw ng.wav
> > > >
> > > > while the below works?
> > > >
> > > > % arecord -fdat -Dhw good.wav
> > >
> > > Indeed, the above has problems with problematic slider positions whereas
> > > the below never has.
> >
> > Err, could you be more specific about "slider positions"?
>
> Hmm, I thought I was... (elsewhere)
>
> In the problematic case (using plughw),
> whenever left channel / right channel sliders are equal, no sound gets recorded.

What are "sliders"?


Takashi

Takashi Iwai

unread,
Mar 16, 2009, 12:10:08 PM3/16/09
to
At Mon, 16 Mar 2009 17:02:08 +0100,
Andreas Mohr wrote:
>
> Hi,

>
> On Mon, Mar 16, 2009 at 04:34:05PM +0100, Takashi Iwai wrote:
> > At Mon, 16 Mar 2009 15:50:36 +0100,
> > Andreas Mohr wrote:
> > > In the problematic case (using plughw),
> > > whenever left channel / right channel sliders are equal, no sound gets recorded.
> >
> > What are "sliders"?
>
> Umm, volume level controls.

Yes but there are many of such :)

More exactly, from the driver perspective, there are no volume
controls but only there are control elements with integer values.
Do you mean "Capture Volume" control or which one?

And, is the behavior consistent regardless of the value high, i.e.
the key is only whether the values for both channels are identical?

Andreas Mohr

unread,
Mar 16, 2009, 12:10:10 PM3/16/09
to
Hi,

On Mon, Mar 16, 2009 at 04:34:05PM +0100, Takashi Iwai wrote:
> At Mon, 16 Mar 2009 15:50:36 +0100,
> Andreas Mohr wrote:
> > In the problematic case (using plughw),
> > whenever left channel / right channel sliders are equal, no sound gets recorded.
>
> What are "sliders"?

Umm, volume level controls.

Andreas

Takashi Iwai

unread,
Mar 16, 2009, 12:20:06 PM3/16/09
to
At Mon, 16 Mar 2009 17:06:35 +0100,

私 wrote:
>
> At Mon, 16 Mar 2009 17:02:08 +0100,
> Andreas Mohr wrote:
> >
> > Hi,
> >
> > On Mon, Mar 16, 2009 at 04:34:05PM +0100, Takashi Iwai wrote:
> > > At Mon, 16 Mar 2009 15:50:36 +0100,
> > > Andreas Mohr wrote:
> > > > In the problematic case (using plughw),
> > > > whenever left channel / right channel sliders are equal, no sound gets recorded.
> > >
> > > What are "sliders"?
> >
> > Umm, volume level controls.
>
> Yes but there are many of such :)
>
> More exactly, from the driver perspective, there are no volume
> controls but only there are control elements with integer values.
> Do you mean "Capture Volume" control or which one?
>
> And, is the behavior consistent regardless of the value high, i.e.
> the key is only whether the values for both channels are identical?

BTW, what if you record with the following definition?
Put the below to ~/.asoundrc

pcm.imix {
type plug
slave.pcm "hw"
ttable.0.0 0.5
ttable.0.1 -0.5
}

and record like

% aplay -Dimix -c1 foo.wav

Andreas Mohr

unread,
Mar 16, 2009, 1:10:09 PM3/16/09
to
Hi,

On Mon, Mar 16, 2009 at 05:19:38PM +0100, Takashi Iwai wrote:
> At Mon, 16 Mar 2009 17:06:35 +0100,
> 私 wrote:
> >
> > > > What are "sliders"?
> > >
> > > Umm, volume level controls.
> >
> > Yes but there are many of such :)
> >
> > More exactly, from the driver perspective, there are no volume
> > controls but only there are control elements with integer values.
> > Do you mean "Capture Volume" control or which one?

Hmm, ok, this needs to be more precise:
In gamix (codec "HDA Intel : Realtek ALC268"), the Capture Volume control.

> > And, is the behavior consistent regardless of the value high, i.e.
> > the key is only whether the values for both channels are identical?
>
> BTW, what if you record with the following definition?
> Put the below to ~/.asoundrc
>
> pcm.imix {
> type plug
> slave.pcm "hw"
> ttable.0.0 0.5
> ttable.0.1 -0.5
> }
>
> and record like
>
> % aplay -Dimix -c1 foo.wav

Does NOT exhibit the "equal sliders == no sound" bug (apart from this sliders
are acting normally, i.e. slider low == no sound), despite being a
"plug" type definition (this is what you wanted to discern, right? ;).

Thanks!

Andreas

Takashi Iwai

unread,
Mar 16, 2009, 1:20:10 PM3/16/09
to
At Mon, 16 Mar 2009 18:00:15 +0100,

Andreas Mohr wrote:
>
> Hi,
>
> On Mon, Mar 16, 2009 at 05:19:38PM +0100, Takashi Iwai wrote:
> > At Mon, 16 Mar 2009 17:06:35 +0100,
> > 私 wrote:
> > >
> > > > > What are "sliders"?
> > > >
> > > > Umm, volume level controls.
> > >
> > > Yes but there are many of such :)
> > >
> > > More exactly, from the driver perspective, there are no volume
> > > controls but only there are control elements with integer values.
> > > Do you mean "Capture Volume" control or which one?
>
> Hmm, ok, this needs to be more precise:
> In gamix (codec "HDA Intel : Realtek ALC268"), the Capture Volume control.

Yeah, that's more understandable :)

BTW, does "Capture Volume" influence on the recording level even for
the built-in mic, right? I'm asking this because the digital mic on
STAC/IDT codecs isn't controlled via "Capture Volume" control that is
bound to an ADC widget. (That's why "Digital Capture Volume" control
exists. It's a value used by alsa-lib softvol plugin for "default"
PCM.)

> > > And, is the behavior consistent regardless of the value high, i.e.
> > > the key is only whether the values for both channels are identical?
> >
> > BTW, what if you record with the following definition?
> > Put the below to ~/.asoundrc
> >
> > pcm.imix {
> > type plug
> > slave.pcm "hw"
> > ttable.0.0 0.5
> > ttable.0.1 -0.5
> > }
> >
> > and record like
> >
> > % aplay -Dimix -c1 foo.wav
>
> Does NOT exhibit the "equal sliders == no sound" bug (apart from this sliders
> are acting normally, i.e. slider low == no sound), despite being a
> "plug" type definition (this is what you wanted to discern, right? ;).

Interesting. This implies that one channel is inverted indeed.
As default the alsa-lib plugin downmixes a stereo stream to a mono
stream simply by left/2 + right/2. The above changes the routing
policy as left/2 - right/2.

So we need to pass some information to change this kind of thing...

But a question still remains; why conversion with sox worked.
Maybe it didn't mix? Or, the code alsa-lib could be buggy...

A simple test would be to just sum all 16bit samples in a stereo
stream file externally. That is, first record a RAW file via

% arecord -Dhw -traw -fdat foo.dat

Then create a mono stream just do 16bit left/2 + right/2 calculation
by any way (a good homework for kids :). Is it also problematic?


thanks,

Takashi

Takashi Iwai

unread,
Mar 16, 2009, 1:40:07 PM3/16/09
to
At Mon, 16 Mar 2009 18:30:00 +0100,
Andreas Mohr wrote:
>
> Hi,

>
> On Mon, Mar 16, 2009 at 06:15:39PM +0100, Takashi Iwai wrote:
> > At Mon, 16 Mar 2009 18:00:15 +0100,
> > Andreas Mohr wrote:
> > >
> > > Hi,
> > >
> > > On Mon, Mar 16, 2009 at 05:19:38PM +0100, Takashi Iwai wrote:
> > > > At Mon, 16 Mar 2009 17:06:35 +0100,
> > > > 私 wrote:
> > > > >
> > > > > > > What are "sliders"?
> > > > > >
> > > > > > Umm, volume level controls.
> > > > >
> > > > > Yes but there are many of such :)
> > > > >
> > > > > More exactly, from the driver perspective, there are no volume
> > > > > controls but only there are control elements with integer values.
> > > > > Do you mean "Capture Volume" control or which one?
> > >
> > > Hmm, ok, this needs to be more precise:
> > > In gamix (codec "HDA Intel : Realtek ALC268"), the Capture Volume control.
> >
> > Yeah, that's more understandable :)
> >
> > BTW, does "Capture Volume" influence on the recording level even for
> > the built-in mic, right? I'm asking this because the digital mic on
> > STAC/IDT codecs isn't controlled via "Capture Volume" control that is
> > bound to an ADC widget. (That's why "Digital Capture Volume" control
> > exists. It's a value used by alsa-lib softvol plugin for "default"
> > PCM.)
>
> Yes, Capture Volume does influence i-Mic level.
> The Digital Capture control, however, doesn't influence level.
> As doesn't the Mic Boost Capture control (probably about e-Mic only?).

The "Digital Capture Volume" has effect only when "default" PCM is used.
If you record via "hw" or "plughw", it's unused.

> > > > > And, is the behavior consistent regardless of the value high, i.e.
> > > > > the key is only whether the values for both channels are identical?
> > > >
> > > > BTW, what if you record with the following definition?
> > > > Put the below to ~/.asoundrc
> > > >
> > > > pcm.imix {
> > > > type plug
> > > > slave.pcm "hw"
> > > > ttable.0.0 0.5
> > > > ttable.0.1 -0.5
> > > > }
> > > >
> > > > and record like
> > > >
> > > > % aplay -Dimix -c1 foo.wav
> > >
> > > Does NOT exhibit the "equal sliders == no sound" bug (apart from this sliders
> > > are acting normally, i.e. slider low == no sound), despite being a
> > > "plug" type definition (this is what you wanted to discern, right? ;).
> >
> > Interesting. This implies that one channel is inverted indeed.
>

> Oh, you mean "inverted" as in "_hardware_ channel which provides opposite
> sample values as compared to the other channel"?

Right. My guess is that the hardware provides left (or right) channel
is multiplied by -1 (yep "inverted" is no correct word choice).

> > As default the alsa-lib plugin downmixes a stereo stream to a mono
> > stream simply by left/2 + right/2. The above changes the routing
> > policy as left/2 - right/2.
>

> That exactly matches my current stream of thought (while reading
> "one channel is inverted" above).


>
> > So we need to pass some information to change this kind of thing...
>

> That's something specific to ALC268 codec setup, right?
> ("ALC268 digital mic == left plus right channel, but inverted setup"?)

No. It's specific to the digital-mic side.

Andreas Mohr

unread,
Mar 16, 2009, 1:40:13 PM3/16/09
to
Hi,

On Mon, Mar 16, 2009 at 06:15:39PM +0100, Takashi Iwai wrote:
> At Mon, 16 Mar 2009 18:00:15 +0100,
> Andreas Mohr wrote:
> >
> > Hi,
> >
> > On Mon, Mar 16, 2009 at 05:19:38PM +0100, Takashi Iwai wrote:
> > > At Mon, 16 Mar 2009 17:06:35 +0100,
> > > 私 wrote:
> > > >
> > > > > > What are "sliders"?
> > > > >
> > > > > Umm, volume level controls.
> > > >
> > > > Yes but there are many of such :)
> > > >
> > > > More exactly, from the driver perspective, there are no volume
> > > > controls but only there are control elements with integer values.
> > > > Do you mean "Capture Volume" control or which one?
> >
> > Hmm, ok, this needs to be more precise:
> > In gamix (codec "HDA Intel : Realtek ALC268"), the Capture Volume control.
>
> Yeah, that's more understandable :)
>
> BTW, does "Capture Volume" influence on the recording level even for
> the built-in mic, right? I'm asking this because the digital mic on
> STAC/IDT codecs isn't controlled via "Capture Volume" control that is
> bound to an ADC widget. (That's why "Digital Capture Volume" control
> exists. It's a value used by alsa-lib softvol plugin for "default"
> PCM.)

Yes, Capture Volume does influence i-Mic level.


The Digital Capture control, however, doesn't influence level.
As doesn't the Mic Boost Capture control (probably about e-Mic only?).

> > > > And, is the behavior consistent regardless of the value high, i.e.


> > > > the key is only whether the values for both channels are identical?
> > >
> > > BTW, what if you record with the following definition?
> > > Put the below to ~/.asoundrc
> > >
> > > pcm.imix {
> > > type plug
> > > slave.pcm "hw"
> > > ttable.0.0 0.5
> > > ttable.0.1 -0.5
> > > }
> > >
> > > and record like
> > >
> > > % aplay -Dimix -c1 foo.wav
> >
> > Does NOT exhibit the "equal sliders == no sound" bug (apart from this sliders
> > are acting normally, i.e. slider low == no sound), despite being a
> > "plug" type definition (this is what you wanted to discern, right? ;).
>
> Interesting. This implies that one channel is inverted indeed.

Oh, you mean "inverted" as in "_hardware_ channel which provides opposite


sample values as compared to the other channel"?

> As default the alsa-lib plugin downmixes a stereo stream to a mono


> stream simply by left/2 + right/2. The above changes the routing
> policy as left/2 - right/2.

That exactly matches my current stream of thought (while reading


"one channel is inverted" above).

> So we need to pass some information to change this kind of thing...

That's something specific to ALC268 codec setup, right?


("ALC268 digital mic == left plus right channel, but inverted setup"?)

> But a question still remains; why conversion with sox worked.


> Maybe it didn't mix? Or, the code alsa-lib could be buggy...
>
> A simple test would be to just sum all 16bit samples in a stereo
> stream file externally. That is, first record a RAW file via
>
> % arecord -Dhw -traw -fdat foo.dat
>
> Then create a mono stream just do 16bit left/2 + right/2 calculation
> by any way (a good homework for kids :). Is it also problematic?

OK, I know what you're up to, I'll do this external proof ASAP,
will take a couple more minutes.

Andreas

Andreas Mohr

unread,
Mar 16, 2009, 2:10:11 PM3/16/09
to

I just tried connecting a headset and switching to E-Mic.
What I can say is:
- opposite levels does NOT happen there (E-Mic is "analog micro"-based, right?)
- leaving E-Mic unplugged will actually record from i-Mic (due to properly
working EAPD mechanism, right?)


BTW, the output (of arecord -Dplughw:0 -c2 -traw -fdat foo.wav) _does_ have
inverted channels:

00000130 2A 02 D2 FD 65 02 A5 FD 10 00 E7 FF 99 FF 72 00 *...e.........r.
00000140 53 FE A7 01 ED FF 12 00 4F FF A6 00 86 00 81 FF S.......O.......
... and so on in the entire file ...


One question still: is this a hardware defect (i.e. could this possibly
be swapped cables of the microphone connector in this model or so?
Not plausible but...), or is this an existing property
of the HDA's dig-mic base? You indicated it's the latter I think...

Andreas

Takashi Iwai

unread,
Mar 16, 2009, 4:40:13 PM3/16/09
to
At Mon, 16 Mar 2009 19:06:38 +0100,

The record from mic-jack is via analog path. The phase-inversion
appears only for digital-mic, AFAIK.

> BTW, the output (of arecord -Dplughw:0 -c2 -traw -fdat foo.wav) _does_ have
> inverted channels:
>
> 00000130 2A 02 D2 FD 65 02 A5 FD 10 00 E7 FF 99 FF 72 00 *...e.........r.
> 00000140 53 FE A7 01 ED FF 12 00 4F FF A6 00 86 00 81 FF S.......O.......
> ... and so on in the entire file ...
>
>
> One question still: is this a hardware defect (i.e. could this possibly
> be swapped cables of the microphone connector in this model or so?
> Not plausible but...), or is this an existing property
> of the HDA's dig-mic base? You indicated it's the latter I think...

My guess is that it's a hardware implementation.
Maybe for the noise suppression via mic array.

The question is whether the left / right channels recorded from
digital mic are really raw data, or they are for modified data
(for differential, etc)... It's hard to guess without the actual
data.


Takashi

Andreas Mohr

unread,
Mar 16, 2009, 5:30:15 PM3/16/09
to
Hi,

On Mon, Mar 16, 2009 at 09:28:39PM +0100, Takashi Iwai wrote:
> At Mon, 16 Mar 2009 19:06:38 +0100,
> Andreas Mohr wrote:
> > I just tried connecting a headset and switching to E-Mic.
> > What I can say is:
> > - opposite levels does NOT happen there (E-Mic is "analog micro"-based, right?)
> > - leaving E-Mic unplugged will actually record from i-Mic (due to properly
> > working EAPD mechanism, right?)
>
> The record from mic-jack is via analog path. The phase-inversion
> appears only for digital-mic, AFAIK.

Thought so.

> > One question still: is this a hardware defect (i.e. could this possibly
> > be swapped cables of the microphone connector in this model or so?
> > Not plausible but...), or is this an existing property
> > of the HDA's dig-mic base? You indicated it's the latter I think...
>
> My guess is that it's a hardware implementation.
> Maybe for the noise suppression via mic array.

Not sure what this means.

> The question is whether the left / right channels recorded from
> digital mic are really raw data, or they are for modified data
> (for differential, etc)... It's hard to guess without the actual
> data.

I don't quite follow you here. Is there anything I could do about this?

Thanks,

Andreas

Maxim Levitsky

unread,
Mar 16, 2009, 9:00:14 PM3/16/09
to


What about exposing the i-mic as a mono only device to userspace?
It is mono after all?

Best regards,
Maxim Levitsky

Takashi Iwai

unread,
Mar 17, 2009, 4:00:10 AM3/17/09
to
At Mon, 16 Mar 2009 22:22:27 +0100,

The mic array on a laptop is used for beam forming and noise
suppressions. These require the software manipulation, of course.
The question is what kind of data is read from the hardware. Thus,
providing the raw streams for both mic inputs makes sense.

Obviously the stream read from the codec chip is a PCM while usually
the digital mic gives the output as PDM. So PDM -> PCM isn't needed
here. But, still a question is why a phase inversion in the second
channel. Whether it's intentional (e.g. to make the further
conversion easier) or not.

Would be interesting if you can figure out which digital-mic component
is used on your laptop (and if we can have any chip information by
luck).


Takashi

Takashi Iwai

unread,
Mar 17, 2009, 4:00:22 AM3/17/09
to
At Tue, 17 Mar 2009 02:52:19 +0200,

No, it's a mic-array. And HD-audio cannot handle a mono stream.


Takashi

Andreas Mohr

unread,
Mar 17, 2009, 6:10:07 AM3/17/09
to
Hi,

On Tue, Mar 17, 2009 at 08:57:06AM +0100, Takashi Iwai wrote:
> At Mon, 16 Mar 2009 22:22:27 +0100,
> Andreas Mohr wrote:
> >
> > Hi,
> >
> > On Mon, Mar 16, 2009 at 09:28:39PM +0100, Takashi Iwai wrote:
> > > The question is whether the left / right channels recorded from
> > > digital mic are really raw data, or they are for modified data
> > > (for differential, etc)... It's hard to guess without the actual
> > > data.
> >
> > I don't quite follow you here. Is there anything I could do about this?
>
> The mic array on a laptop is used for beam forming and noise
> suppressions. These require the software manipulation, of course.
> The question is what kind of data is read from the hardware. Thus,
> providing the raw streams for both mic inputs makes sense.

Makes sense indeed.

> Obviously the stream read from the codec chip is a PCM while usually
> the digital mic gives the output as PDM. So PDM -> PCM isn't needed
> here. But, still a question is why a phase inversion in the second
> channel. Whether it's intentional (e.g. to make the further
> conversion easier) or not.
>
> Would be interesting if you can figure out which digital-mic component
> is used on your laptop (and if we can have any chip information by
> luck).

Well, as some manufacturers/types of digital microphones I found Akustica
(AKU 1126 / 2000 / 2001 / 2002 / 2004 / 2103), Analog Devices (ADMP421), National Semiconductor
(digital microphones, amplifiers LMV1024, LMV1026) [1], [2], [3] and
Andrea Digital Array Microphones.

ALC268 specs [4] say that they actually support interfacing
LMV1024/1026, SPD0205ND (what the heck is this one?), AKU2000.

Umm wait, Aspire One has ALC269. ALC269 datasheet doesn't say anything
about microphone manufacturers.

Note that eeepc models 901++ have ALC269 as well
and - surprise, surprise - an inverted noise cancellation issue as well!!!!!:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/331130

"Dreamcom 10 Laptop" [7]: " integrated Realtek HD audio processor, two
built-in Akustica digital microphones and two built-in stereo speakers"

This was the only reference up and down that I could find to _any_
notebook's microphone manufacturer listing. I suspect that
Aspire One has an Akustica microphone array as well since Akustica
seems to be the leading brand (hmm, any ideas about where the
second microphone is located if at all existing, but it must exist!!?
- probably at the front bottom?).
Note that I found that the 16bit inverted data is NOT exactly a sum
of 0x10000, IOW those _are_ two _separate_, inverted streams of audio data
(for noise cancellation somehow I guess).
OH WAIT!! If most Acer models have _both_ microphones at the screen
bezel (left and right side) yet Aspire One has them (as I'd guess) at
the top of the bezel (known) and at the front bottom, then this would
mean - hold your breath - that the microphone array's physical properties
(regarding noise cancellation) are moved by 90 degrees,
possibly exactly explaining the malfunctioning (this would explain why
Aspire One and eeepcs have issues whereas other Aspire models
probably don't have them!?!?).
Hmm OTOH providing an audio source from somewhere on the
left side / right side of the netbook doesn't suddenly provide any audio,
thus it's probably a nice theory ;)
But OTOH the fact remains that those netbooks have a drastic microphone
geometry design change versus the normal Acer notebooks, thus it likely is
the reason for this issue somehow, somewhere.


Another very widely used brochure phrase was
"Acer PureZone technology with two built-in stereo microphones featuring
beam forming, echo cancellation, and noise suppression technologies"
I couldn't locate more pointers to details here though.


Insightful Apple OS X ALC269 adaptation descriptions: [5].

Windows Vista (ick!) microphone array discussions: [6].


[1]. http://www.national.com/nationaledge/apr03/article.html (background explanations!)
[2]. https://www.national.com/appinfo/amps/microphone.html
[3]. http://www.national.com/GER/news/item/1,4300,50,00.html
[4]. https://nmso.mdg.ca/specsheets/Intel_ALC268_Sound.pdf
[5]. http://ipis-osx.wikidot.com/internal-sound
[6]. http://windowsteamblog.com/blogs/windowsvista/archive/2007/11/09/microphone-arrays-digital-microphones.aspx
[7]. http://www.lcr-europe.org/meter/12/stereo+speaker.html


Andreas

Andreas Mohr

unread,
Mar 17, 2009, 6:40:10 AM3/17/09
to
On Tue, Mar 17, 2009 at 11:05:00AM +0100, Andreas Mohr wrote:
> "Dreamcom 10 Laptop" [7]: " integrated Realtek HD audio processor, two
> built-in Akustica digital microphones and two built-in stereo speakers"
>
> This was the only reference up and down that I could find to _any_
> notebook's microphone manufacturer listing. I suspect that
> Aspire One has an Akustica microphone array as well since Akustica
> seems to be the leading brand (hmm, any ideas about where the
> second microphone is located if at all existing, but it must exist!!?
> - probably at the front bottom?).

NOPE. Aspire One most definitely has a Fortemedia SAM (small array
microphone) due to this output:
http://sites.google.com/site/kengell/acer-aspire-one---dmesg

"
...
ForteMedia SAM-Soft Library Loaded!

ALC INIT
...
"

I had already wanted to add the mention of Fortemedia as microphone
manufacturer (forgot this last time), then I researched more and found it.

Fortemedia device names include FM2018-380, not sure yet which one is in
Aspire One.

http://www.fortemedia.com/products/index.htm
( especially http://www.fortemedia.com/products/fm1182.htm )

Andreas Mohr

unread,
Mar 17, 2009, 6:50:13 AM3/17/09
to
On Tue, Mar 17, 2009 at 11:38:45AM +0100, Andreas Mohr wrote:
> NOPE. Aspire One most definitely has a Fortemedia SAM (small array
> microphone) due to this output:
> http://sites.google.com/site/kengell/acer-aspire-one---dmesg
>
> "
> ...
> ForteMedia SAM-Soft Library Loaded!
>
> ALC INIT
> ...
> "
>
> I had already wanted to add the mention of Fortemedia as microphone
> manufacturer (forgot this last time), then I researched more and found it.
>
> Fortemedia device names include FM2018-380, not sure yet which one is in
> Aspire One.
>
> http://www.fortemedia.com/products/index.htm
> ( especially http://www.fortemedia.com/products/fm1182.htm )

http://www.wpgholdings.com/event/S/SACg_04_ForteMedia_SAM.pdf
mentions "FM201x" and www.sacg.com.tw (this one could be useful!).
Searching Google "FM201[0-9] Fortemedia" comes up with FM2010 and
FM2018 and thus
http://www.hengdasheng.com.cn/uploadfile/391/cfile/2008102414057847.pdf
which is a relatively informative datasheet.

Takashi Iwai

unread,
Mar 17, 2009, 7:30:13 AM3/17/09
to
At Tue, 17 Mar 2009 11:47:55 +0100,

Andreas Mohr wrote:
>
> On Tue, Mar 17, 2009 at 11:38:45AM +0100, Andreas Mohr wrote:
> > NOPE. Aspire One most definitely has a Fortemedia SAM (small array
> > microphone) due to this output:
> > http://sites.google.com/site/kengell/acer-aspire-one---dmesg
> >
> > "
> > ...
> > ForteMedia SAM-Soft Library Loaded!
> >
> > ALC INIT
> > ...
> > "
> >
> > I had already wanted to add the mention of Fortemedia as microphone
> > manufacturer (forgot this last time), then I researched more and found it.
> >
> > Fortemedia device names include FM2018-380, not sure yet which one is in
> > Aspire One.
> >
> > http://www.fortemedia.com/products/index.htm
> > ( especially http://www.fortemedia.com/products/fm1182.htm )
>
> http://www.wpgholdings.com/event/S/SACg_04_ForteMedia_SAM.pdf
> mentions "FM201x" and www.sacg.com.tw (this one could be useful!).
> Searching Google "FM201[0-9] Fortemedia" comes up with FM2010 and
> FM2018 and thus
> http://www.hengdasheng.com.cn/uploadfile/391/cfile/2008102414057847.pdf
> which is a relatively informative datasheet.

I'm not sure whether FM2018 is on a netbook. Rather my guess is it's
a digital-mic component by FortMedia together with their software
library for SAM handling.


BTW, a simple "fix" for the mono capture problem, you can patch
the config file for HD-audio in alsa-lib like below. Then the first
channel will be used for mono capture instead of averages.
Give it a try.

(But, this won't fix programs that prefer "hw" access such as
pulseaudio, of course.)


Takashi

---
diff --git a/src/conf/cards/HDA-Intel.conf b/src/conf/cards/HDA-Intel.conf
index 800281e..d3ac002 100644
--- a/src/conf/cards/HDA-Intel.conf
+++ b/src/conf/cards/HDA-Intel.conf
@@ -57,6 +57,8 @@ HDA-Intel.pcm.default {
max_dB 30.0
resolution 121
}
+ # to avoid possible phase inversions with digital mics
+ route_policy copy
}
hint.device 0

Maxim Levitsky

unread,
Mar 17, 2009, 7:40:09 AM3/17/09
to
No problem.
Lets just lie to usespace that it is mono, in kernel driver can pick one
of channels?

Maybe this is an array, but this doesn't explain the 'quality' of it.
It is so low (in windows too).

Best regards,
Maxim Levitsky

Takashi Iwai

unread,
Mar 17, 2009, 9:20:10 AM3/17/09
to
At Tue, 17 Mar 2009 13:30:12 +0200,

No, the hardware provides only the stereo streams, so the driver,
too.

The downmixing is the job of the user-space. For example, try the
patch to alsa-lib I sent in my previous post.

> Maybe this is an array, but this doesn't explain the 'quality' of it.
> It is so low (in windows too).

Properly using the mic-array would reduce the noise fairly well.
XP has no mic-array support, IIRC.

Of course, it's possible that Aspire* have badly equipped mic
arrays that don't help much noise suppression...


Takashi

Andreas Mohr

unread,
Mar 17, 2009, 12:20:13 PM3/17/09
to
Hi,

On Tue, Mar 17, 2009 at 12:25:13PM +0100, Takashi Iwai wrote:
> At Tue, 17 Mar 2009 11:47:55 +0100,
> Andreas Mohr wrote:
> > > Fortemedia device names include FM2018-380, not sure yet which one is in
> > > Aspire One.
> > >
> > > http://www.fortemedia.com/products/index.htm
> > > ( especially http://www.fortemedia.com/products/fm1182.htm )
> >
> > http://www.wpgholdings.com/event/S/SACg_04_ForteMedia_SAM.pdf
> > mentions "FM201x" and www.sacg.com.tw (this one could be useful!).
> > Searching Google "FM201[0-9] Fortemedia" comes up with FM2010 and
> > FM2018 and thus
> > http://www.hengdasheng.com.cn/uploadfile/391/cfile/2008102414057847.pdf
> > which is a relatively informative datasheet.
>
> I'm not sure whether FM2018 is on a netbook. Rather my guess is it's
> a digital-mic component by FortMedia together with their software
> library for SAM handling.

I had the same thoughts later. Since they use an extensive SAM handling
library, there probably isn't such a chip, otherwise they probably
wouldn't need it ;)
Could you thus implement a nice beam-forming sound evaluation SAM
library for ALSA pretty pretty please? ;)
...or, is that SAM library available to us given that it exists in the
factory install? If so, then one should probably make good use of it...

> BTW, a simple "fix" for the mono capture problem, you can patch
> the config file for HD-audio in alsa-lib like below. Then the first
> channel will be used for mono capture instead of averages.
> Give it a try.
>
> (But, this won't fix programs that prefer "hw" access such as
> pulseaudio, of course.)

I'm not *quite* sure whether this is really what you meant,
but I patched /usr/share/alsa/cards/HDA-Intel.conf (libasound2
1.0.18-1ubuntu7) in exactly this way and then did
arecord -Dplughw:0 -fdat -c1 test.wav; aplay test.wav
but well, with equal slider positions there was no audio again.

Andreas

Takashi Iwai

unread,
Mar 17, 2009, 4:50:11 PM3/17/09
to
At Tue, 17 Mar 2009 17:18:28 +0100,

Andreas Mohr wrote:
>
> Hi,
>
> On Tue, Mar 17, 2009 at 12:25:13PM +0100, Takashi Iwai wrote:
> > At Tue, 17 Mar 2009 11:47:55 +0100,
> > Andreas Mohr wrote:
> > > > Fortemedia device names include FM2018-380, not sure yet which one is in
> > > > Aspire One.
> > > >
> > > > http://www.fortemedia.com/products/index.htm
> > > > ( especially http://www.fortemedia.com/products/fm1182.htm )
> > >
> > > http://www.wpgholdings.com/event/S/SACg_04_ForteMedia_SAM.pdf
> > > mentions "FM201x" and www.sacg.com.tw (this one could be useful!).
> > > Searching Google "FM201[0-9] Fortemedia" comes up with FM2010 and
> > > FM2018 and thus
> > > http://www.hengdasheng.com.cn/uploadfile/391/cfile/2008102414057847.pdf
> > > which is a relatively informative datasheet.
> >
> > I'm not sure whether FM2018 is on a netbook. Rather my guess is it's
> > a digital-mic component by FortMedia together with their software
> > library for SAM handling.
>
> I had the same thoughts later. Since they use an extensive SAM handling
> library, there probably isn't such a chip, otherwise they probably
> wouldn't need it ;)
> Could you thus implement a nice beam-forming sound evaluation SAM
> library for ALSA pretty pretty please? ;)

A patch please :)

> ...or, is that SAM library available to us given that it exists in the
> factory install? If so, then one should probably make good use of it...

An easy one would be a relatively simple algorithm, but I don't know
whether any free library code. Better to ask on LAD.

> > BTW, a simple "fix" for the mono capture problem, you can patch
> > the config file for HD-audio in alsa-lib like below. Then the first
> > channel will be used for mono capture instead of averages.
> > Give it a try.
> >
> > (But, this won't fix programs that prefer "hw" access such as
> > pulseaudio, of course.)
>
> I'm not *quite* sure whether this is really what you meant,
> but I patched /usr/share/alsa/cards/HDA-Intel.conf (libasound2
> 1.0.18-1ubuntu7) in exactly this way and then did
> arecord -Dplughw:0 -fdat -c1 test.wav; aplay test.wav
> but well, with equal slider positions there was no audio again.

Don't use -Dplughw:0. Then the default setup will be used.

% arecord -fdat -c1 test.wav


Takashi

Andreas Mohr

unread,
Mar 18, 2009, 5:10:13 AM3/18/09
to
Hi,

On Tue, Mar 17, 2009 at 09:32:16PM +0100, Takashi Iwai wrote:
> At Tue, 17 Mar 2009 17:18:28 +0100,
> Andreas Mohr wrote:
> > I had the same thoughts later. Since they use an extensive SAM handling
> > library, there probably isn't such a chip, otherwise they probably
> > wouldn't need it ;)
> > Could you thus implement a nice beam-forming sound evaluation SAM
> > library for ALSA pretty pretty please? ;)
>
> A patch please :)

Not at the moment at least, sorry. But that would make for a nice
little (student?) project (or not so little).

> Don't use -Dplughw:0. Then the default setup will be used.
>
> % arecord -fdat -c1 test.wav

Tried that, didn't help. /usr/share/alsa/cards/HDA-Intel.conf still
contains the patch, but equal Capture Volume sliders still silenced
audio input, whereas non-equal worked. Hmm.

Andreas

Takashi Iwai

unread,
Mar 18, 2009, 5:30:14 AM3/18/09
to
At Wed, 18 Mar 2009 10:05:07 +0100,

Andreas Mohr wrote:
>
> Hi,
>
> On Tue, Mar 17, 2009 at 09:32:16PM +0100, Takashi Iwai wrote:
> > At Tue, 17 Mar 2009 17:18:28 +0100,
> > Andreas Mohr wrote:
> > > I had the same thoughts later. Since they use an extensive SAM handling
> > > library, there probably isn't such a chip, otherwise they probably
> > > wouldn't need it ;)
> > > Could you thus implement a nice beam-forming sound evaluation SAM
> > > library for ALSA pretty pretty please? ;)
> >
> > A patch please :)
>
> Not at the moment at least, sorry. But that would make for a nice
> little (student?) project (or not so little).
>
> > Don't use -Dplughw:0. Then the default setup will be used.
> >
> > % arecord -fdat -c1 test.wav
>
> Tried that, didn't help. /usr/share/alsa/cards/HDA-Intel.conf still
> contains the patch, but equal Capture Volume sliders still silenced
> audio input, whereas non-equal worked. Hmm.

What is the output with -v option?


Takashi

Andreas Mohr

unread,
Mar 20, 2009, 3:00:18 PM3/20/09
to
Hi,

On Wed, Mar 18, 2009 at 10:19:53AM +0100, Takashi Iwai wrote:
> At Wed, 18 Mar 2009 10:05:07 +0100,
> Andreas Mohr wrote:
> >
> > Hi,
> >
> > On Tue, Mar 17, 2009 at 09:32:16PM +0100, Takashi Iwai wrote:
> > > Don't use -Dplughw:0. Then the default setup will be used.
> > >
> > > % arecord -fdat -c1 test.wav
> >
> > Tried that, didn't help. /usr/share/alsa/cards/HDA-Intel.conf still
> > contains the patch, but equal Capture Volume sliders still silenced
> > audio input, whereas non-equal worked. Hmm.
>
> What is the output with -v option?

Sorry for the delay!

$ arecord -fdat -c1 -v test.wav; aplay test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 1
stop_threshold : 24000
silence_threshold: 0
silence_size : 0
boundary : 1572864000
^CAborted by signal Interrupt...
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
andi@andinet:/tmp$


Hmm. Note the pulseaudio stuff above...


I did verify that this test run using -v did exhibit failure again.

Thanks,

Andreas

Takashi Iwai

unread,
Mar 20, 2009, 4:40:09 PM3/20/09
to
At Fri, 20 Mar 2009 19:56:40 +0100,

Yes, that's the very reason. If you don't PA and avoid the
default configuration override (e.g. defined in /etc/asound.conf)
my patch should work.


Takashi

Andreas Mohr

unread,
Mar 22, 2009, 9:00:17 AM3/22/09
to
Hi,

Sorry, but how would I achieve "don't PA"?
I've tried some Ubuntu suggestions
(e.g. http://ubuntuforums.org/showthread.php?t=852518 ; didn't work,
it's Jaunty here),
I tried asoundconf (un)set-pulseaudio (~/.asoundrc contents looked ok
then but didn't really help),
I tried pasuspender -- arecord -fdat -c1 -v test.wav
I always ended up with "ALSA <-> PulseAudio PCM I/O Plugin" mode.
(I didn't even attempt the ultimate solution, removing all traces of
PA packages, since that would be a ridiculous thing to do)
gnome-sound-properties didn't seem overly helpful either...
(Sound capture was already set as "ALSA")

If things are that impractical, then there needs to be another builtin way
to always have the microphone output end up correct, automatically,
instead of having to go through incredible convolutions to try to
access the raw ALSA device (which would probably provide a correct
mic stream) directly, by default.

Or, to put it another way, in many cases the default ALSA device
wouldn't be used (by sound layers or apps or whatever),
thus the patch above wouldn't work there if I'm not mistaken,
thus there needs to be a different way to fix the microphone.

Or, to have it even more condensed, the more you have to fiddle to make
the patch work, the more distance gets between you and the usual Linux
distribution use case.

Any ideas or suggestions?

Thanks,

Andreas

Takashi Iwai

unread,
Mar 23, 2009, 3:00:18 AM3/23/09
to
At Sun, 22 Mar 2009 13:55:17 +0100,

I'm no Ubuntu user, so no idea.

Takashi

0 new messages