`USB-Audio`: Wrong S/PDIF (`iec958`) input and output

Aperta
#292 5 commenti 2 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
18/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
c, linux

Direzione di ricerca

The behaviour sits in the card database at src/conf/cards/USB-Audio.conf, which decides how many iec958 (S/PDIF) inputs and outputs an unknown USB card gets. Reproduce by opening iec958:1 for playback and capture on a USB card that has no S/PDIF port, and read the thread for why the current default was chosen. Done would be a maintainer decision on the default, not a patch yet.

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

Descrizione

I am new to the Linux sound system. As I understand, USB sound cards doesn't directly tell the kernel or alsa-lib how many S/PDIF inputs and outputs they have. But they obviously tell their "brand name" like "Plantronics USB Headset" or "HP Digital Stereo Headset" for example.

To present the correct number of S/PDIF inputs and outputs to the rest of the userspace, alsa-lib seems to maintain a kind of known devices database in src/conf/cards/USB-Audio.conf.

If a USB card brand is not known in this file, alsa-lib always present a single S/PDIF input and a single S/PDIF output. If the index of this card is 1 for example, snd_pcm_open(&pcm, "iec958:1", SND_PCM_STREAM_PLAYBACK, 0) and snd_pcm_open(&pcm, "iec958:1", SND_PCM_STREAM_CAPTURE, 0) will always return 0 even if the USB device doesn't have a real S/PDIF input or output.

My question is why this is the default behavior? We are in a "every USB cards have S/PDIF, except those who are known in USB-Audio.conf" logic. I think it should be "None USB card has S/PDIF except those who are known for it in USB-Audio.conf" because USB devices without S/PDIF are much more common.

Cf https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/1002952

Thank you!

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.