音频数据转储到音频接收器但扬声器没有音频

时间:2017-01-11 05:42:13

标签: linux audio alsa pulseaudio speaker

我使用的是Baytrail intel z3735平板电脑。我正在尝试使用Linux内核版本3.16 / 4.2.0运行ubuntu 14.04 / 15.04。当我播放音频文件时,音频数据会转储到音频接收器,但扬声器没有音频。我能够检测到声卡如下...

sanj@sanj:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: bytrt5640 [byt-rt5640], device 0: Audio rt5640-aif1-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
sanj@sanj:~$ 

音频接收节点:

sanj@sanj:~$ pactl list sinks
Sink #0
    State: SUSPENDED
    Name: alsa_output.platform-byt-rt5640.analog-stereo
    Description: byt-rt5640 Analog Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 48000Hz
    Channel Map: front-left,front-right
    Owner Module: 6
    Mute: no
    Volume: front-left: 99957 / 153% / 11.00 dB,   front-right: 99957 / 153% / 11.00 dB
            balance 0.00
    Base Volume: 41350 /  63% / -12.00 dB
    Monitor Source: alsa_output.platform-byt-rt5640.analog-stereo.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = ""
        alsa.id = "Audio rt5640-aif1-0"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "byt-rt5640"
        alsa.long_card_name = "byt-rt5640"
        alsa.driver_name = "snd_soc_sst_byt_rt5640_mach"
        device.bus_path = "platform-byt-rt5640"
        sysfs.path = "/devices/platform/80860F28:00/byt-rt5640/sound/card0"
        device.string = "hw:0"
        device.buffering.buffer_size = "96000"
        device.buffering.fragment_size = "48000"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analog Stereo"
        device.description = "byt-rt5640 Analog Stereo"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card"
    Ports:
        analog-output-speaker: Speakers (priority: 10000)
        analog-output-headphones: Headphones (priority: 9000)
    Active Port: analog-output-speaker
    Formats:
        pcm

音频源节点:

sanj@sanj:~$ pactl list sources
Source #0
    State: SUSPENDED
    Name: alsa_output.platform-byt-rt5640.analog-stereo.monitor
    Description: Monitor of byt-rt5640 Analog Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 48000Hz
    Channel Map: front-left,front-right
    Owner Module: 6
    Mute: no
    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
    Monitor of Sink: alsa_output.platform-byt-rt5640.analog-stereo
    Latency: 0 usec, configured 0 usec
    Flags: DECIBEL_VOLUME LATENCY 
    Properties:
        device.description = "Monitor of byt-rt5640 Analog Stereo"
        device.class = "monitor"
        alsa.card = "0"
        alsa.card_name = "byt-rt5640"
        alsa.long_card_name = "byt-rt5640"
        alsa.driver_name = "snd_soc_sst_byt_rt5640_mach"
        device.bus_path = "platform-byt-rt5640"
        sysfs.path = "/devices/platform/80860F28:00/byt-rt5640/sound/card0"
        device.string = "0"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card"
    Formats:
        pcm

Source #1
    State: SUSPENDED
    Name: alsa_input.platform-byt-rt5640.analog-stereo
    Description: byt-rt5640 Analog Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 48000Hz
    Channel Map: front-left,front-right
    Owner Module: 6
    Mute: no
    Volume: front-left: 93554 / 143% / 9.27 dB,   front-right: 93554 / 143% / 9.27 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor of Sink: n/a
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = ""
        alsa.id = "Audio rt5640-aif1-0"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "byt-rt5640"
        alsa.long_card_name = "byt-rt5640"
        alsa.driver_name = "snd_soc_sst_byt_rt5640_mach"
        device.bus_path = "platform-byt-rt5640"
        sysfs.path = "/devices/platform/80860F28:00/byt-rt5640/sound/card0"
        device.string = "hw:0"
        device.buffering.buffer_size = "96000"
        device.buffering.fragment_size = "48000"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analog Stereo"
        device.description = "byt-rt5640 Analog Stereo"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card"
    Ports:
        analog-input: Analog Input (priority: 10000)
    Active Port: analog-input
    Formats:
        pcm
sanj@sanj:~$ 

为了测试音频是否即将到来,我正在使用来自不同终端的pulseaudio命令 paplay parecord 。由于源0是汇聚节点0的源监控节点,因此我从中捕获了音频。

sanj@sanj:~$ paplay Dhaakad.wav 
sanj@sanj:~$ parecord -d 0 > test.wav

然后我在PC上用大胆测试了捕获的音频文件 test.wav 并且播放正常。我无法弄清楚为什么音频不是来自扬声器。我还尝试使用 alsamixer 更改音频设置,但没有任何效果。

0 个答案:

没有答案