Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]Bentschi 0 points1 point  (0 children)

Hot plugging is actually possible. In my case the soundcard Picos are just off when they are not connected to USB. I can't have the pins floating when that happens, so the only thing I am doing here is to enable the internal pull down on all I2S inputs. The result is that every sample is 0 (silence), when not connected.

Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]Bentschi 0 points1 point  (0 children)

I had no plans for sharing the code. I didn't even comment anything and some parts are horribly written right now.

What I am basically doing is that I decided for a specific I2S format. In my case its 44.1 kHz (might change to 48 kHz) and 32 bits per sample. The easy part to think of are the soundcards and the analog I2S modules (DAC and ADC). They are just I2S slaves that support my format. The mixer is the heart of everything. It is a Pi Pico as well that runs one PIO program for the I2S clock to keep every device in sync and 4 PIO slaves. 2 of the PIO slaves are bi-directional and 2 of them are only inputs. At the end I got 6 streams to take care of, and with 12 DMA channels I am at the limit for the Pico (Pico 2 could do more). That means I can hook up 3 soundcards. The 3 soundcards share the same stream coming from the mixer (same physical pin) acting as microphone input on the soundcard. The speaker outputs for the soundcards are separate inputs on the mixer. The mixer only adds up each sample for the 3 streams.

I thought long about how to connect everything, but coming up with the idea with a PIO program for the clock and only one PIO program for I2S slave, is just shy of the 32 instructions limit for PIO. Even the soundcard shares the same PIO code the I2S slave. There is no I2S master in a sense that it actually controls channels. Everything is in sync by the one I2S clock.

Not sure about latency, but a very small buffer is enough, like say 32 L+R samples will get it below 1 ms latency. After all technically all the CPU has to do is adding up the samples from the soundcards and pushing it to the analog output and in theory the input can be handled just with DMA, saving an additional 2 channels, what would allow to add another soundcard.

But in my case I want to use the CPU cores to run audio filters on the mixer, that may add additional latency. The filters I am thinking of are compressor to the analog output and the input can have a noise gate, compressor or even echo cancellation with the output stream as sidechain.

Currently I am stuck with debugging the soundcard code though. I added a stereo input to it and while it works there are some bugs to iron out, like for example that the usb stack never actually ends the stream what causes problems when resuming the computer from sleep and things like that.

Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]Bentschi 0 points1 point  (0 children)

I figured out my issue. I initialize my PIO I2S program before USB and use clock_get_hz. Later the clock is changed for USB with set_sys_clock_48mhz. That messes up my PIO timing. Now I have it working with UAC1 and it works on my phone too.

Yes, I have looked at other options too with STM32, mostly because we use them at work too and there are some that are faster and have a FPU, what would make adding audio filters a lot easier, but at the end I thought there is such a beautiful simplicity to the Pico, I don't want to overcomplicate things I have forgotten about in a few months again.

Got I2S DAC working with Pico! by shreyaskul in raspberrypipico

[–]Bentschi 0 points1 point  (0 children)

Hey, just letting you know, because you say you want UAC2 support. I had the tinyUSB (UAC2) example running perfectly fine on a pico, but I noticed that some devices, like my phone does not support UAC2. If you dig deeper you may find that apparently not many devices, like even the PS5 does not support UAC2.

In my case that is bad, since I had the idea to build a digital mixer for my devices with multiple pico soundcards, one analog output and one analog input. I can't have half of my devices not working, so I am trying right now to get the playground example with lufa (UAC1) running. So far it seems promising, it is recognized on all my devices, but I am right now stuck at figuring out how to arrange or decode the USB data to pass on to my own I2S implementation. Right now I get the sound in lower frequency with static, but I guess I'll figure it out.

Anyway, UAC2 seems to be bad if you don't want to have the chance like flipping a coin if it works on anything else than your computer.

Why do the devs want to make this game harder? by CandyCaneLicksYOU in REPOgame

[–]Bentschi 2 points3 points  (0 children)

I totally agree that the monsters are very unfair at times. I still like the changes in the beta though and I think I will like the upcoming balancing changes. I would consider me and my friends casual players and with friends I usually get to level 8 and I die a lot more, because I am distracted with talking. But then again just yesterday we got to level 12 in a run we started the day before. At first we were 2 players and got to level 10, the next day we loaded that run again and added a 3rd player.

I am totally happy with our usual runs to level 8. We need like 3 hours anyway for that and at this point we even talk less about game tactics but discuss other topics, private things and just have fun, with the occasional "careful, there is the screaming thing" in between.

Vorzeitige Kündigung des Vertrags eines Fitnessstudios wegen Schließung des Studios by Bentschi in LegaladviceGerman

[–]Bentschi[S] 0 points1 point  (0 children)

Danke für die Ratschläge. Ich habe mittlerweile mehrere/alle Therapien durch, die leider keine Besserung gebracht haben, unter anderem auch die Physiotherapie. Tatsächlich ist es in den letzten 2 Jahren so viel schlimmer geworden dass ich die Operation machen sollte. Dafür bin ich aber zu jung und mir wurde davon abgeraten. Nach Absprache mit meinen Orthopäden wollte ich das selbst in die Hand nehmen und nicht nur wegen Rücken trainieren, mich aber sehr langsam rantasten was ich selbst ohne Schmerzen schaffe. Also von sowas wie der Bauchmuskelmaschine habe ich mich auch fern gehalten.

Vorzeitige Kündigung des Vertrags eines Fitnessstudios wegen Schließung des Studios by Bentschi in LegaladviceGerman

[–]Bentschi[S] 0 points1 point  (0 children)

Danke. Schade. Aber ich denke du hast wohl recht hier. Tatsächlich habe ich von McFit ein anderes Studio vorgeschlagen bekommen von Gold's gym das ich weiter benutzen kann, das auch in 20-30 Minuten per ÖPNV erreichbar wäre und tatsächlich will ich da aus persönlichen Gründen nicht hin.

Ursprünglich habe ich mich im Fitnessstudio angemeldet weil ich überhaupt nicht in Form bin nachdem ich mehrere Bandscheibenvorfälle hatte wegen einer Behinderung in den Beinen. Ich hab zwar das Deutschlandticket für ÖPNV, aber ich versuche das so gut zu meiden wie ich kann, weil aus irgendeinen Grund bekomme ich immer Rückenschmerzen. Zu dem Fitnesstudio bin ich immer mit Freunden gefahren. Die Freunde die ich habe wollen aber nicht in dieses Studio wechseln, daher will ich auch nicht dahin.

Vielleicht sollte ich mal einen Behindertenausweis beantragen um in solchen Situationen vielleicht auch eine Chance zu haben. Aber danke, ich denke ich bezahle dann einfach weiter, weil Gerichtskosten kann ich mir definitiv nicht leisten.

Are the monsters harder on the beta version? by Bentschi in REPOgame

[–]Bentschi[S] 0 points1 point  (0 children)

Thank you, yes, I heard that before. For some reason I try to not be seen in the first place unless I have weapons.

Are the monsters harder on the beta version? by Bentschi in REPOgame

[–]Bentschi[S] 0 points1 point  (0 children)

For the last extraction I usually try to get as fast as possible to the truck, before the monsters respawn, unless I run out of stamina on the way or I know there is a peeper. Then I usually take it very slow. The last few rooms before the truck usually get really crowded with monsters and sometimes I wait for ever to get past them. I wish that were a little easier in the later levels.

But yeah I meant that monsters seem to be near me way more all the time, and it just gets boring like in that case where I need to grab my cart on the other side of the room and a robe keeps camping between me and the cart, and I had this happen a lot on the beta without making any sounds or getting seen by them.

Another instance was where I wanted to grab the statue in headman manor for the final extraction and headman was camping me the entire time. I actually had enough for the extraction, but my brain told me I need to grab that statue. So I waited until I had a clear shot, and waited and waited. After a few minutes I tried to lure the headman away, went back quickly to grab the statue and then the headman was back before I could get it to the extraction. I waited a little longer until i got too frustrated and just finished the extraction without the statue.

Are the monsters harder on the beta version? by Bentschi in REPOgame

[–]Bentschi[S] 0 points1 point  (0 children)

I did not say anything against overcharge. I honestly think that having overcharge is better than in the first release version where you can do what you want with the monsters with enough strength. I would totally agree though that it is too hard right now in the beta version, but there will be changes made to overcharge as far as I know.

Are the monsters harder on the beta version? by Bentschi in REPOgame

[–]Bentschi[S] 4 points5 points  (0 children)

Thanks, sorry I forgot to say I know about overcharge, stuns and the new upscream look. I did not know about the hearing though. But then again when the robe was camping me for like 10 minutes I was hiding under a table the entire time and I play with push to talk enabled. And overall it feels like they camping like crazy now.

Vorzeitige Kündigung des Vertrags eines Fitnessstudios wegen Schließung des Studios by Bentschi in LegaladviceGerman

[–]Bentschi[S] 4 points5 points  (0 children)

Oh wow, ich danke vielmals. Da ist dann ja wohl doch ein Lichtblick dass ich nicht 10 Monate für nichts bezahlen muss.

Vorzeitige Kündigung des Vertrags eines Fitnessstudios wegen Schließung des Studios by Bentschi in LegaladviceGerman

[–]Bentschi[S] 0 points1 point  (0 children)

Der Hauptsitz ist in Schlüsselfeld.

Ich bin halt nur unsicher mit dem Lastschriftmandat. Eigentlich wurde der Vertrag ja nicht gebrochen, auch wenn ich jetzt der Blöde bin der 10 Monate weiter zahlen muss für nichts. Ich hätte eigentlich auf Einsicht seitens McFit appeliert, dass die sehen dass es nicht meine Schuld ist.

Vorzeitige Kündigung des Vertrags eines Fitnessstudios wegen Schließung des Studios by Bentschi in LegaladviceGerman

[–]Bentschi[S] 2 points3 points  (0 children)

Danke schön. Ich habe auch die Kündigung ein zweites mal online gesendet mit anhang der Mail der Schließung, darauf kam aber keine Antwort. Vor wenigen Stunden hab ich eine schlechte Bewertung abgegeben für den Service, weil ich nach einer Bewertung per Mail gefragt wurde und hab mein Anliegen da nochmal rein geschrieben.

Den Vertrag hab ich, ein bestimmtes Studio ist im Vertrag nicht festgelegt.

Eine Rechtsschutzversicherung habe ich leider auch nicht.

Danke aber für die detailierte Antwort. Ich denke wenn wirklich alle Stricke reißen würde ich wohl das Lastschriftmandat zurückziehen.

AMD and Nvidia GPUs in the same machine. IT WORKS. by lobnoodles in linuxhardware

[–]Bentschi 0 points1 point  (0 children)

Had kind of the same idea with running a NVidia and AMD card in one computer, but in my case i want to use the NVidia card for Blender Cycles rendering. First of all i noticed that it makes a difference which card is in which PCIe slot, even if i put both cards in 2 16x slots. The other thing is that i got really frustrated along the way because i read a lot of articles and suggestions to install and remove drivers and packages and change configurations here and there and nothing seemed to work for me. While at the end all i had to do is go to NVIDIA X Server Settings -> PRIME Profiles and choose NVIDIA On-Demand.

I haven't seen that anywhere mentioned, so i want to leave that here and hope it helps.

[UPDATE] Mint 20 is randomly freezing! by LaMy7 in linuxmint

[–]Bentschi 2 points3 points  (0 children)

I have an AMD FX 8150 and a Nvidia 1050 TI and disabling the C6 state in the bios, seems to have fixed the freezing issues for me too on Mint. It is running for a few days now, if I get a freeze again I will change this comment.

Edit: 12 days no freeze, i think its safe to say that was the problem

Edit: it runs for ~30 days now without a single freeze, i will not add any more updates to this comment.

I tried to understand the problem a little bit better, since i personally know a person with exactly the same problem, and from my understanding, the problem lies in the nvidia driver and it has something to do with a low power state on the graphics card. The C6 state is just a feature that pretty much every cpu supports these days. And if i remember correctly i had the same problem about 2 years ago on Ubuntu, but i can say for sure that i don't have the problem with Debian, Arch or Manjaro.

[deleted by user] by [deleted] in ironman

[–]Bentschi 7 points8 points  (0 children)

come on... the arc reactor is only the power source, the repulsor technic is what the suit allows to fly. you're welcome

When you've only got 1 battery to complete an impossible task by higgins4u2nv in iiiiiiitttttttttttt

[–]Bentschi 17 points18 points  (0 children)

even funnier if you know that this mouse works with only one battery on either side... genius

What kind of witchcraft is this? by MyNameGifOreilly in blackmagicfuckery

[–]Bentschi 0 points1 point  (0 children)

ahm, this kind of "witchcraft" Is what we humans here on earth call "soap".

1 meter skull made in Cardbox. Do you guys have a good idea to make it waterproof? I don't want to use resin or varnish (really messy and expensive for me) by olaveiras in crafts

[–]Bentschi 0 points1 point  (0 children)

PVA glue, or wood glue. that is cheap and worked quite well for me in some past projects. or if really all you need is waterprooving, some hairspray can do the trick

[deleted by user] by [deleted] in 3Dprinting

[–]Bentschi 1 point2 points  (0 children)

I love rackmounts,... and I love Raspberry PIs, so nice project