electrodyssey.net

Odyssey of Electronics and Computers

Tascam US-4x4HR linux config utility

October 25, 2023 — Nazim

A while ago I was trying to bring up the sound card Tascam US-4x4HR on a linux server. Linux usb sound module was functional, but the card was mixing the inputs, and I didn't wanted that. After hours of searching through the Internet, I haven't found anything usable, and resorted to "sniffing" the usb control transfers of the official windows utility, and reproducing them with libusb on linux. Surprisingly, it worked well. Here is the link to the potascam github repo. Quick and dirty, as usual.

Tags: linux, sound, tascam, potascam

DDS sound generator with PortAudio

February 08, 2021 — Nazim

I've been looking for an easy to use and portable library to generate audio tones, so PortAudio seemed like an obvious choice. PortAudio is not only surprisingly easy to use and comes with many excellent examples, but also provides a control over the callback execution latency. You could specify how many samples to be processed with a callback, or let PortAudio decide the optimal count. Although, PortAudio is not officially called a DSP library, it's pretty much useful for DSP. Best of all, you could combine multiple audio samples by adding them together, to get a multi-tone output. Building the library on Windows with VisualStudio was quite easy and is well documented here. All you need to do is disable the console output and unneeded backends (ASIO in my case). To disable the ASIO, navitage to the project explorer and remove the Source Files->hostapi->ASIO. Then, edit the portaudio.def and comment out the exports starting with PaAsio_. Debug console output can be removed from the preprocessor definitions in the project's properties. There been some old trouble reports of Windows 10 not playing well with x86 32-bit compiled PortAudio DLL, so I've built an x64 library which worked great.

Initialization of the audio stream is well described in examples, the only thing which was not that obvious is how-to use a WASAPI output in exclusive mode, so here is the snippet:

Read more...

STM32Cube, STM32F401RE; USB host VBUS and UART1 conflict

January 26, 2021 — Nazim

Spent a significant amount of time trying to figure out why the USB host generated by STM32Cube was halting on STM32F401RE when UART1 was receiving data. It was driving me mad during the last couple of days. The board I'm using got no dedicated VBUS signal controlling the power on a USB interface, so I was assuming it's safe not to configure DriveVBUSFS in STM32Cube -> Middleware -> USB_HOST -> Platform Settings. I was spectacularly wrong. Despite UART1 RX being configured on PA9 pin (which is VBUS by default on STM32F401RE), it was still affecting the USB, so every incoming UART1 transmission was disrupting the USB host.

Read more...

Qt5 cross-compilation environment for Raspberry Pi

July 26, 2020 — Nazim

This post is a brief extract of a wonderfully detailed video made by Ulas Dikme. Many thanks to Ulas for sharing his experiences, it saved me several days of work setting up the cross-compilation environment.

Ulas was using an Ubuntu 20 Virtual Box machine for building a sysroot and qt base. While it's not the best solution performance-wise, it's certainly very convenient in terms of being portable across the host machines. My Qt5 build system resides on a USB hard drive.

Read more...

Namecheap positive ssl chain / java keystore

March 27, 2020 — Nazim

Recently I've spent some time importing the Namecheap.com Positive SSL certificate chain into a java keystore, so I'm documenting it here as a reminder. To import the certificate / key pair, they have to be converted into a p12 format first. Certificate order is also important for some clients. Correct order is leaf certificate first, then intermediates and the CA at last.

Read more...

lboard2 p. I - spartan-6 slave serial sonfiguration

March 04, 2020 — Nazim

The core of lboard2 is a Xilinx XC6SLX9 FPGA which was chosen because of the easy to solder TQG144 qfp package. Nowadays it's counted as a low density chip, but it's 9K LUT architecture is powerful enough for a simple audio processing. Spartan-6 hasn't got any non-volatile storage, so it has to be configured on every startup. Xilinx UG380 describes the various configuration options in details.

My configuration method of choice was Slave-Serial, because it was easy to implement with a suitable microcontroller. Basically it's a single data line serial protocol which transmits the configuration file bit by bit. Slave-Serial has several beneficial features: it requires only 5 signals, clock line is free running and the protocol is very easy.

Read more...

lboard2 sound processing dev board with spartan-6 and aic3204

March 03, 2020 — Nazim

lboard2 is my take on building a simple DSP application using Xilinx Spartan-6 FPGA and TI TLV320AIC3204 audio codec from the scratch. I thought it's far more interesting to design my own booard instead of buying a commercially available development kit which just works. Currently, lboard2 is passing a loopback test, which means that audio samples are captured with a codec, being received on the FPGA pins, then routed back to a codec's DAC and heard with a headphones. Loopback isn't the most exciting application, so I'm working on a simple Fourier transfer based VU-meter. Once it's ready, I'll post the code, but before that, I'd like to share my experience with Spartan-6 in a series of a short posts tagged with an lboard2 label.

Hoping this information would help beginners to build a working system faster and with less pain.

Tags: fpga, xilinx, spartan-6, dsp, lboard2, aic3204

Intro

March 03, 2020 — Nazim

Hi, I'm Nazim. My blog is mostly dedicated to electronics and computers, things which were always fascinating to me. Perhaps my inspiration comes from the nerdy childhood, when I was constantly reading sci-fi books and daydreaming of times when computers will be ubiquitous. Guess what.. it happened, my daydreams came true sooner than I would have expected.

This site is built upon a bashblog, wonderful script capable of generating responsive static blogs using just GNU tools and Markdown. I also happen to have a personal GitHub page with a projects some people may find useful.

Tags: musings-and-daydreams