ALSA의 .asoundrc 파일이 플러그 유형 대신 hw 유형을 사용할 때 왜곡되거나 딱딱거리는 소리가 납니다.

ALSA의 .asoundrc 파일이 플러그 유형 대신 hw 유형을 사용할 때 왜곡되거나 딱딱거리는 소리가 납니다.

Ubuntu 14.04 및 Kodi 14.1을 실행하는 HTPC에 XBMCbuntu가 설치되어 있습니다. 저는 게이밍 PC에서 게임을 스트리밍할 수 있도록 Steam을 설치하고 실행하려고 노력해 왔습니다. 나는 다음 단계를 따랐다.이 가이드PulseAudio에서 소리가 전혀 나지 않고 ALSA와 PA 간 전환 시 사전 및 사후 스크립트가 작동하지 않았기 때문에 ALSA만 사용했습니다.

~/.asoundrc가 다음과 같을 때 Kodi의 오디오가 제대로 작동합니다.

pcm.dsp {
    type plug
    slave.pcm "dmixer"
}

pcm.dsp0 {
    type plug
    slave.pcm "dmixer"
}

pcm.!default {
    type plug
    slave.pcm "dmixer"
}

ctl.!default {
    type plug
    slave.pcm "dmixer"
}

pcm.dmixer {
    type dmix
    ipc_key 101
    slave {
        pcm "hw:0,3"
        period_time 0
        period_size 1024
        buffer_size 4096
        rate 48000
    }
    bindings {
        0  0
        1  1
    }
 }

그런데 메뉴에서 스팀을 실행하면 오디오가 찌그러지고 딱딱거리는 소리가 나고 전체적으로 깨지긴 하지만 소리는 나고 인식은 됩니다. 약간의 실험과 시행착오를 통해 이를 정확히 찾아낼 수 있었습니다.

ctl.!default {
    type hw
    card 0
}

Kodi에서도 같은 깨진 소리가 들릴 것입니다. 그리고 그

ctl.!default {
    type plug
    slave.pcm "hdmi:CARD=HDMI,DEV=0"
}

나에게 적절한 소리를 준다. dmix 장치에 "플러그" 장치를 사용하려고 했지만 소리가 전혀 나지 않았고 추가 조사를 통해 작동하지 않는 것으로 확인되었습니다. dmix 장치에서 "플러그" 장치를 사용할 수 없기 때문에 dmix에서 동일한 "플러그" 장치를 사용할 수 있는 솔루션이 필요합니다.또는어떻게든 "hw" 장치를 고쳐보세요. 아래에서 내 aplay -l 및 aplay -L을 찾을 수 있습니다. 또한 aplay -l에 나열된 카드 0에 대한 장치 0이 없기 때문에 "hdmi:CARD=HDMI,DEV=0"이 어디에서 왔는지 다소 혼란스럽습니다. aplay -L에서 볼 수 있지만 다른 모든 PCM은 aplay -l의 장치에서 나옵니다. 또한 HDMI를 사용하여 TV와 수신기에 연결되어 있으며 ALC1150 장치를 사용하면 Kodi나 ~/.asoundrc의 시스템 옵션에서 작동하지 않습니다.

$aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC1150 Analog [ALC1150 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC1150 Digital [ALC1150 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
dsp
dsp0
default
dmixer
hdmi:CARD=HDMI,DEV=0
    HDA ATI HDMI, HDMI 0
    HDMI Audio Output
dmix:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 0
    Direct sample mixing device
dsnoop:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 0
    Direct sample snooping device
hw:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 0
    Direct hardware device without any conversions
plughw:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 0
    Hardware device with all software conversions
sysdefault:CARD=Generic
    HD-Audio Generic, ALC1150 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    Front speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Digital
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    Direct sample mixing device
dmix:CARD=Generic,DEV=1
    HD-Audio Generic, ALC1150 Digital
    Direct sample mixing device
dsnoop:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    Direct sample snooping device
dsnoop:CARD=Generic,DEV=1
    HD-Audio Generic, ALC1150 Digital
    Direct sample snooping device
hw:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    Direct hardware device without any conversions
hw:CARD=Generic,DEV=1
    HD-Audio Generic, ALC1150 Digital
    Direct hardware device without any conversions
plughw:CARD=Generic,DEV=0
    HD-Audio Generic, ALC1150 Analog
    Hardware device with all software conversions
plughw:CARD=Generic,DEV=1
    HD-Audio Generic, ALC1150 Digital
    Hardware device with all software conversions

답변1

아래 버그 보고서에 가능한 해결 방법이 있습니다. 기본적으로 모듈 옵션을 추가하고 믹서 스크립트를 사용하여 디지털 장치를 음소거/음소거 해제하는 것입니다.

최소한 버그를 구독하고 그것이 자신에게 영향을 미친다는 사실을 알려야 합니다.

https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/359361

관련 정보