[Linux] Odd Audio Distortion
#1
I tried searching the forum to see if anybody had this issue before, but can't seem to find anything like it.

So I had XBMC running fine using A/V cables to provide sound to my reciever. Then I decided to switch over to optical audio for passthrough and increased quality. I followed the wiki and created the following .asoundrc file and used plug:dmixer in XBMC for the custom output:

asoundrc:
Code:
pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,1"
        period_time 0
        period_size 1024
        buffer_size 8192
        #periods 128
        #rate 44100
        rate 48000
     }
     bindings {
        0 0
        1 1
     }
}

After doing this and seeing that sound worked, I then started watching a video again, but noticed that the sound was now slightly wrong. It sounded like it had slowed down every so slightly, but noticeably, and was thus also slightly deeper sounding. Same thing was happening with playing music files, slightly slowed and slightly deeper

My first thought was that it had something to do with the rate being locked, so I commented it out of the .asoundrc file, but it seemed to have no effect. Attempting to narrow it down more I changed my output from plug:dmixer to plughw:0,1. This seemed to fix the music files (yay!), however going back into a video it still had the same distortions.

Just as an attempt to troubleshoot, I then played the video, went into the audio options and switched from Digital output to Analog output and it fixed the issue. However switching back didn't revert back to the distorted audio. It appears that all I have to do is go into the audio options and flip the output and it works from then on (regardless of how I flip back and forth), so it's not a problem strictly with Analog/Digital, but I'm at a loss to what the problem is.

Also as a bit of info, I tried it in Boxee on the same machine as well, and it is NOT displaying this same behavior using the same settings.

Relevent Info:
XBMC Version: 9.11
Linux Version: Ubuntu 9.04 - Jaunty
Alsa Version: 1.0.18rc3
Sound Hardware: 02:02.0 Multimedia audio controller: VIA Technologies Inc. VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller (rev 01)

Code:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ICE1724 [ICEnsemble ICE1724], device 0: ICE1724 [ICE1724]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: ICE1724 [ICEnsemble ICE1724], device 1: IEC1724 IEC958 [IEC1724 IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Here is also the output from xbmc.log of me starting the video, having distorted audio, switching the output type and having the audio then sound correct. I couldn't find anything relevant in it, but maybe one of you can.

xbmc.log:
Code:
08:35:14 T:3035375488 M:1744785408  NOTICE: DVDPlayer: Opening: /mnt/media/TV/Dexter/Dexter S02E02 - Waiting to Exhale.avi
08:35:14 T:3035375488 M:1744785408 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
08:35:14 T:2923219856 M:1744785408  NOTICE: Creating InputStream
08:35:14 T:2923219856 M:1744785408  NOTICE: Creating Demuxer
08:35:14 T:2923219856 M:1738833920  NOTICE: Opening video stream: 0 source: 256
08:35:14 T:2923219856 M:1738833920  NOTICE: Creating video codec with codec id: 13
08:35:14 T:2923219856 M:1738833920  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
08:35:14 T:2923219856 M:1738833920  NOTICE: Creating video thread
08:35:14 T:2923219856 M:1738833920  NOTICE: Opening audio stream: 1 source: 256
08:35:14 T:2839878544 M:1738833920  NOTICE: running thread: video_thread
08:35:14 T:2923219856 M:1738833920  NOTICE: Finding audio codec for: 86017
08:35:14 T:2923219856 M:1738833920  NOTICE: Creating audio thread
08:35:14 T:2831485840 M:1738833920  NOTICE: running thread: CDVDPlayerAudio::Process()
08:35:14 T:2839878544 M:1738743808  NOTICE:  fps: 23.976000, pwidth: 640, pheight: 352, dwidth: 640, dheight: 352
08:35:14 T:2839878544 M:1738743808  NOTICE: Display resolution ADJUST : 1024x768 @ 50.00 - Full Screen (12)
08:35:14 T:3035375488 M:1736179712  NOTICE: Using GL_TEXTURE_2D
08:35:14 T:3035375488 M:1736179712  NOTICE: GL: Selecting Single Pass YUV 2 RGB shader
08:35:14 T:3035375488 M:1736179712  NOTICE: GL: NPOT texture support detected
08:35:15 T:2831485840 M:1739190272  NOTICE: Creating audio device with codec id: 86017, channels: 2, sample rate: 48000, no pass-through
08:35:15 T:2831485840 M:1739190272   ERROR: PulseAudio: Waited for the stream but it failed
08:35:22 T:3035375488 M:1741172736  NOTICE: DVDPlayer: Opening: /mnt/media/TV/Dexter/Dexter S02E02 - Waiting to Exhale.avi
08:35:22 T:3035375488 M:1741172736  NOTICE: CDVDPlayer::CloseFile()
08:35:22 T:3035375488 M:1741172736  NOTICE: DVDPlayer: waiting for threads to exit
08:35:22 T:2923219856 M:1741172736  NOTICE: CDVDPlayer::OnExit()
08:35:22 T:2923219856 M:1741172736  NOTICE: DVDPlayer: closing audio stream
08:35:22 T:2923219856 M:1741172736  NOTICE: Closing audio stream
08:35:22 T:2923219856 M:1741172736  NOTICE: Waiting for audio thread to exit
08:35:22 T:2831485840 M:1741172736  NOTICE: thread end: CDVDPlayerAudio::OnExit()
08:35:22 T:2923219856 M:1741172736  NOTICE: Closing audio device
08:35:22 T:2923219856 M:1741172736  NOTICE: Deleting audio codec
08:35:22 T:2923219856 M:1741172736  NOTICE: DVDPlayer: closing video stream
08:35:22 T:2923219856 M:1741172736  NOTICE: Closing video stream
08:35:22 T:2923219856 M:1741172736  NOTICE: waiting for video thread to exit
08:35:22 T:2839878544 M:1741172736  NOTICE: thread end: video_thread
08:35:22 T:2923219856 M:1741172736  NOTICE: deleting video codec
08:35:22 T:2923219856 M:1741172736  NOTICE: CDVDPlayer::OnExit() deleting demuxer
08:35:22 T:2923219856 M:1745989632  NOTICE: CDVDPlayer::OnExit() deleting input stream
08:35:22 T:3035375488 M:1745989632  NOTICE: DVDPlayer: finished waiting
08:35:22 T:3035375488 M:1745989632 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
08:35:22 T:2896161680 M:1745989632  NOTICE: Creating InputStream
08:35:22 T:2896161680 M:1745989632  NOTICE: Creating Demuxer
08:35:22 T:2896161680 M:1741172736  NOTICE: Opening video stream: 0 source: 256
08:35:22 T:2896161680 M:1741172736  NOTICE: Creating video codec with codec id: 13
08:35:22 T:2896161680 M:1741172736  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
08:35:22 T:2896161680 M:1741172736  NOTICE: Creating video thread
08:35:22 T:2896161680 M:1741172736  NOTICE: Opening audio stream: 1 source: 256
08:35:22 T:2932865936 M:1741172736  NOTICE: running thread: video_thread
08:35:22 T:2896161680 M:1741172736  NOTICE: Finding audio codec for: 86017
08:35:22 T:2896161680 M:1741172736  NOTICE: Creating audio thread
08:35:22 T:2914827152 M:1741172736  NOTICE: running thread: CDVDPlayerAudio::Process()
08:35:22 T:2932865936 M:1741172736  NOTICE:  fps: 23.976000, pwidth: 640, pheight: 352, dwidth: 640, dheight: 352
08:35:22 T:2932865936 M:1741172736  NOTICE: Display resolution ADJUST : 1024x768 @ 50.00 - Full Screen (12)
08:35:22 T:3035375488 M:1741172736  NOTICE: Using GL_TEXTURE_2D
08:35:22 T:3035375488 M:1741172736  NOTICE: GL: Selecting Single Pass YUV 2 RGB shader
08:35:22 T:3035375488 M:1741172736  NOTICE: GL: NPOT texture support detected
08:35:23 T:2914827152 M:1741172736  NOTICE: Creating audio device with codec id: 86017, channels: 2, sample rate: 48000, no pass-through
08:35:23 T:2914827152 M:1741086720   ERROR: PulseAudio: Waited for the stream but it failed

Thanks for the assistance!
Reply

Logout Mark Read Team Forum Stats Members Help
[Linux] Odd Audio Distortion0