Port-macppc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: tstile lockups - side note
This needs an audio exper to look at it:
The snapper interrupt spin mutex is passed out to the audio system
via snapper_get_locks().
Then in audiosetinfo() we do
(http://nxr.netbsd.org/xref/src/sys/dev/audio.c#3890):
mutex_enter(sc->sc_intr_lock);
init_error = audio_initbufs(sc);
if (init_error) goto err;
if (sc->sc_pr.blksize != oldpblksize ||
sc->sc_rr.blksize != oldrblksize ||
sc->sc_pustream != oldpus ||
sc->sc_rustream != oldrus)
audio_calcwater(sc);
if ((sc->sc_mode & AUMODE_PLAY) &&
pbus && !sc->sc_pbus)
init_error = audiostartp(sc);
if (!init_error &&
(sc->sc_mode & AUMODE_RECORD) &&
rbus && !sc->sc_rbus)
init_error = audiostartr(sc);
err:
mutex_exit(sc->sc_intr_lock);
so audiostartr() is called with the devices interrupt lock held (which
is also asserted there). Then via hw_if->trigger_input we come to
snapper_trigger_input() -> snapper_set_rate() and then try to set
the volume via tas3004_write() - which does an iic transaction, and boom
we go. As Uebayashi-san mentions, this is a no go in interrupt context.
Now starting recording/playback should not need to do volume
adjustements. I suppose hw->commit_settings()
(http://nxr.netbsd.org/xref/src/sys/dev/audio.c#3878) should already do
that, and is called without the interrupt lock held.
Martin
Home |
Main Index |
Thread Index |
Old Index