ALSA multi plugin error when combining two soundcards
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 15/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- c, linux
調査の方向性
The payload names no source files, only user configurations for the multi PCM plugin and the errors alsaloop prints ('Rate 48000Hz not available for capture quad' and 'Sample format not available'). Start by reproducing with the multi config and two hardware cards, then check whether the failing rate and format negotiation happens in the multi plugin's parameter handling. Done means a clear diagnosis of why a multi slave with two cards rejects 48 kHz capture, or a documented config that works, and the issue has been idle for about four years, so confirm it still reproduces on current alsa-lib first.
索引モデルが issue の本文から書いたものです。
説明
My goal is to mix the output of two sound cards (RAVENNA from bondagit and hifiberry), then pass it to a DSP pcm plugin. As it's not possible with dmix (dmix only supports output to hw devices) the reasonable next step was multi plugin, but my tries always end up in a failure. Below is a quite standard multi configuration inspired by alsa docs that I'm using:
pcm.quad {
type multi
slaves.a.pcm "hw:RAVENNA"
slaves.a.channels 2
slaves.b.pcm "hw:sndrpihifiberry"
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
master 1
}
pcm.quad2 {
type plug
slave.pcm "quad"
}
This is run with alsaloop to be input into an extplug plugin that easily accepts 4 channels of audio - alsadsp:
$ alsaloop -C quad -P alsadsp -c 4
Rate 48000Hz not available for capture quad: Invalid argument
Unable to set parameters for capture quad stream: Invalid argument
Loopback start failure.
This results in a failure, moreover running quad2 also results in the same type of error.
Next step was to try plug pcm:
pcm.quad_plug {
type multi
slaves.a.pcm "plughw:RAVENNA"
slaves.a.channels 2
slaves.b.pcm "plughw:sndrpihifiberry"
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave a
bindings.2.channel 0
bindings.3.slave a
bindings.3.channel 1
}
pcm.quad_plug2 {
type plug
slave.pcm "quad_plug"
}
With quad_plug the same error occurs, with quad_plug2 the error is as below:
$ alsaloop -C quad_plug2 -P alsadsp -c 4
Broken configuration for capture quad_plug2 PCM: no configurations available: Invalid argument
Unable to set parameters for capture quad_plug2 stream: Invalid argument
Loopback start failure.
Then the last thing I tried was to force the 48kHz sampling rate directly on the hardware devices with the help of the following config:
pcm.quad_48k {
type multi
slaves.a {
pcm {
type plug
slave.pcm "hw:RAVENNA"
slave.rate 48000
}
channels 2
}
slaves.b {
pcm {
type plug
slave.pcm "hw:sndrpihifiberry"
slave.rate 48000
}
channels 2
}
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}
and again it ends up with a failure:
$ alsaloop -C quad_48k -P alsadsp -c 4
Sample format not available for capture quad_48k: Invalid argument
Unable to set parameters for capture quad_48k stream: Invalid argument
Loopback start failure.
I know that both these cards are capable of running 48kHz, I'm doing that all the time. So what could be the cause of this error? alsadsp wants them to be 48kHz and if run separately it all works well, both cards set themselves according to alsadsp requirements. It works even if there's only one card in the multi plugin that occupies all 4 output ports - my conclusion is that it's not a problem of alsadsp.
Are there any other steps that could help solving the issue?
- 主要言語
- C
- スター
- 501
- フォーク
- 227
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
alsa-project/alsa-lib のほかの issue
-
USB-Audio: ASUS ROG Zenith II S/PDIF output mapped to wrong PCM device対応中かも @byrcolin が 49 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
alsa-project/alsa-lib#532 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
alsa-project/alsa-lib#530 · リアクション 9 件 ·
-
kernel driver
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
alsa-project/alsa-lib#529 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
alsa-project/alsa-lib#522 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
alsa-project/alsa-lib#519 ·
alsa-project/alsa-lib の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
fastfetch-cli/fastfetch#2780 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
elliotchance/vsql#2079 ·
メンテナーはふだん 1 日以内に返信
-
docs
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
メンテナーはふだん 13 日以内に返信
-
threadpool: a failed `pthread_cond_wait` makes Mlucas hang instead of stopping対応中かも @leinardi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
primesearch/Mlucas#398 ·