linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: dmasound_pmac (2.4.x{,-benh}) does not restore mixer during PM-wake
  2003-09-10 21:15 dmasound_pmac (2.4.x{,-benh}) does not restore mixer during PM-wake Rene Rebe
@ 2003-09-10 19:19 ` Benjamin Herrenschmidt
  2003-09-10 22:26   ` Rene Rebe
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2003-09-10 19:19 UTC (permalink / raw)
  To: Rene Rebe; +Cc: linux-kernel mailing list


> The code in tas3004_leave_sleep() looks ok so ... any idea (maybe I
> need to add a printk do test if it is really called?)?

Either that or we need some delay after powering the chip back
up and before we can write to its mixer ?

ben.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* dmasound_pmac (2.4.x{,-benh}) does not restore mixer during PM-wake
@ 2003-09-10 21:15 Rene Rebe
  2003-09-10 19:19 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Rene Rebe @ 2003-09-10 21:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: benh

Hi,

on an iBook, currently running 2.4.22-benh2, the dmasound_pmac does
not restore the mixer setting during PowerManagement resume. I need to
use e.g. umix or whatever to reset it - but a simple change on a mixer
value is enought to set a useful value.

The device in use:

Found KeyWest i2c on "uni-n", 2 channels, stepping: 4 bits
i2c-core.o: adapter mac-io 0 registered as adapter 2.
Found KeyWest i2c on "mac-io", 1 channel, stepping: 4 bits
tas driver [TAS3004 driver V 0.3])
using i2c address: 0x35 from device-tree
i2c-core.o: driver TAS3004 driver V 0.3 registered.
i2c-core.o: client [tas Digital Equalizer] registered to adapter [mac-io 0](pos. 0).
Audio jack plugged, muting speakers.
AE-Init snapper mixer
PowerMac Snapper  DMA sound driver rev 016 installed
Core driver edition 01.06 : PowerMac Built-in Sound driver edition 00.07
Write will use    4 fragments of   32768 bytes as default

The code in tas3004_leave_sleep() looks ok so ... any idea (maybe I
need to add a printk do test if it is really called?)?

Sincerely yours,
  René Rebe

--  
René Rebe - Europe/Germany/Berlin
  rene@rocklinux.org rene.rebe@gmx.net
http://www.rocklinux.org http://www.rocklinux.net/people/rene
http://gsmp.tfh-berlin.de/gsmp http://gsmp.tfh-berlin.de/rene


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dmasound_pmac (2.4.x{,-benh}) does not restore mixer during PM-wake
  2003-09-10 19:19 ` Benjamin Herrenschmidt
@ 2003-09-10 22:26   ` Rene Rebe
  2003-09-11  6:35     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Rene Rebe @ 2003-09-10 22:26 UTC (permalink / raw)
  To: benh; +Cc: linux-kernel

Hi,

On: Wed, 10 Sep 2003 21:19:25 +0200,
    Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> 
> > The code in tas3004_leave_sleep() looks ok so ... any idea (maybe I
> > need to add a printk do test if it is really called?)?
> 
> Either that or we need some delay after powering the chip back
> up and before we can write to its mixer ?

Ok, here we go:

...
PCI: Enabling bus mastering for device 10:18.0
host/usb-ohci.c: USB continue: usb-10:18.0 from host wakeup
PCI: Enabling bus mastering for device 10:19.0
host/usb-ohci.c: USB continue: usb-10:19.0 from host wakeup
eth0: resuming
adb: starting probe task...
adb devices: [2]: 2 c4 [3]: 3 1 [7]: 7 1f
ADB keyboard at 2, handler 1
ADB mouse at 3, handler set to 4 (trackpad)
adb: finished probe task...
RxR: 1
RxR: 2
tas: I2C byte write failed
udio jack plugged, muting speakers.
eth0: Link is up at 100 Mbps, half-duplex.
...
#
(I overread the "tas: I2C byte write failed" before ...)

Where I instrumented the code with:

static int
tas3004_leave_sleep(struct tas3004_data_t *self)
{
        unsigned char mcr = (1<<6)+(2<<4)+(2<<2);

        printk("RxR: 1\n");

        if (!self)
                return -1;

        printk("RxR: 2\n");

        /* Make sure something answers on the i2c bus */
        if (tas3004_write_register(self, TAS3004_REG_MCR, &mcr,
            WRITE_NORMAL | FORCE_WRITE) < 0)
                return -1;

        printk("RxR: 3\n");

so hm?!? - is the wakeup order of the devices incorrect (i2c needs to
be before damsound_pmac ...)?

> ben.

Sincerely yours,
  René Rebe
    - ROCK Linux stable release maintainer

--  
René Rebe - Europe/Germany/Berlin
  rene@rocklinux.org rene.rebe@gmx.net
http://www.rocklinux.org http://www.rocklinux.net/people/rene
http://gsmp.tfh-berlin.de/gsmp http://gsmp.tfh-berlin.de/rene


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dmasound_pmac (2.4.x{,-benh}) does not restore mixer during PM-wake
  2003-09-10 22:26   ` Rene Rebe
@ 2003-09-11  6:35     ` Benjamin Herrenschmidt
  2003-09-11 17:19       ` Rene Rebe
  2003-09-25 18:01       ` Rene Rebe
  0 siblings, 2 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2003-09-11  6:35 UTC (permalink / raw)
  To: Rene Rebe; +Cc: linux-kernel mailing list


> so hm?!? - is the wakeup order of the devices incorrect (i2c needs to
> be before damsound_pmac ...)?

The i2c bus isn't suspended during sleep... I don't know for sure
what's up, I'll investigate.

Ben.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dmasound_pmac (2.4.x{,-benh}) does not restore mixer during PM-wake
  2003-09-11  6:35     ` Benjamin Herrenschmidt
@ 2003-09-11 17:19       ` Rene Rebe
  2003-09-25 18:01       ` Rene Rebe
  1 sibling, 0 replies; 7+ messages in thread
From: Rene Rebe @ 2003-09-11 17:19 UTC (permalink / raw)
  To: benh; +Cc: linux-kernel

Hi,

On: Thu, 11 Sep 2003 08:35:57 +0200,
    Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> > so hm?!? - is the wakeup order of the devices incorrect (i2c needs to
> > be before damsound_pmac ...)?
> 
> The i2c bus isn't suspended during sleep... I don't know for sure
> what's up, I'll investigate.

I added a schedule_timeout without success ... - should I check if
self is correct? Or any other idea?

Sincerely yours,
  René

--  
René Rebe - Europe/Germany/Berlin
  rene@rocklinux.org rene.rebe@gmx.net
http://www.rocklinux.org http://www.rocklinux.net/people/rene
http://gsmp.tfh-berlin.de/gsmp http://gsmp.tfh-berlin.de/rene


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dmasound_pmac (2.4.x{,-benh}) does not restore mixer during PM-wake
  2003-09-11  6:35     ` Benjamin Herrenschmidt
  2003-09-11 17:19       ` Rene Rebe
@ 2003-09-25 18:01       ` Rene Rebe
  2003-09-25 18:43         ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 7+ messages in thread
From: Rene Rebe @ 2003-09-25 18:01 UTC (permalink / raw)
  To: benh; +Cc: linux-kernel

Hi,

On: Thu, 11 Sep 2003 08:35:57 +0200,
    Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> 
> > so hm?!? - is the wakeup order of the devices incorrect (i2c needs to
> > be before damsound_pmac ...)?
> 
> The i2c bus isn't suspended during sleep... I don't know for sure
> what's up, I'll investigate.

Have you found some time to look into this issue in more detail? I
already tried a tiny timeout wihtout help - maybe you got an idea?

> Ben.

Sincerely yours,
  René Rebe

--  
René Rebe - Europe/Germany/Berlin
  rene@rocklinux.org rene@rocklinux-consulting.de
http://www.rocklinux.org http://www.rocklinux-consulting.de
http://gsmp.rocklinux-consulting.de/ http://gsmp.tfh-berlin.de/rene


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: dmasound_pmac (2.4.x{,-benh}) does not restore mixer during PM-wake
  2003-09-25 18:01       ` Rene Rebe
@ 2003-09-25 18:43         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2003-09-25 18:43 UTC (permalink / raw)
  To: Rene Rebe; +Cc: linux-kernel mailing list

On Thu, 2003-09-25 at 20:01, Rene Rebe wrote:
> Hi,
> 
> On: Thu, 11 Sep 2003 08:35:57 +0200,
>     Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > 
> > > so hm?!? - is the wakeup order of the devices incorrect (i2c needs to
> > > be before damsound_pmac ...)?
> > 
> > The i2c bus isn't suspended during sleep... I don't know for sure
> > what's up, I'll investigate.
> 
> Have you found some time to look into this issue in more detail? I
> already tried a tiny timeout wihtout help - maybe you got an idea?

My current bk 2.4 contains a reworked i2c driver that might help...

Ben.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-09-25 18:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-10 21:15 dmasound_pmac (2.4.x{,-benh}) does not restore mixer during PM-wake Rene Rebe
2003-09-10 19:19 ` Benjamin Herrenschmidt
2003-09-10 22:26   ` Rene Rebe
2003-09-11  6:35     ` Benjamin Herrenschmidt
2003-09-11 17:19       ` Rene Rebe
2003-09-25 18:01       ` Rene Rebe
2003-09-25 18:43         ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).