ALSA lib dlmisc.c:170:(snd_dlsym_verify) unable to verify version for symbol snd_func_private_integer ALSA lib conf.c:4556:(_snd_config_evaluate) symbol snd_func_private_integer is not defined inside (null) ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: 没有那个设备或地址 ALSA lib conf.c:3694:(snd_config_hook_load) Unable to expand filenames in the pre-load section ALSA lib conf.c:3572:(snd_config_hooks_call) function snd_config_hook_load_for_all_cards returned error: 没有那个设备或地址 ALSA lib control.c:1264:(snd_ctl_open_conf) Invalid type for CTL default definition
直接删除即可:
1
rm -rf /opt/apps/classin/lib/libasound.so*
调整配置文件
指定设备
再次运行 ClassIn,仍然报错,并且找不到扬声器 / 耳机,只找到麦克风:
1 2 3 4 5 6 7 8
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:8832:(snd_pcm_set_params) Channels count (1) not available for PLAYBACK: 无效的参数 ALSA lib pcm.c:8832:(snd_pcm_set_params) Channels count (1) not available for CAPTURE: 无效的参数 ALSA lib pcm.c:8832:(snd_pcm_set_params) Channels count (1) not available for PLAYBACK: 无效的参数 ALSA lib pcm.c:8832:(snd_pcm_set_params) Channels count (1) not available for PLAYBACK: 无效的参数 ALSA lib pcm.c:8832:(snd_pcm_set_params) Channels count (1) not available for PLAYBACK: 无效的参数 ALSA lib pcm.c:8832:(snd_pcm_set_params) Channels count (1) not available for PLAYBACK: 无效的参数 ALSA lib pcm.c:8832:(snd_pcm_set_params) Channels count (1) not available for PLAYBACK: 无效的参数
声道不太对,调整下配置文件:
1 2 3 4 5 6 7 8 9
pcm.!default { type plug slave.pcm "hw:1,0" }
ctl.!default { type hw card 1 }
这将使用 plug 插件自动转换音频参数以匹配设备的支持范围。
再次运行 ClassIn,声音设备正常了。
后记
还有许多可以修改的,比如解决 Alsa 与 PulseAudio 的冲突,日后再补充……
FontConfig 的美化
FontConfig 是 Linux 字体管理器,负责管理系统中字体文件的搜索路径、渲染方式、字体匹配规则等。
FontConfig 默认配置对 CJK + 编程的应用场景来说并不友好,会遇到以下问题:
CJK 字形错乱,简体中文、繁体中文、日文、韩文等字形混用
字体渲染效果不佳,缺少粗体、斜体等效果
终端设置等宽字体会导致 CJK 字符回退到宋体,设置 CJK 字体会导致等宽字体的错乱
缺失 Windows 下常用的字体(微软雅黑、黑体、宋体、Arial、Times New Roman、Courier New 等)导致显示效果不佳
<?xml version='1.0'?> <!DOCTYPE fontconfigSYSTEM'urn:fontconfig:fonts.dtd'> <fontconfig> <!-- Artificial oblique for fonts without an italic or oblique version --> <matchtarget="font"> <!-- check to see if the font is roman --> <testname="slant"> <const>roman</const> </test> <!-- check to see if the pattern requested non-roman --> <testcompare="not_eq"name="slant"target="pattern"> <const>roman</const> </test> <!-- multiply the matrix to slant the font --> <editmode="assign"name="matrix"> <times> <name>matrix</name> <matrix> <double>1</double> <double>0.2</double> <double>0</double> <double>1</double> </matrix> </times> </edit> <!-- pretend the font is oblique now --> <editmode="assign"name="slant"> <const>oblique</const> </edit> <!-- and disable embedded bitmaps for artificial oblique --> <editmode="assign"name="embeddedbitmap"> <bool>false</bool> </edit> </match> <!-- Synthetic emboldening for fonts that do not have bold face available --> <matchtarget="font"> <!-- check to see if the weight in the font is less than medium which possibly need emboldening --> <testcompare="less_eq"name="weight"> <const>medium</const> </test> <!-- check to see if the pattern requests bold --> <testcompare="more_eq"name="weight"target="pattern"> <const>bold</const> </test> <!-- set the embolden flag needed for applications using cairo, e.g. gucharmap, gedit, ... --> <editmode="assign"name="embolden"> <bool>true</bool> </edit> <!-- set weight to bold needed for applications using Xft directly, e.g. Firefox, ... --> <editmode="assign"name="weight"> <const>bold</const> </edit> </match> <matchtarget="font"> <editmode="assign"name="rgba"> <const>rgb</const> </edit> </match> <matchtarget="font"> <editmode="assign"name="hinting"> <bool>true</bool> </edit> </match> <matchtarget="font"> <editmode="assign"name="hintstyle"> <const>hintslight</const> </edit> </match> <dir>~/.fonts</dir> <matchtarget="font"> <editmode="assign"name="antialias"> <bool>true</bool> </edit> </match> </fontconfig>