Products > Programming

[SOLVED] 24bits/96kHz conversion of s32le to f32le in a stdout to stdin pipe?

<< < (7/11) > >>

RoGeorge:
The soundcard is an onboard Sound Core3D (Recon3D internal ?) (ca0132 chipset from Creative, the followup of emu10k1/2, Audigy, etc.), MB ASRock Fatal1ty Z97 Professional, nVidia GTX760/2GB, i7-4790K, 32GB RAM, SSD.

It is known as buggy, long cumbersome history, with drivers windows only then Creative open sourced later the drivers from some other descendent chip (ca0100) and somebody took the time to sniff the messages exchange between the Windows driver and the Windows OS, then he crafted the ca0132 Linux driver.

Only a week ago I was trying to modify the drivers and recompile, but if nobody bothered fixing all that in the last 10 years, then maybe it's not worth doing it, or maybe is not even possible.

Here's a list of bugs I'm seeing:
https://www.eevblog.com/forum/programming/audio-in-linux/msg4308922/#msg4308922

And this is the github repo (inside another topic that might add details about this particular driver, but please keep in mind I was having no idea what I was doing/writing/testing there):
https://www.eevblog.com/forum/programming/compile-a-linux-kernel-module/msg4327933/#msg4327933

Connor McAdams is the one who reversed engineer all then wrote the ca0132 patch for Linux.
This is his hda patch for ca0132 chip:  https://github.com/torvalds/linux/blob/master/sound/pci/hda/patch_ca0132.c

gnif:

--- Quote from: RoGeorge on August 08, 2022, 01:45:17 pm ---The soundcard is an onboard...

--- End quote ---

This is all I needed to see :). Onboard sound devices are notorious for issues like that which you are seeing here, they commonly suffer from interrupt jitter which causes latency issues. If your device is getting into an under/overrun state it can cause stream stalls while it get's reinitialised by alsalib (DMA xfers stop and have to be re-started). Unfortunately when using `arecord` it's impossible to determine when/if these stalls are occurring.

The reason why the C application in the pipeline is avoiding this issue somewhat is due to buffering. I suggest you have a play with different period sizes and buffer sizes with arecord. I see you were specifying the`-B` switch which sets the buffer time, but this doesn't control the number of buffers. The flags to play with are `--period-size` and `--buffer-size`.

The buffer-size is a multiple of the period-size, so to have two periods you would want buffer-size to be 2x the period-size. The minimum periods you can run with is usually 2, but some cards (like onboard) need 3 or more. If this doesn't help also increase your buffer-size. Keep it to powers of 2, for example:

period-size=512
buffer-size=1024

Play with these values and see if it helps your use case. Obviously the larger the buffers, the more latency that will be introduced, however for your use case I don't think that this matters much.

PKTKS:
I ve place to important  tips for properly setting device nodes...

They have been erased....  reason being unknown...

Anyway the tip still holds:  The OP has issues with the system nodes
unless he can properly fix them.. it will be hard to achieve proper ALSA goals.

Posted how nice a CRAPPY ON BOARD MOBO can perform at DAW level this days.. (including low latency MIDI resonse with real time scoring )

also erased...  so ... I rather mention for those who can see how the tips are relevant
to contact me off topic..

anyone welcome . as usual

Paul

gnif:

--- Quote from: PKTKS on August 08, 2022, 02:47:11 pm ---I ve place to important  tips for properly setting device nodes...

They have been erased....  reason being unknown...

--- End quote ---

Off topic and outside the scope of the problem, this is not a full DAW and does not have the issues you are describing. Audio nodes as you understand them are not part of this issue when talking to the hardware directly via `hw` or `plughw`. The issue is the application `baudline` is having a framerate issue when the audio source is coming from arecord, but for some reason the issue is somewhat resolved when coming via another process, this indicates that additional buffering (via stdio) is resolving this problem to a minor extent and points at period counts and buffer sizes being the issue along with the low quality integrated audio solution of the system.


--- Quote from: PKTKS on August 08, 2022, 02:47:11 pm ---Posted how nice a CRAPPY ON BOARD MOBO can perform at DAW level this days.. (including low latency MIDI resonse with real time scoring )

also erased...  so ... I rather mention for those who can see how the tips are relevant
to contact me off topic..

--- End quote ---

MIDI has no relationship at all with PCM, completely off topic.
Last warning, stop posting off topic things and over-complicating an issue that is already being diagnosed.

PKTKS:

--- Quote from: gnif on August 08, 2022, 02:51:24 pm ---
--- Quote from: PKTKS on August 08, 2022, 02:47:11 pm ---I ve place to important  tips for properly setting device nodes...

They have been erased....  reason being unknown...

--- End quote ---

Off topic and outside the scope of the problem, this is not a full DAW and does not have the issues you are describing. Audio nodes do not play a part when talking directly to the hardware via `hw` or `plughw`.


--- Quote from: PKTKS on August 08, 2022, 02:47:11 pm ---Posted how nice a CRAPPY ON BOARD MOBO can perform at DAW level this days.. (including low latency MIDI resonse with real time scoring )

also erased...  so ... I rather mention for those who can see how the tips are relevant
to contact me off topic..

--- End quote ---

MIDI has no relationship at all with PCM, completely off topic.
Last warning, stop posting off topic things and over-complicating an issue that is already being diagnosed.

--- End quote ---

They just do.

Unless properly set the applications will not find them...

and  i am guessing that in the OP case... he has a void node being read from the PIPE.

Paul

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod