Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: snapper does not work on PowerBook5,6



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Oct 17, 2010, at 3:44 PM, Frank Wille wrote:

Umm, what does snapper's interrupts property look like on your
machine? The DMA and the status change interrupt are different types
on mine.

Yes, I think that's the same on all snapper machines:
0000001e 00000001 00000001 00000000 00000002 00000000

I wonder for what this irq 30 is needed? Plugging in headphones is detected
by an additional interrupt (irq 61 in my case).

Argh, I forgot that snapper uses a separate gpio interrupt for headphone detection. So that interrupt is only for error conditions.

Maybe there is no interrupt problem, but a DMA problem? I found the
location
where the freeze happens: It is an infinite loop in dbdma_stop(),
while
waiting for two status flags to indicate DMA is flushed and stopped.

But since dbdma is also used for wdc0 I'm not sure what can be wrong
here.

This is getting weirder and weirder.

Are there any docs about using dbdma for audio? I admit that I don't even understand yet how dbdma knows what to do with the data it is reading. :)

It's hard wired IIRC, the dbdma registers associated with the audio chip are for audio DMA ;)

I just compared the source with OpenBSD. Seems they have already improved dbdma.c to use bus_dma(9). And FreeBSD has a very clean reimplementation of
everything, but I saw no special handling for newer PowerBooks either.

Yeah, macppc predates bus_space. Some drivers have been bus_spacified during ppcoea_renovation but not all of them.

BTW, there was already a posting more than 4 years ago, which describes
similar snapper problems on a PowerBook6,8:
http://mail-index.netbsd.org/port-macppc/2006/02/10/0001.html

He didn't hear sound either, but surprisingly he received a single irq1.

Hmm, I must have missed that.

Try to force the DMA interrupts to be level triggered.

This will give me infinite interrupts. More than I ever wanted. :)
No, I think level-triggered is correct.

At least that verifies that the interrupt is enabled and working. Leaves the question why they don't fire on your hardware - I need to stare at the code for a bit, maybe it's something trivial like having to explicitly clear them before use or something.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBTLxAAcpnzkX8Yg2nAQLRAggAjMs295n635yC2jTA4skouFHh9eDTjz3N
1fMOi7BndyB3VmQSUuxSlfglWJrJTyEYC7U+UZLaEJZ5EjU4DAsrBxQxRuuo+B8v
MDjYxbV0uxuq7+IVOruH6iG8+6ouCPgmL0fDvY7ZcJVvBrsuv9xObJlmMfdstmia
h0tlr4jChnzQB3EGWpe6z9rCBkjh3mlrgqY+VHJ78JIxftW8y88Sr/j79pSwT5Rw
jkDxNJd+2BtOanaBON+g8I8f/MbZG6CpUTdkdrsqccOs6Ia1spZBEzlxBoo45UDH
lwFQ+pS8vkK+yQtibm1iTTRCrpnKlPXxMhF9F4rA80OVu+1hBaWu5g==
=IqCS
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index