Audio garbled when using Multi plugin to record from 2+ USB soundcards on Raspberry Pi

Aperta
#472 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c, linux, raspberry-pi

Direzione di ricerca

The problem sits in the pcm_multi plugin of alsa-lib, and the reporter links the upstream commit 369df322577034ea872978d6470edbadf30d81a9 as the change they believe matters. Start by reading that commit and the pcm_multi source it touches, then reproduce with two identical USB PnP capture devices on a Raspberry Pi. The issue asks for advice on a workaround rather than naming a change, so there is no clear definition of done yet.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I have been trying to use the multi plugin to record multiple channels from multiple soundcards on the Raspberry Pi. The results are a garbled mess.

==== EDIT 26/08 ====

Having probed the issue some more, I would like to add more detail:

The devices and drivers I try to use are:

card 0: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device_1 [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

...Curiously, I have actually had success using the multi plugin to record using a pro audio interface AND ONE USB PnP Sound Device, in this set up

card 0: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USB [Scarlett 2i2 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

HOWEVER, if I try to add another USB PnP Sound Device to the multi setup, then the result is a garbled mess. My conclusion is that the multi plugin works generally, but it does NOT work for two or more USB PnP Sound Device. Something tells me that the plugin cannot differentiate the addresses of the audio frames held in two or more of these cheap USB microphones.

I have a more verbose post of my issue here: https://www.reddit.com/r/linuxaudio/comments/1m24po8/recording_on_multiple_usb_mics_on_raspberry_pi/

===EDIT 26/08 The following diagnosis was wrong:
I have diagnosed the reasons as thus:

I am aware that the multi plugin was not meant to be used on multiple soundcards that are not in sync, however if the clock drifts over time, this is ok for my application.

I am here to seek advice on how I should go about creating a workaround. The limitations are that I need to use cheap USB microphones (it is a weight issue).

Without going along the microcontroller route, I thought one way was to make an external plugin, based on the newly patched pcm_multi plugin. I am working on this, while climbing the steep learning curve. Perhaps I can contribute an external plugin for the project...

In the meantime, does a developer have a better suggestion that I might have success with? Or any tips if you are familiar with the pcm_multi plugin? @perexg ?

Lingua principale
C
Stelle
501
Fork
227
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di alsa-project/alsa-lib

Tutte le issue di alsa-project/alsa-lib

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.