Linux Sound only in videos, not in music.
#1
Hi there, i'm trying to get a Soundblaster Extigy to work with a XBMC Ubunto on a Toshiba laptop (wich also has it's own internal soundcard).

I got sound in movies but when i try to play music it gives me the error "failed to initialize sound device".

I enabled the LOG , played a few seconds of a movie, stopped it and then tried to play an MP3, i see the error in the LOG file, i just have no clue of what to do to solve it, i'v searched this forum back and forth and i didn't find any answer.

My goal is to get two channel audio from the extigy,and although the movies play with audio and it sounds ok, the log gives-me doubts if the downmix is working or i am only getting the sound of the FR+FR of a 6-channel output.

Quote:-------------VIDEO-OK-SOUND-------------------------------

01:45:37 T:3057101680 NOTICE: Creating audio thread
01:45:37 T:3057101680 DEBUG: CDVDPlayer::SetCaching - caching state 2
01:45:37 T:3057101680 DEBUG: CheckPlayerInit - dropping packet type:2 dts:83000.000000 to get to start point at 167000.000000
01:45:37 T:3057101680 DEBUG: CheckPlayerInit - dropping packet type:2 dts:42000.000000 to get to start point at 167000.000000
01:45:37 T:3057101680 DEBUG: CheckPlayerInit - dropping packet type:2 dts:125000.000000 to get to start point at 167000.000000
01:45:37 T:2836388720 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
01:45:37 T:2836388720 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
01:45:37 T:2836388720 DEBUG: VAAPI - attempting to open codec 28 with profile 100 at level 41 with 5 reference frames
01:45:37 T:2827996016 DEBUG: Thread CDVDPlayerAudio start, auto delete: 0
01:45:37 T:2827996016 NOTICE: running thread: CDVDPlayerAudio:Tonguerocess()
01:45:37 T:2827996016 NOTICE: Creating audio device with codec id: 86020, channels: 6, sample rate: 48000, no pass-through
01:45:37 T:2827996016 INFO: CPCMRemap: Configured speaker layout: 2.0
01:45:37 T:2827996016 INFO: CPCMRemap: I channel map: FL,FR,CE,LFE,SL,SR
01:45:37 T:2827996016 DEBUG: CPCMRemap: Forcing side channel map to back channels
01:45:37 T:2827996016 INFO: CPCMRemap: O channel map: FL,FR
01:45:37 T:2827996016 DEBUG: CPCMRemap: Downmix normalization is disabled
01:45:37 T:2827996016 DEBUG: CPCMRemap: FL = FL(1.000000) CE(0.707107) LFE(0.707107) BL(1.000000)
01:45:37 T:2827996016 DEBUG: CPCMRemap: FR = FR(1.000000) CE(0.707107) LFE(0.707107) BR(1.000000)
01:45:37 T:2827996016 DEBUG: CALSADirectSound::CALSADirectSound - Requested channels changed from 6 to 2
01:45:37 T:2827996016 DEBUG: RemoveActiveDevice - Removing device 1
01:45:37 T:2827996016 DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
01:45:37 T:2827996016 DEBUG: RemoveActiveDevice - Removing device 0
01:45:37 T:2836388720 DEBUG: VAAPI - initialize version 0.32
01:45:37 T:2836388720 ERROR: VAAPI - unable to initialize display -1 - unknown libva error
01:45:37 T:2836388720 INFO: ffmpeg[A90FDB70]: [h264] Cannot parallelize deblocking type 1, decoding such frames in sequential order
01:45:37 T:2836388720 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(167000.000000, 0)
01:45:37 T:2827996016 DEBUG: Initialize - using alsa device plug:'iec958:CARD=Extigy,DEV=0'
01:45:37 T:2827996016 DEBUG: CALSADirectSound::Initialize - frame count:512, packet count:16, buffer size:8192
01:45:37 T:9648576 DEBUG: CGUIInfoManager::SetCurrentMovie(rar://smb%3a%2f%2fHOSAKA%2fMovies%2fCleanskin%2e2012%2e1080p%2eBluRay%2eX264%2dRRH%2frrh%2dcleanskin%2erar/rrh-cleanskin.mkv)
01:45:37 T:2836388720 NOTICE: fps: 23.976024, pwidth: 1920, pheight: 808, dwidth: 1920, dheight: 808
01:45:37 T:2836388720 DEBUG: OutputPicture - change configuration. 1920x808. framerate: 23.98. format: YV12
01:45:37 T:2836388720 NOTICE: Display resolution DESKTOP : 1920x1080 @ 60.00 - Full Screen (12)
01:45:37 T:9648576 DEBUG: GetMovieId (rar://smb%3a%2f%2fHOSAKA%2fMovies%2fCleanskin%2e2012%2e1080p%2eBluRay%2eX264%2dRRH%2frrh%2dcleanskin%2erar/rrh-cleanskin.mkv), query = select idMovie from movie where idFile=407
01:45:37 T:2827996016 DEBUG: CALSADirectSound::Initialize - Channels: 6 - SampleRate: 48000 - SampleBit: 16 - Resample false - IsMusic false - IsPassthrough 0 - audioDevice: iec958:CARD=Extigy,DEV=0
01:45:37 T:2827996016 DEBUG: CDVDPlayerAudio:: synctype set to 0: clock feedback
01:45:37 T:3057101680 DEBUG: CDVDPlayer::HandleMessages - player started 2
01:45:37 T:3057101680 DEBUG: CDVDPlayer::HandleMessages - player started 1
01:45:37 T:3057101680 DEBUG: CDVDPlayer::SetCaching - caching state 0
01:45:37 T:2827996016 DEBUG: CPCMRemap:: max gain: 3.414214, enabling limiter
01:45:37 T:2827996016 DEBUG: CDVDPlayerAudio:: Discontinuity - was:694.015000, should be:0.000000, error:-694.015000
01:45:37 T:2827996016 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(10000.000000, 1)
01:45:37 T:9648576 DEBUG: LoadVideoInfo, got movie info!

-------------MP3-NOK-SOUND-------------------------------

01:46:10 T:9648576 DEBUG: CPlayerCoreFactory::GetPlayers: adding audiodefaultplayer (3)
01:46:10 T:9648576 DEBUG: CPlayerCoreFactory::GetPlayers: for video=0, audio=1
01:46:10 T:9648576 DEBUG: CPlayerCoreFactory::GetPlayers: adding player: PAPlayer (3)
01:46:10 T:9648576 DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
01:46:10 T:9648576 DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
01:46:10 T:9648576 DEBUG: CPlayerCoreFactory::GetPlayers: added 2 players
01:46:10 T:9648576 DEBUG: CGUIAudioManager:Big GrineInitialize
01:46:10 T:2934958960 DEBUG: GetImageHash - unable to stat url smb://HOSAKA/MP3 Done/!!!/!!! -!!!/cdart.png
01:46:10 T:9648576 DEBUG: CFileCache::Open - opening <3/1/1.mp3> using cache
01:46:10 T:9648576 DEBUG: CFileSMB::Open - opened MP3 Done/!!!/!!! -!!!/01.!!!_-_the_step.mp3, fd=10000
01:46:10 T:9648576 DEBUG: DllLibApeTag: Using libapetag library
01:46:10 T:2827996016 DEBUG: Thread XFILE::CFileCache start, auto delete: 0
01:46:10 T:9648576 DEBUG: CFileSMB::Open - opened MP3 Done/!!!/!!! -!!!/01.!!!_-_the_step.mp3, fd=10001
01:46:10 T:9648576 DEBUG: CFileSMB::Close closing fd 10001
01:46:10 T:9648576 DEBUG: CFileSMB::Open - opened MP3 Done/!!!/!!! -!!!/01.!!!_-_the_step.mp3, fd=10001
01:46:10 T:9648576 DEBUG: CFileSMB::Close closing fd 10001
01:46:10 T:9648576 DEBUG: DllLibApeTag: Using libapetag library
01:46:10 T:9648576 DEBUG: CFileSMB::Open - opened MP3 Done/!!!/!!! -!!!/01.!!!_-_the_step.mp3, fd=10001
01:46:10 T:9648576 DEBUG: CFileSMB::Close closing fd 10001
01:46:10 T:9648576 DEBUG: CFileSMB::Open - opened MP3 Done/!!!/!!! -!!!/01.!!!_-_the_step.mp3, fd=10001
01:46:10 T:9648576 DEBUG: CFileSMB::Close closing fd 10001
01:46:10 T:9648576 INFO: PAPlayer: Playing musicdb://3/1/1.mp3
01:46:10 T:9648576 DEBUG: PAPlayer: Creating new audio renderer
01:46:10 T:9648576 INFO: CAudioRendererFactory: no input channel map specified assume windows
01:46:10 T:9648576 INFO: CPCMRemap: Configured speaker layout: 2.0
01:46:10 T:9648576 INFO: CPCMRemap: I channel map: FL,FR
01:46:10 T:9648576 INFO: CPCMRemap: O channel map: FL,FR
01:46:10 T:9648576 DEBUG: CPCMRemap: Downmix normalization is disabled
01:46:10 T:9648576 DEBUG: CPCMRemap: FL = FL(1.000000*)
01:46:10 T:9648576 DEBUG: CPCMRemap: FR = FR(1.000000*)
01:46:10 T:9648576 DEBUG: RemoveActiveDevice - Removing device 1
01:46:10 T:9648576 DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
01:46:10 T:9648576 DEBUG: RemoveActiveDevice - Removing device 0
01:46:10 T:9648576 DEBUG: Initialize - using alsa device plug:'iec958:CARD=Extigy,DEV=0'
01:46:10 T:9648576 ERROR: Initialize - hw_params_get_buffer_size, alsa error: -22 - Invalid argument
01:46:10 T:9648576 DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
01:46:10 T:9648576 DEBUG: RemoveActiveDevice - Removing device 2
01:46:10 T:9648576 DEBUG: CGUIAudioManager::Initialize
01:46:10 T:9648576 ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen

I only posted what i thought was relevant, but if required i can post the full log.

Thanks in advance for any help you guys can give!
Reply
#2
What do you have your audio output device set to in the gui? What's the output of aplay -l (lower case L) and aplay -L (upper case L)?
Reply
#3
Hi!

Sound settings + aplay output:

Image

Quote:xbmc@xbmc-calcas-cave:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 6: Si3054 Modem [Si3054 Modem]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Extigy [Sound Blaster Extigy], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Extigy [Sound Blaster Extigy], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Extigy [Sound Blaster Extigy], device 2: USB Audio [USB Audio #2]
Subdevices: 1/1
Subdevice #0: subdevice #0

Quote:xbmc@xbmc-calcas-cave:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=Intel
HDA Intel, STAC92xx Analog
Default Audio Device
front:CARD=Intel,DEV=0
HDA Intel, STAC92xx Analog
Front speakers
surround40:CARD=Intel,DEV=0
HDA Intel, STAC92xx Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, STAC92xx Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, STAC92xx Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, STAC92xx Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, STAC92xx Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=Intel,DEV=0
HDA Intel, STAC92xx Analog
Direct sample mixing device
dsnoop:CARD=Intel,DEV=0
HDA Intel, STAC92xx Analog
Direct sample snooping device
hw:CARD=Intel,DEV=0
HDA Intel, STAC92xx Analog
Direct hardware device without any conversions
plughw:CARD=Intel,DEV=0
HDA Intel, STAC92xx Analog
Hardware device with all software conversions
default:CARD=Extigy
Sound Blaster Extigy, USB Audio
Default Audio Device
front:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
Front speakers
surround40:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
Direct sample mixing device
dmix:CARD=Extigy,DEV=1
Sound Blaster Extigy, USB Audio #1
Direct sample mixing device
dmix:CARD=Extigy,DEV=2
Sound Blaster Extigy, USB Audio #2
Direct sample mixing device
dsnoop:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
Direct sample snooping device
dsnoop:CARD=Extigy,DEV=1
Sound Blaster Extigy, USB Audio #1
Direct sample snooping device
dsnoop:CARD=Extigy,DEV=2
Sound Blaster Extigy, USB Audio #2
Direct sample snooping device
hw:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
Direct hardware device without any conversions
hw:CARD=Extigy,DEV=1
Sound Blaster Extigy, USB Audio #1
Direct hardware device without any conversions
hw:CARD=Extigy,DEV=2
Sound Blaster Extigy, USB Audio #2
Direct hardware device without any conversions
plughw:CARD=Extigy,DEV=0
Sound Blaster Extigy, USB Audio
Hardware device with all software conversions
plughw:CARD=Extigy,DEV=1
Sound Blaster Extigy, USB Audio #1
Hardware device with all software conversions
plughw:CARD=Extigy,DEV=2
Sound Blaster Extigy, USB Audio #2
Hardware device with all software conversions

Thanks!
Reply
#4
There is an important piece of information that i forgot to mention:

Navigation sounds + Ubunto Desktop sound comes out trough the internal laptop cart instead of the extigy, i didn't set it up this way as you can see above.
Reply
#5
Tongue 
Hi everyone, it's fixed, further testing pending, i'v been listening to music at an abnormal fast speed so much that i now suspect them to be too slow when i hear the normal versions... but i'll get to that.

I'm a bit disapointed about the ammount of help i got here, i don't mean to bitch about it, but i think this is pretty basic and obvious stuff to most of you.
I'm putting my findings on the thread so that other may use the information.

The reason why i had no sound in music or the menu sounds were comming out trough the internal card was because i hadn't tinkered with the alsa config (.asoundrc).

I had an entry on the .asoundrc that was either made by xbmc itself or the installer, it looked like this:

Quote:pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm 'hw:1,1'
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
bindings {
0 0
1 1
}
}

This is at the state where movies had sound, some video add-ons had sound, others didn't, and no sound playing music, the GUI had sound coming out trough the internal card.

I found out that i had to edit .asoundrc to specify a default soundcard, so i added those lines and the .asoundrc now looks like this:

Quote:pcm.!default {
type hw
card 1
}

ctl.!default {
type hw
card 1
}

pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm 'hw:1,1'
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
bindings {
0 0
1 1
}
}

After this change i changed the audio settings in xbmc to "default(Alsa)" , and i now had sound in everything but with a new issue, music was playing to fast and consequently with a higher pitch.

I saw the log file and saw that the Extigy only suports sampling rate of 48KHz , and the audio file was 44.1Khz, and found on some posts that this was the reason for the fast audio.

I searched around and found several fixes for people using HDMI or Optical out, none for analog , all required to configure the xbmc sound settings to custom and then specify the "plug".
These fixes didn't work for me, it would give me the original error i posted.

I found one post that had a fix for this, i had to edit the advancedsettings.xml for xbmc, to basically tell xbmc to resample audio to 48Khz.

These were the lines i added to it:

Quote:<advancedsettings>

<audio>
<resample>48000</resample>
</audio>

</advancedsettings>


I think everything is working as it's suposed to and now i am listening to a lot of music always suspecting that it's too slow Smile
Reply
#6
Sorry I didn't get back to you, we have lives as well. Your music may be playing at the correct speed, but you've got all kinds of upsampling artifacts now. Basically taking a 44kHz file and resampling at 48kHz means that information is made up, i.e. sounds are being introduced that aren't in the original file. I'd find a way to get rid of the resampling if possible.
Reply
#7
Pumkinut, i'm gratefull for any help i get, as i said, i didn't mean to "bitch",but i'm sure you are not the only one on this forum who knows about linux sound configuration.

I'v been hearing a lot of music, i didn't hear any artifacts, but if i could get rid of upsampling i would give it go, at least i now have a working config that i can always rollback to.

If the Extigy says it only supports 48KHz and XBMC is trying to play a 44.1Khz sound file how can i get around it?
Reply
#8
If the Extigy will only support 44.1kHz sampling rate, there's not much you can do about it unfortunately. If you don't notice anything unpleasant about the playback, I'd just leave it alone. You run the risk of complicating things the more you mess with them.
Reply
#9
Rainbow 
(2012-08-01, 00:58)doc_xcj Wrote: I searched around and found several fixes for people using HDMI or Optical out, none for analog , all required to configure the xbmc sound settings to custom and then specify the "plug".
These fixes didn't work for me, it would give me the original error i posted.

I found one post that had a fix for this, i had to edit the advancedsettings.xml for xbmc, to basically tell xbmc to resample audio to 48Khz.

These were the lines i added to it:

Quote:<advancedsettings>

<audio>
<resample>48000</resample>
</audio>

</advancedsettings>

Dude, I can't thank you enough for this!! I have been struggling with distorted audio over HDMI with MP3 music and certain MP3 encoded movies for over a week now. I moved from XBMCbuntu to OpenELEC ( first Dharma, than Eden beta and now even pre-Frodo alpha4 with audio engine) to get this solved, but nothing helped.

But now finally with this resampling setting everything is "cool and the gang".

Thanks!

Reply
#10
Cool, i found this info in the middle of another thread related to a diferent sound problem so i wont' take credit for it, glad this thread helped someone else Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Sound only in videos, not in music.0