9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] usb/usbaudio and output speed?
@ 2002-10-25 15:56 Russ Cox
  0 siblings, 0 replies; 16+ messages in thread
From: Russ Cox @ 2002-10-25 15:56 UTC (permalink / raw)
  To: 9fans

	term% usb/usbd
	term% usb/usbaudio
	term% usb/usbaudio	#  Note, invoking usb/usbaudio twice.
	term% kill usbaudio | rc

This is a problem in the usb driver.

It still doesn't the explain the other
ps hangs I've seen.  In general, ps hangs
because some proc's p->debug gets locked
and never unlocked.  Then opening that
proc's status file hangs.

In this case, postnote got confused because
a rendez structure got freed while a process
was still sleeping on it.  The result was that
postnote just keeps looping staring at this
freed memory, which will never again look like
an available lock.  Postnote is sitting on p->debug
while doing this.  Usually the looping doesn't
happen or loops once just to deal with transient
lock ordering problems.  It can't really do much
when it's been pointed at bad memory.

If anyone has any other reliable recipes for
making ps hang, I'm still all ears.  The
hangs I've seen had nothing to do with usb.

Russ


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [9fans] usb/usbaudio and output speed?
@ 2002-10-24 17:31 nigel
  2002-10-24 17:37 ` Dan Cross
  0 siblings, 1 reply; 16+ messages in thread
From: nigel @ 2002-10-24 17:31 UTC (permalink / raw)
  To: 9fans

> Van Halen?  Oh man; you've got to get back to Bondi and hang with Bruce
> some more.
>
> 	- Dan C.

Asbury Park surely?



^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [9fans] usb/usbaudio and output speed?
@ 2002-10-23 20:12 Russ Cox
  2002-10-23 21:40 ` Dan Cross
  2002-10-24 13:49 ` Dan Cross
  0 siblings, 2 replies; 16+ messages in thread
From: Russ Cox @ 2002-10-23 20:12 UTC (permalink / raw)
  To: 9fans

> at home today (hey, that thing's heavy!).  I'll see if I can get
> it to crash again, and figure out where it's dying.  btw- I
> accidentally started two copies of usbaudio last night, and
> afterwards, `ps' started hanging.  It was a bummer.

If you can reliably make ps hang, please tell me how.
I've seen it happen only three times in the last three
months, and there's never enough information to figure
out exactly how it got into the state.

Russ



^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [9fans] usb/usbaudio and output speed?
@ 2002-10-23  0:40 Russ Cox
  2002-10-23 18:38 ` Dan Cross
  0 siblings, 1 reply; 16+ messages in thread
From: Russ Cox @ 2002-10-23  0:40 UTC (permalink / raw)
  To: 9fans

usb/usbaudio is just simulating /dev/volume for you.
the real settings are accesssed via /dev/audioctl.
it's entirely likely that usbaudio gets the speed simulation
in /dev/volume wrong, since we tend to use only 44100.
the volume file is really a crutch.  it doesn't work well.



^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [9fans] usb/usbaudio and output speed?
@ 2002-10-23  0:00 Russ Cox
  2002-10-23  0:28 ` Dan Cross
  0 siblings, 1 reply; 16+ messages in thread
From: Russ Cox @ 2002-10-23  0:00 UTC (permalink / raw)
  To: 9fans

you use what gets displayed.  /dev/volume
shows speed in hz so you use hz.   the volume
levels are in fact percentages.

/dev/volume speaks the language it understands.
echo -n speed 22050 >/dev/volume does
what you were trying to do.

the behavior you are seeing are very weird,
but probably just bugs in untested code paths.





^ permalink raw reply	[flat|nested] 16+ messages in thread
* [9fans] usb/usbaudio and output speed?
@ 2002-10-22 19:21 Dan Cross
  0 siblings, 0 replies; 16+ messages in thread
From: Dan Cross @ 2002-10-22 19:21 UTC (permalink / raw)
  To: 9fans

Hmm, this is weird.

term% grep speed /dev/volume
speed out 44100
term% echo -n speed out 50 > /dev/volume
term% grep speed /dev/volume
speed out 30000
term% echo -n speed out 100 > /dev/volume
term% grep speed /dev/volume
speed out 55010
term%

I was under the impression that, when setting things like output speed,
one should use percentages of values.  However, 50% of 44100 in real
space certainly isn't 30000.  Is this a bug, or am I just not
understanding how the USB audio device works?  Thanks!

	- Dan C.



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

end of thread, other threads:[~2002-10-25 15:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-25 15:56 [9fans] usb/usbaudio and output speed? Russ Cox
  -- strict thread matches above, loose matches on Subject: below --
2002-10-24 17:31 nigel
2002-10-24 17:37 ` Dan Cross
2002-10-23 20:12 Russ Cox
2002-10-23 21:40 ` Dan Cross
2002-10-24 13:49 ` Dan Cross
2002-10-24 14:27   ` Boyd Roberts
2002-10-24 15:52     ` Aharon Robbins
2002-10-25  4:58       ` Jim Choate
2002-10-24 17:07     ` Dan Cross
2002-10-25  9:04     ` Anthony Mandic
2002-10-23  0:40 Russ Cox
2002-10-23 18:38 ` Dan Cross
2002-10-23  0:00 Russ Cox
2002-10-23  0:28 ` Dan Cross
2002-10-22 19:21 Dan Cross

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).