How to determine which files were read/parsed

未关闭
#345 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
12/100
Issue 类型
文档
描述清晰度
需要澄清
活跃度
停滞
技术栈
c, linux

调研方向

The issue asks which config and state files alsactl reads, in what order, for alsactl restore and alsactl init. The payload names /usr/share/alsa/init/00main, /var/lib/alsa/asound.state, /etc/asound.conf and ~/.asound.conf, but the actual load path is not in the payload, so start by tracing the alsactl and config-parsing code in the repository. Done means a written list of files in read order, checked against a strace run of alsactl. The thread has had no reply for almost three years and is a mixed question, so confirm with a maintainer what form of answer they want first.

由索引模型根据 Issue 内容生成。

描述

I would like to know which files were read by alsa doing alsactl restore or alsactl init.
So far I know that there is a folder /usr/share/alsa and it has init/00main, and this is probably read first, because when I deleted whole alsa dir I got error about this file, then I don't know what is read. Also there is a file /var/lib/alsa/asound.state which from my understanding contains values for different controls that are visible in alsamixer. There is also "user" config file in /etc/asound.conf and optionally any user can create ~/.asound.conf. Am I missing any other files?
getting the list of files in order they are read for each card or all cards would be helpfull in debugging.
For example by default I found out that my card HDA Intel PCH has two devices ALC1150 Analog and ALC1150 Digital. Digital is probably one of the six jacks in the back of my PC that are unplugged so I don't care about them right now. However Analog in my PC is connected to speakers and also from motherboard comes another cable to front jack panel that I plugged my headphones. I have a few problems with the default configuration:

  1. Headphone slider in alsamixer, known as control doesn't work.
  2. There are too many controls in Playback that are useless in my opinion.
  3. I haven't found yet how headphone and speakers jacks where merged into one Analog device. I wonder if it's a software merge or a hardware thing. I would like to combine card 2: NVidia [HDA NVidia], device 3: HDMI 0 [X2483_2481] with the merged card 1 device 0 (headphones and speakers) and I was wondering if it would be better to merge all 3 devices at once.

Correct me if I'm wrong, but from my understanding you have to connect different devices to be able to dynamically switch between them, because normally every process, e.g browser connects to a pcm device at startup and you can't change it later. So the actual audio switching is unmuting one thing and muting rest of them. All "things" are connected to one pcm, right?

Please correct me if I'm wrong or use wrong terminology.
image

主要语言
C
星标
501
派生
227
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

alsa-project/alsa-lib 的其他 Issue

查看 alsa-project/alsa-lib 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。