Inconsistent order of channels on C-Media 7.1 channel device
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 12/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- linux, python
調査の方向性
The reproduction is the sine_wave/eightchan script that writes 8 channels to the surround71:CARD=ICUSBAUDIO7D,DEV=0 device; the attached alsa-info output holds the device's channel layout. Start by running the script several times and recording which jack carries which amplitude, then compare against the channel map ALSA reports for that card. Done means identifying whether the reordering comes from the USB driver or from alsa-lib's channel mapping, with a reproducible finding recorded in the issue.
索引モデルが issue の本文から書いたものです。
説明
I have a USB sound device (Startech ICUSBAUDIO7D, which comes up as ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device through lsusb) which I'm trying to program the output of for 8 channels. The python code (outputs a 50Hz sine wave) I'm using is below (each channel gets a different amplitude so I can identify them with an oscilloscope).
The sound card has 4 stereo jacks, to which I have a scope connected.
The problem is that on different runs of the program, the output mappings are not consistent - each run of the program might have the order of the channels different to the previous. So running it one time might have amplitudes (0, 0.125) on the first jack, but the next run it might have those (0.75, 0.25) on the first jack (it doesn't appear to be 'paired' per jack)
I initially discovered this when using portaudio, and decided to try using alsa-only and the issue persists.
Is this likely to be a problem with the driver, alsa-lib, or is there something else going on here?
import numpy as np
import alsaaudio
def sine_wave(amplitude=1, freq=50, sample_rate=48000):
wave_len = sample_rate/freq
samples = (amplitude * 32767 * np.sin(2 * np.pi * np.arange(wave_len) * freq / sample_rate)).astype(np.int16)
return samples
def eightchan(freq=50, sample_rate=48000):
wave_len = sample_rate//freq
frames = np.zeros((wave_len, 8), dtype=np.int16)
samples = sine_wave()
for c in range(8):
frames[:wave_len,c] = samples[:wave_len]*(c/8)
return frames.tobytes()
if __name__ == '__main__':
pcm = alsaaudio.PCM(device='surround71:CARD=ICUSBAUDIO7D,DEV=0', format=alsaaudio.PCM_FORMAT_S16_LE, channels=8, rate=48000, type=alsaaudio.PCM_PLAYBACK, periodsize=960, periods=1)
frames = eightchan()
while True:
pcm.write(frames)
alsa-info output is attached
alsa-info.txt
- 主要言語
- 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 ·