我正在 Jumper EZPad Mini 3(一款便宜的中国版 Windows 平板电脑)上一步一步设置 Ubuntu 18.10。现在我试图让音频正常工作 - 只需耳机插孔输出工作就足够了(不需要扬声器)。
该平板电脑使用 ES8316 编解码器,内核似乎已经支持该编解码器,因为其内核模块可以正常加载:
[ 7.686752] bytcht_es8316 bytcht_es8316: snd-soc-dummy-dai <-> media-cpu-dai mapping ok
[ 7.686856] bytcht_es8316 bytcht_es8316: snd-soc-dummy-dai <-> deepbuffer-cpu-dai mapping ok
[ 7.689502] bytcht_es8316 bytcht_es8316: ES8316 HiFi <-> ssp2-port mapping ok
在当前状态下,平板电脑在“设置”中仅列出虚拟输出。PulseAudio 似乎看不到该卡,仅列出 HDMI 输出(我不打算使用):
~$ pacmd list-cards
1 card(s) available.
index: 0
name: <alsa_card.pci-0000_00_02.0-platform-hdmi-lpe-audio>
driver: <module-alsa-card.c>
owner module: 7
properties:
alsa.card = "0"
alsa.card_name = "Intel HDMI/DP LPE Audio"
alsa.long_card_name = "Intel HDMI/DP LPE Audio"
alsa.driver_name = "snd_hdmi_lpe_audio"
device.bus_path = "pci-0000:00:02.0-platform-hdmi-lpe-audio"
sysfs.path = "/devices/pci0000:00/0000:00:02.0/hdmi-lpe-audio/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "22b0"
device.product.name = "Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers"
device.string = "0"
device.description = "Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: no)
output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: no)
output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: no)
output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: no)
output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 600, available: no)
output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 600, available: no)
off: Off (priority 0, available: unknown)
active profile: <off>
ports:
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
然而,ALSA 似乎可以很好地识别该卡:
~$ cat /proc/asound/cards
0 [Audio ]: HdmiLpeAudio - Intel HDMI/DP LPE Audio
Intel HDMI/DP LPE Audio
1 [bytchtes8316 ]: bytcht-es8316 - bytcht-es8316
Insyde-CherryTrail
~$ aplay -L
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=Audio
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Default Audio Device
hdmi:CARD=Audio,DEV=0
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
HDMI Audio Output
hdmi:CARD=Audio,DEV=1
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
HDMI Audio Output
hdmi:CARD=Audio,DEV=2
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
HDMI Audio Output
dmix:CARD=Audio,DEV=0
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Direct sample mixing device
dmix:CARD=Audio,DEV=1
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Direct sample mixing device
dmix:CARD=Audio,DEV=2
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Direct sample mixing device
dsnoop:CARD=Audio,DEV=0
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Direct sample snooping device
dsnoop:CARD=Audio,DEV=1
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Direct sample snooping device
dsnoop:CARD=Audio,DEV=2
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Direct sample snooping device
hw:CARD=Audio,DEV=0
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Direct hardware device without any conversions
hw:CARD=Audio,DEV=1
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Direct hardware device without any conversions
hw:CARD=Audio,DEV=2
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Direct hardware device without any conversions
plughw:CARD=Audio,DEV=0
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Hardware device with all software conversions
plughw:CARD=Audio,DEV=1
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Hardware device with all software conversions
plughw:CARD=Audio,DEV=2
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio
Hardware device with all software conversions
sysdefault:CARD=bytchtes8316
bytcht-es8316,
Default Audio Device
dmix:CARD=bytchtes8316,DEV=0
bytcht-es8316,
Direct sample mixing device
dmix:CARD=bytchtes8316,DEV=1
bytcht-es8316,
Direct sample mixing device
dsnoop:CARD=bytchtes8316,DEV=0
bytcht-es8316,
Direct sample snooping device
dsnoop:CARD=bytchtes8316,DEV=1
bytcht-es8316,
Direct sample snooping device
hw:CARD=bytchtes8316,DEV=0
bytcht-es8316,
Direct hardware device without any conversions
hw:CARD=bytchtes8316,DEV=1
bytcht-es8316,
Direct hardware device without any conversions
plughw:CARD=bytchtes8316,DEV=0
bytcht-es8316,
Hardware device with all software conversions
plughw:CARD=bytchtes8316,DEV=1
bytcht-es8316,
Hardware device with all software conversions
但话又说回来,如果我尝试手动指定一张卡来播放 wav 文件,aplay
就会出现错误:
~$ aplay -D hw:CARD=bytchtes8316,DEV=0 ./wz/01-10.wav
Playing WAVE './wz/01-10.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
aplay: set_params:1345: Channels count non available
~$ aplay -D plughw:CARD=bytchtes8316,DEV=0 ./wz/01-10.wav
Playing WAVE './wz/01-10.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
aplay: set_params:1403: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 16000
PERIOD_TIME: 125000
PERIOD_SIZE: 2000
PERIOD_BYTES: 4000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 8000
BUFFER_BYTES: 16000
TICK_TIME: 0
我读了很多其他的答案,并尝试了通常的重新启动 ALSA/PA、清除/重建 PA 配置,甚至清除并重新安装 ALSA/PA,但什么都没有改变。
编辑:我还应该注意,连接蓝牙耳机将导致 PA 看到新的 BT 卡,并且能够输出音频(尽管会严重卡顿,但这超出了本文的范围)。对我来说,这意味着 PA 实际上可以正常工作,我只需要让它以某种方式看到卡。
我现在能做什么?
作为参考,这里是的完整输出pacmd info
,如果它有任何用处:
~$ pacmd info
Memory blocks currently allocated: 1, size: 63.9 KiB.
Memory blocks allocated during the whole lifetime: 102, size: 3.0 MiB.
Memory blocks imported from other processes: 0, size: 0 B.
Memory blocks exported to other processes: 0, size: 0 B.
Total sample cache size: 0 B.
Default sample spec: s16le 2ch 44100Hz
Default channel map: front-left,front-right
Default sink name: auto_null
Default source name: auto_null.monitor
Memory blocks of type POOL: 1 allocated/85 accumulated.
Memory blocks of type POOL_EXTERNAL: 0 allocated/0 accumulated.
Memory blocks of type APPENDED: 0 allocated/0 accumulated.
Memory blocks of type USER: 0 allocated/0 accumulated.
Memory blocks of type FIXED: 0 allocated/0 accumulated.
Memory blocks of type IMPORTED: 0 allocated/17 accumulated.
27 module(s) loaded.
index: 0
name: <module-device-restore>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Automatically restore the volume/mute state of devices"
module.version = "12.2"
index: 1
name: <module-stream-restore>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Automatically restore the volume/mute/device state of streams"
module.version = "12.2"
index: 2
name: <module-card-restore>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Automatically restore profile of cards"
module.version = "12.2"
index: 3
name: <module-augment-properties>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Augment the property sets of streams with additional static information"
module.version = "12.2"
index: 4
name: <module-switch-on-port-available>
argument: <>
used: -1
load once: yes
properties:
module.author = "David Henningsson"
module.description = "Switches ports and profiles when devices are plugged/unplugged"
module.version = "12.2"
index: 5
name: <module-switch-on-connect>
argument: <>
used: -1
load once: yes
properties:
module.author = "Michael Terry"
module.description = "When a sink/source is added, switch to it or conditionally switch to it"
module.version = "12.2"
index: 6
name: <module-udev-detect>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Detect available audio hardware and load matching drivers"
module.version = "12.2"
index: 7
name: <module-alsa-card>
argument: <device_id="0" name="pci-0000_00_02.0-platform-hdmi-lpe-audio" card_name="alsa_card.pci-0000_00_02.0-platform-hdmi-lpe-audio" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1">
used: 0
load once: no
properties:
module.author = "Lennart Poettering"
module.description = "ALSA Card"
module.version = "12.2"
index: 9
name: <module-bluetooth-policy>
argument: <>
used: -1
load once: yes
properties:
module.author = "Frédéric Dalleau, Pali Rohár"
module.description = "Policy module to make using bluetooth devices out-of-the-box easier"
module.version = "12.2"
index: 10
name: <module-bluetooth-discover>
argument: <>
used: -1
load once: yes
properties:
module.author = "João Paulo Rechi Vita"
module.description = "Detect available Bluetooth daemon and load the corresponding discovery module"
module.version = "12.2"
index: 11
name: <module-bluez5-discover>
argument: <>
used: -1
load once: yes
properties:
module.author = "João Paulo Rechi Vita"
module.description = "Detect available BlueZ 5 Bluetooth audio devices and load BlueZ 5 Bluetooth audio drivers"
module.version = "12.2"
index: 12
name: <module-native-protocol-unix>
argument: <>
used: -1
load once: no
properties:
module.author = "Lennart Poettering"
module.description = "Native protocol (UNIX sockets)"
module.version = "12.2"
index: 13
name: <module-gsettings>
argument: <>
used: -1
load once: yes
properties:
module.author = "Sylvain Baubeau"
module.description = "GSettings Adapter"
module.version = "12.2"
index: 14
name: <module-default-device-restore>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Automatically restore the default sink and source"
module.version = "12.2"
index: 15
name: <module-rescue-streams>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "When a sink/source is removed, try to move its streams to the default sink/source"
module.version = "12.2"
index: 16
name: <module-always-sink>
argument: <>
used: -1
load once: yes
properties:
module.author = "Colin Guthrie"
module.description = "Always keeps at least one sink loaded even if it's a null one"
module.version = "12.2"
index: 17
name: <module-null-sink>
argument: <sink_name=auto_null sink_properties='device.description="Dummy Output"'>
used: 0
load once: no
properties:
module.author = "Lennart Poettering"
module.description = "Clocked NULL sink"
module.version = "12.2"
index: 18
name: <module-intended-roles>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Automatically set device of streams based on intended roles of devices"
module.version = "12.2"
index: 19
name: <module-suspend-on-idle>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "When a sink/source is idle for too long, suspend it"
module.version = "12.2"
index: 20
name: <module-console-kit>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Create a client for each ConsoleKit session of this user"
module.version = "12.2"
index: 21
name: <module-systemd-login>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Create a client for each login session of this user"
module.version = "12.2"
index: 22
name: <module-position-event-sounds>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them."
module.version = "12.2"
index: 23
name: <module-role-cork>
argument: <>
used: -1
load once: yes
properties:
module.author = "Lennart Poettering"
module.description = "Mute & cork streams with certain roles while others exist"
module.version = "12.2"
index: 24
name: <module-snap-policy>
argument: <>
used: -1
load once: yes
properties:
module.author = "Canonical Ltd"
module.description = "Ubuntu Snap policy management"
module.version = "12.2"
index: 25
name: <module-filter-heuristics>
argument: <>
used: -1
load once: yes
properties:
module.author = "Colin Guthrie"
module.description = "Detect when various filters are desirable"
module.version = "12.2"
index: 26
name: <module-filter-apply>
argument: <>
used: -1
load once: yes
properties:
module.author = "Colin Guthrie"
module.description = "Load filter sinks automatically when needed"
module.version = "12.2"
index: 44
name: <module-cli-protocol-unix>
argument: <>
used: -1
load once: no
properties:
module.author = "Lennart Poettering"
module.description = "Command line interface protocol (UNIX sockets)"
module.version = "12.2"
1 sink(s) available.
* index: 0
name: <auto_null>
driver: <module-null-sink.c>
flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 1000
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max request: 344 KiB
max rewind: 344 KiB
monitor source: 0
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
module: 17
properties:
device.description = "Dummy Output"
device.class = "abstract"
device.icon_name = "audio-card"
1 source(s) available.
* index: 0
name: <auto_null.monitor>
driver: <module-null-sink.c>
flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 1000
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 344 KiB
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
monitor_of: 0
module: 17
properties:
device.description = "Monitor of Dummy Output"
device.class = "monitor"
device.icon_name = "audio-input-microphone"
8 client(s) logged in.
index: 0
driver: <module-systemd-login.c>
owner module: 21
properties:
application.name = "Login Session c2"
systemd-login.session = "c2"
index: 1
driver: <protocol-native.c>
owner module: 12
properties:
application.name = "unity-panel-service"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "32"
window.x11.display = ":0"
window.x11.screen = "0"
application.process.id = "1764"
application.process.user = "crossgate"
application.process.host = "EZPM3"
application.process.binary = "unity-panel-service"
application.language = "en_US.UTF-8"
application.process.machine_id = "998f9a12ea834827856eacfaeedd2dc7"
index: 2
driver: <protocol-native.c>
owner module: 12
properties:
application.name = "Terminal"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "32"
application.icon_name = "utilities-terminal"
window.x11.display = ":0"
window.x11.screen = "0"
application.process.id = "2050"
application.process.user = "crossgate"
application.process.host = "EZPM3"
application.process.binary = "gnome-terminal-server"
application.language = "en_US.UTF-8"
application.process.machine_id = "998f9a12ea834827856eacfaeedd2dc7"
index: 3
driver: <protocol-native.c>
owner module: 12
properties:
application.name = "Ubuntu Audio Settings"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "32"
application.id = "com.canonical.settings.sound"
application.icon_name = "multimedia-volume-control"
application.version = "0.1"
application.process.id = "1593"
application.process.user = "crossgate"
application.process.host = "EZPM3"
application.process.binary = "indicator-sound-service"
application.language = "en_US.UTF-8"
window.x11.display = ":0"
application.process.machine_id = "998f9a12ea834827856eacfaeedd2dc7"
index: 4
driver: <protocol-native.c>
owner module: 12
properties:
application.name = "Ubuntu Audio Settings"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "32"
application.id = "com.canonical.settings.sound"
application.icon_name = "multimedia-volume-control"
application.version = "0.1"
application.process.id = "1593"
application.process.user = "crossgate"
application.process.host = "EZPM3"
application.process.binary = "indicator-sound-service"
application.language = "en_US.UTF-8"
window.x11.display = ":0"
application.process.machine_id = "998f9a12ea834827856eacfaeedd2dc7"
index: 7
driver: <protocol-native.c>
owner module: 12
properties:
application.name = "GNOME Volume Control Media Keys"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "32"
application.id = "org.gnome.VolumeControl"
application.icon_name = "multimedia-volume-control"
application.version = "1.0"
application.process.id = "1592"
application.process.user = "crossgate"
application.process.host = "EZPM3"
application.process.binary = "unity-settings-daemon"
application.language = "en_US.UTF-8"
window.x11.display = ":0"
application.process.machine_id = "998f9a12ea834827856eacfaeedd2dc7"
index: 16
driver: <protocol-native.c>
owner module: 12
properties:
application.name = "Chrome input"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "32"
application.process.id = "3407"
application.process.user = "crossgate"
application.process.host = "EZPM3"
application.process.binary = "chrome"
application.language = "en_US.UTF-8"
window.x11.display = ":0"
application.process.machine_id = "998f9a12ea834827856eacfaeedd2dc7"
index: 22
driver: <cli.c>
owner module: 44
properties:
application.name = "UNIX socket client"
1 card(s) available.
index: 0
name: <alsa_card.pci-0000_00_02.0-platform-hdmi-lpe-audio>
driver: <module-alsa-card.c>
owner module: 7
properties:
alsa.card = "0"
alsa.card_name = "Intel HDMI/DP LPE Audio"
alsa.long_card_name = "Intel HDMI/DP LPE Audio"
alsa.driver_name = "snd_hdmi_lpe_audio"
device.bus_path = "pci-0000:00:02.0-platform-hdmi-lpe-audio"
sysfs.path = "/devices/pci0000:00/0000:00:02.0/hdmi-lpe-audio/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "22b0"
device.product.name = "Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers"
device.string = "0"
device.description = "Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: no)
output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: no)
output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: no)
output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: no)
output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 600, available: no)
output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 600, available: no)
off: Off (priority 0, available: unknown)
active profile: <off>
ports:
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
0 sink input(s) available.
0 source output(s) available.
0 cache entrie(s) available.