ASUS Chromebook C200 安装 FydeOs for PC 扬声器和耳机没有声音输出

直接把 ucm 文件复制过去不管用可能是因为 alsa 版本的问题。在网上搜索的时候看到

GalliumOS is based on Ubuntu 18.04, therefore it is still using the use case manager (UCM) and not the newer ucm2 you have on Manjaro.

想起来第一次执行 alsaucm -c chtmax98090 set _verb HiFi set _enadev Headphone 报错中出现过 ucm2。

ALSA lib /build/amd64-generic/tmp/portage/media-libs/alsa-lib-1.2.1.2-r2/work/alsa-lib-1.2.1.2/src/ucm/utils.c:261:(uc_mgr_config_load) could not open configuration file /usr/share/alsa/ucm2/chtmax98090/chtmax98090.conf
ALSA lib /build/amd64-generic/tmp/portage/media-libs/alsa-lib-1.2.1.2-r2/work/alsa-lib-1.2.1.2/src/ucm/parser.c:1605:(load_master_config) error: could not parse configuration for card chtmax98090
ALSA lib /build/amd64-generic/tmp/portage/media-libs/alsa-lib-1.2.1.2-r2/work/alsa-lib-1.2.1.2/src/ucm/main.c:963:(snd_use_case_mgr_open) error: failed to import chtmax98090 use case configuration -2
alsaucm: error failed to open sound card chtmax98090: No such file or directory

当时 chromeos 和 fydeos 中都没有 chtmax98090 这个文件夹。从 https://github.com/GalliumOS/galliumos-baytrail 处下载复制到手动创建的 ucm2 文件夹下,出现了新的错误。

ALSA lib /build/amd64-generic/tmp/portage/media-libs/alsa-lib-1.2.1.2-r2/work/alsa-lib-1.2.1.2/src/ucm/parser.c:1212:(parse_verb_file) error: HiFi.conf failed to parse verb
ALSA lib /build/amd64-generic/tmp/portage/media-libs/alsa-lib-1.2.1.2-r2/work/alsa-lib-1.2.1.2/src/ucm/main.c:963:(snd_use_case_mgr_open) error: failed to import chtmax98090 use case configuration -17
alsaucm: error failed to open sound card chtmax98090: File exists

认为也许是 byt-max98090 和 chtmax98090 不同,就没再继续下去。
看到可能跟版本有关,从 https://github.com/alsa-project/alsa-ucm-conf 处找对应 alsa-lib-1.2.1.2 对应的文件,发现直到 1.2.3 才出现有 chtmax98090。将 1.2.3 的文件复制过去按照报错执行到最后也仍旧是没有声音。
https://alsa-project.org/wiki/Changes_v1.2.2_v1.2.3 这里看到

Changelog between 1.2.2 and 1.2.3 releases

chtmax98090: add generic chtmax98090.conf and move Quawks init to the generic HiFi.conf
ucm2: chtmax98090: add generic HiFi.conf and SOF support
ucm2: enable possible SOF support in profile for Chromebook Asus C300
ucm2: Add profile for Chromebook Asus C300

不知道 1.2.3 之前的版本需要怎么做。
下载 chromebrew, 安装了 alsa_lib 和 alsa_utils,alsa_lib 的版本是 1.1.4
crew 下载文件的位置在 /usr/local/,把在 https://github.com/alsa-project/alsa-ucm-conf/releases/tag/v1.2.4 下载 1.2.4 的 ucm 文件, 粘贴到对应位置

/usr/local/share/alsa/ucm2
|-- chtmax98090
|   |-- HiFi.conf
|   `-- chtmax98090.conf
|-- codecs
|   `-- max98090
|       |-- EnableSeq.conf
|       |-- Headphones.conf
|       |-- HeadsetMic.conf
|       |-- InternalMic.conf
|       `-- Speaker.conf
`-- platforms
    `-- bytcr
        |-- PlatformDisableSeq.conf
        `-- PlatformEnableSeq.conf
5 directories, 9 files

依序执行

alsaucm -c chtmax98090 set _verb HiFI set _enadev Headphones
alsaucm -c chtmax98090 set _verb HiFI set _enadev Speaker
sudo mkdir /var/lib/alsa/
/usr/sbin/alsactl store

之后就有声音了。重启之后声音会又消失,需要手动再运行一遍 /usr/sbin/alsactl restore
另外会出现插上耳机之后耳机和扬声器会同时发出声音。找到可能能通过在 alsamixer 设置 auto mute 或是 amixer -c 0 sset 'Auto-Mute Mode' Enabled 来解决
但是这里 alsamixer 找不到 auto mute。执行 amixer 命令会出现 amixer: Unable to find simple control ‘Auto-Mute Mode’,0 错误
暂时是在需要使用耳机的时候,从 alsamixer 中选择对应声卡将扬声器声音关闭。

1 个赞