9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] bcm-audio
@ 2021-12-02 20:18 adr
  2021-12-02 23:02 ` hiro
  0 siblings, 1 reply; 13+ messages in thread
From: adr @ 2021-12-02 20:18 UTC (permalink / raw)
  To: 9front

Hi,

I saw bcm-audio in extra. I'm going to adapt it to work with the
rpi4 and I'd really appreciate some comment about why it didn't make
it to /sys/src, what are its flaws, what should be improved, etc.

adr.

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

* Re: [9front] bcm-audio
  2021-12-02 20:18 [9front] bcm-audio adr
@ 2021-12-02 23:02 ` hiro
  2021-12-03  0:30   ` Steve Simon
  2021-12-03  1:35   ` adr
  0 siblings, 2 replies; 13+ messages in thread
From: hiro @ 2021-12-02 23:02 UTC (permalink / raw)
  To: 9front

the hardware is the flaw, not the driver.
it's not worth it bec. 1$ usb-audio adaptors sound better than the rpi thing

On 12/2/21, adr <adr@sdf.org> wrote:
> Hi,
>
> I saw bcm-audio in extra. I'm going to adapt it to work with the
> rpi4 and I'd really appreciate some comment about why it didn't make
> it to /sys/src, what are its flaws, what should be improved, etc.
>
> adr.
>

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

* Re: [9front] bcm-audio
  2021-12-02 23:02 ` hiro
@ 2021-12-03  0:30   ` Steve Simon
  2021-12-03  1:43     ` Thaddeus Woskowiak
  2021-12-03  2:13     ` adr
  2021-12-03  1:35   ` adr
  1 sibling, 2 replies; 13+ messages in thread
From: Steve Simon @ 2021-12-03  0:30 UTC (permalink / raw)
  To: 9front


the bcm audio driver only worked with one pi model (the pi1 i think). the pi’s audio hardware is very basic, however the soc is capable of sending i2s to an external dac, whilst being clocked from the dac. sadly it cannot generate a stable clock at 48khz due so the way the dividers work out.

with an external dac and clocks you should get excellent results.

-Steve



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

* Re: [9front] bcm-audio
  2021-12-02 23:02 ` hiro
  2021-12-03  0:30   ` Steve Simon
@ 2021-12-03  1:35   ` adr
  2021-12-03  2:55     ` Thaddeus Woskowiak
  1 sibling, 1 reply; 13+ messages in thread
From: adr @ 2021-12-03  1:35 UTC (permalink / raw)
  To: 9front

On Fri, 3 Dec 2021, hiro wrote:

> the hardware is the flaw, not the driver.

Yeah, pwm audio is not the best, and the earliest boards had just rc
filters with some diodes to protect the output.  The latest have
a buffer (and something else) chip which improve the output.

> it's not worth it bec. 1$ usb-audio adaptors sound better than the rpi thing

Yes but I dont' see code to control volume in nusb/audio/audio.c, only audiofreq and audiodelay.

I will play with that after this.

adr.

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

* Re: [9front] bcm-audio
  2021-12-03  0:30   ` Steve Simon
@ 2021-12-03  1:43     ` Thaddeus Woskowiak
  2021-12-03  2:13     ` adr
  1 sibling, 0 replies; 13+ messages in thread
From: Thaddeus Woskowiak @ 2021-12-03  1:43 UTC (permalink / raw)
  To: 9front

In the past I have used a Dayton Audio DAC01 hooked to a pi3b+ w/pi
lcd that tcp boots and I play FLACs from bandcamp zip files I mount
with zipfs. The zips are stored elsewhere on a FreeBSD server via
sshfs. I haven't used it in a while but I remember it mistakenly being
detected as a keyboard and you had to manually start nusb/audio. It
was fixed not long ago IIRC. Sounded great.

On Thu, Dec 2, 2021 at 7:41 PM Steve Simon <steve@quintile.net> wrote:
>
>
> the bcm audio driver only worked with one pi model (the pi1 i think). the pi’s audio hardware is very basic, however the soc is capable of sending i2s to an external dac, whilst being clocked from the dac. sadly it cannot generate a stable clock at 48khz due so the way the dividers work out.
>
> with an external dac and clocks you should get excellent results.
>
> -Steve
>
>

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

* Re: [9front] bcm-audio
  2021-12-03  0:30   ` Steve Simon
  2021-12-03  1:43     ` Thaddeus Woskowiak
@ 2021-12-03  2:13     ` adr
  1 sibling, 0 replies; 13+ messages in thread
From: adr @ 2021-12-03  2:13 UTC (permalink / raw)
  To: 9front

On Fri, 3 Dec 2021, Steve Simon wrote:
> the bcm audio driver only worked with one pi model (the pi1 i think).

For what I've seen the dma controller interface is almost the same
(same base addrs, offsets, etc) with some enhanced channels (DMA4).
I'm not sure which are those and which are lite although, just poke
the debug regs?

The pi4 has now two pwm controllers, the jack is connected to gpios
40 and 41 (if I'm correct) and the code has to be changed to use
pwm1 when the soc is BCM2711.


> the pi?s audio hardware is very basic, however the soc is capable
> of sending i2s to an external dac, whilst being clocked from the
> dac.

Yes, I think this is the best option for quality audio and I'm sure
I'll play with this in the future, but I'd like to be able to use
the onboard audio output also.

I'll share with the list if I make it work.

Regards,
adr.

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

* Re: [9front] bcm-audio
  2021-12-03  1:35   ` adr
@ 2021-12-03  2:55     ` Thaddeus Woskowiak
  2021-12-03  5:04       ` Eli Cohen
  0 siblings, 1 reply; 13+ messages in thread
From: Thaddeus Woskowiak @ 2021-12-03  2:55 UTC (permalink / raw)
  To: 9front

> Yeah, pwm audio is not the best, and the earliest boards had just rc
> filters with some diodes to protect the output.  The latest have
> a buffer (and something else) chip which improve the output.

This brings up a queston, how is PWM dac output any worse than a class
D amp which is what a PWM switching amp of which are most amps today?
Then again it could be that the pwm resolution is too low. There are
some quality i2s/spi dac hats which have rca or fancy balanced xlr
connectors.

> Yes but I dont' see code to control volume in nusb/audio/audio.c, only audiofreq and audiodelay.
>
> I will play with that after this.

Your amplifier should also be able to do this.

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

* Re: [9front] bcm-audio
  2021-12-03  2:55     ` Thaddeus Woskowiak
@ 2021-12-03  5:04       ` Eli Cohen
  2021-12-03  5:09         ` Eli Cohen
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Cohen @ 2021-12-03  5:04 UTC (permalink / raw)
  To: 9front

ATTN: DO NOT DELETE

NOTICE: POSSIBLE SECURITY RISK

I'm not sure I agree, hiro. hardware can have many flaws but drivers
can have flaws too. I am pretty sure my (comparable, simpler) audio
driver did have at least one flaw, I did not check buffer size of
write messages or use a ringbuffer or anything, I sent them all off
with DMA. I'm worried 8192 KB might be a problem by that point. the
way I was able to tell was by looking at the username of the kproc, it
was all shitty, also that machine has been all fucked up for months in
all kinds of other ways. it worked fine for listening to online radio
streams of news radio, then it crapped out really badly for some
reason. I have been unable to repair the machine. I've been feeling
really bad about this because it was a bunch of rpi CMs like a tiny
cray (not joking hiro. you are an asshole too!!! see what happens?? my
computer science barbie doll is not impressed. to say the least)

please consider at least that my ENTIRELY DIFFERENT audio driver
FLAGGED FOR SUSPICION OF BAD CODE and deleted

I tried reading through the bcm-audio code but it was more
complicated. I'm pretty sure mine sucks though. I deleted it but hey
this is plan 9. mine is on github

I sat here pissed for months, then unplugged it, threw that shit in a
box for now. the barbie doll and I have felt better for a while over
here. we have tiny cups for tea parties but we ain't trustin' no
actual fuckin' tea no more with world leaders and shit.

don't even think about touching my fuckin' doll collection now. plan 9
is cool. rest of y'all are fuckin' burnt

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

* Re: [9front] bcm-audio
  2021-12-03  5:04       ` Eli Cohen
@ 2021-12-03  5:09         ` Eli Cohen
  2021-12-03  5:15           ` Kurt H Maier
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Cohen @ 2021-12-03  5:09 UTC (permalink / raw)
  To: 9front

dammit. now everyone is going to think I'm creepy as fuck. well... at
least I stopped using plan 9 right??? fantastic software, by the way
:)

I rescind any orders to go play with barbie dolls.

On Thu, Dec 2, 2021 at 9:04 PM Eli Cohen <echoline@gmail.com> wrote:
>
> ATTN: DO NOT DELETE
>
> NOTICE: POSSIBLE SECURITY RISK
>
> I'm not sure I agree, hiro. hardware can have many flaws but drivers
> can have flaws too. I am pretty sure my (comparable, simpler) audio
> driver did have at least one flaw, I did not check buffer size of
> write messages or use a ringbuffer or anything, I sent them all off
> with DMA. I'm worried 8192 KB might be a problem by that point. the
> way I was able to tell was by looking at the username of the kproc, it
> was all shitty, also that machine has been all fucked up for months in
> all kinds of other ways. it worked fine for listening to online radio
> streams of news radio, then it crapped out really badly for some
> reason. I have been unable to repair the machine. I've been feeling
> really bad about this because it was a bunch of rpi CMs like a tiny
> cray (not joking hiro. you are an asshole too!!! see what happens?? my
> computer science barbie doll is not impressed. to say the least)
>
> please consider at least that my ENTIRELY DIFFERENT audio driver
> FLAGGED FOR SUSPICION OF BAD CODE and deleted
>
> I tried reading through the bcm-audio code but it was more
> complicated. I'm pretty sure mine sucks though. I deleted it but hey
> this is plan 9. mine is on github
>
> I sat here pissed for months, then unplugged it, threw that shit in a
> box for now. the barbie doll and I have felt better for a while over
> here. we have tiny cups for tea parties but we ain't trustin' no
> actual fuckin' tea no more with world leaders and shit.
>
> don't even think about touching my fuckin' doll collection now. plan 9
> is cool. rest of y'all are fuckin' burnt

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

* Re: [9front] bcm-audio
  2021-12-03  5:09         ` Eli Cohen
@ 2021-12-03  5:15           ` Kurt H Maier
  2021-12-03  5:28             ` Eli Cohen
  0 siblings, 1 reply; 13+ messages in thread
From: Kurt H Maier @ 2021-12-03  5:15 UTC (permalink / raw)
  To: 9front

On Thu, Dec 02, 2021 at 09:09:43PM -0800, Eli Cohen wrote:
> dammit. now everyone is going to think I'm creepy as fuck. well... at
> least I stopped using plan 9 right??? fantastic software, by the way
> :)

"now"?


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

* Re: [9front] bcm-audio
  2021-12-03  5:15           ` Kurt H Maier
@ 2021-12-03  5:28             ` Eli Cohen
  2021-12-03  5:32               ` Eli Cohen
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Cohen @ 2021-12-03  5:28 UTC (permalink / raw)
  To: 9front

the wolves kept sending diplomats. wolves like to kill because they
eat that shit. the humans said oh no! a wolf! over and over again.
they tried to decide what to do. each time the wolves would send a
diplomat the humans tried to figure out what to do. the wolves were
killing the animals the humans wanted to kill. they killed the
diplomat over and over. one got through, over and over. now we have
poodles who have no letter "l" in their pedigree. my last irc
timestamp in #cat-v is 9:03:52 PM. looked like qeed quitting

On Thu, Dec 2, 2021 at 9:25 PM Kurt H Maier <khm@sciops.net> wrote:
>
> On Thu, Dec 02, 2021 at 09:09:43PM -0800, Eli Cohen wrote:
> > dammit. now everyone is going to think I'm creepy as fuck. well... at
> > least I stopped using plan 9 right??? fantastic software, by the way
> > :)
>
> "now"?
>

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

* Re: [9front] bcm-audio
  2021-12-03  5:28             ` Eli Cohen
@ 2021-12-03  5:32               ` Eli Cohen
  2021-12-03  7:45                 ` the lemons
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Cohen @ 2021-12-03  5:32 UTC (permalink / raw)
  To: 9front

damn, damn. that seemed too uh... lemme think here. kitties?

sabertooth tiger came over the other night went up in my tree. he
spoke down to me. from up in the tree. he said hey human, you been
playin' diplomat. the cat folk been holdin up their end of the
bargain. are you guys ready too? I shouted "sure!!!"

he looked down at me with intense eyes. he didn't say nothing. I
looked up at him, I thought about it.

I said no, I can't vouch for any other human beings.

On Thu, Dec 2, 2021 at 9:28 PM Eli Cohen <echoline@gmail.com> wrote:
>
> the wolves kept sending diplomats. wolves like to kill because they
> eat that shit. the humans said oh no! a wolf! over and over again.
> they tried to decide what to do. each time the wolves would send a
> diplomat the humans tried to figure out what to do. the wolves were
> killing the animals the humans wanted to kill. they killed the
> diplomat over and over. one got through, over and over. now we have
> poodles who have no letter "l" in their pedigree. my last irc
> timestamp in #cat-v is 9:03:52 PM. looked like qeed quitting
>
> On Thu, Dec 2, 2021 at 9:25 PM Kurt H Maier <khm@sciops.net> wrote:
> >
> > On Thu, Dec 02, 2021 at 09:09:43PM -0800, Eli Cohen wrote:
> > > dammit. now everyone is going to think I'm creepy as fuck. well... at
> > > least I stopped using plan 9 right??? fantastic software, by the way
> > > :)
> >
> > "now"?
> >

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

* Re: [9front] bcm-audio
  2021-12-03  5:32               ` Eli Cohen
@ 2021-12-03  7:45                 ` the lemons
  0 siblings, 0 replies; 13+ messages in thread
From: the lemons @ 2021-12-03  7:45 UTC (permalink / raw)
  To: 9front

what

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

end of thread, other threads:[~2021-12-03  8:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02 20:18 [9front] bcm-audio adr
2021-12-02 23:02 ` hiro
2021-12-03  0:30   ` Steve Simon
2021-12-03  1:43     ` Thaddeus Woskowiak
2021-12-03  2:13     ` adr
2021-12-03  1:35   ` adr
2021-12-03  2:55     ` Thaddeus Woskowiak
2021-12-03  5:04       ` Eli Cohen
2021-12-03  5:09         ` Eli Cohen
2021-12-03  5:15           ` Kurt H Maier
2021-12-03  5:28             ` Eli Cohen
2021-12-03  5:32               ` Eli Cohen
2021-12-03  7:45                 ` the lemons

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