[SOLVED] SPDIF/AMD Fusion - failed to initialize audio device

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Baswazz Offline
Fan
Posts: 379
Joined: Oct 2010
Reputation: 7
Location: Netherlands
Post: #1
Yesterday i installed XBMCBuntu Eden on my new AMD Fusion A6-3500 system. This morning i recognized i did not have any audio with SPDIF.

I did update my XBMCbuntu with PVR from Pulse-Eight packages but i don't know if this has anything todo with it.
Searching the forums i read in this topic that when i go to terminal and type 'alsamixer' SPDIF is muted. I unmute it, go to all the audio devices.
But it keeps saying 'Failed to initialize audio device'.

Can anyone help me out?

Fix:
Thx to Snippo in the first place to getting my audio back.
fritsch did gave me the proper work around.

If exist remove:
dpkg -l | grep asound
sudo apt-get remove --purge libasound2-plugins:i386

create /etc/asound.conf
Code:
pcm.!default {
  type plug
  slave {
#    pcm "hw:1,0" #delete the first hash for sound over analog
    pcm "hw:1,1" #delete the first hash for sound over optical
#    pcm "hw:0,3" #delete the first hash for sound over hdmi
    rate 48000
  }
}

System > Audio output:
go into xbmc change audio output to optical 5.1 check dts and ac3 capable if your receiver support it.

audio output device: Defaults (ALSA)
Passthrough output device: custom
Custom passtrhough device: hw:1,1

*1,1 [Card 1, Device 1 from "aplay -l"]

Be sure SPDIF is not muted as it was after the reinstall "alsamixer" to unmute.
And change the asound.conf to your needs by using "aplay -l" command without the quotes.

Frontend : Running on AMD Fusion A6-3500
Frontend : Raspberry PI (Raspbmc)
Remote : Motorola Nyxboard Hybrid (revised) / Boxee remote
Ziggo TV Channel Logo Pack (Dutch)
(This post was last modified: 2012-04-29 16:07 by Baswazz.)
find quote
erhnam Offline
Team-XBMC Live Developer
Posts: 673
Joined: May 2009
Reputation: 2
Location: The Netherlands
Post: #2
Could you please post a copy of your /tmp/debugInfo.txt
find quote
Baswazz Offline
Fan
Posts: 379
Joined: Oct 2010
Reputation: 7
Location: Netherlands
Post: #3
(2012-04-20 11:29)erhnam Wrote:  Could you please post a copy of your /tmp/debugInfo.txt

I did a clean install to see if there are any changes but the problem still exist.

debugInfo.txt is not present in the /tmp folder. Can you help me out getting this log? I did enabled debug mode and i can't find anything relevant on google.

Hardware: Gigabyte GA-A75N-USB3

.xbmc/temp/xmbc.log

13:46:09 T:3042723584 NOTICE: CDVDPlayer::CloseFile()
13:46:09 T:3042723584 NOTICE: DVDPlayer: waiting for threads to exit
13:46:09 T:2874989424 NOTICE: CDVDPlayer::OnExit()
13:46:09 T:2874989424 NOTICE: DVDPlayer: closing audio stream
13:46:09 T:2874989424 NOTICE: Closing audio stream
13:46:09 T:2874989424 NOTICE: Waiting for audio thread to exit
13:46:09 T:2811214704 NOTICE: thread end: CDVDPlayerAudio::OnExit()
13:46:09 T:2811214704 DEBUG: Thread CDVDPlayerAudio 2811214704 terminating
13:46:09 T:2874989424 NOTICE: Closing audio device
13:46:09 T:2874989424 DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
13:46:09 T:2874989424 DEBUG: RemoveActiveDevice - Removing device 2
13:46:09 T:2874989424 DEBUG: CGUIAudioManager::Initialize
13:46:09 T:2874989424 ERROR: Unable to open audio mixer
13:46:09 T:2874989424 NOTICE: Deleting audio codec
13:46:09 T:2874989424 NOTICE: DVDPlayer: closing video stream
13:46:09 T:2874989424 NOTICE: Closing video stream
13:46:09 T:2874989424 NOTICE: waiting for video thread to exit
13:46:09 T:2819607408 NOTICE: thread end: video_thread

Frontend : Running on AMD Fusion A6-3500
Frontend : Raspberry PI (Raspbmc)
Remote : Motorola Nyxboard Hybrid (revised) / Boxee remote
Ziggo TV Channel Logo Pack (Dutch)
(This post was last modified: 2012-04-20 13:51 by Baswazz.)
find quote
erhnam Offline
Team-XBMC Live Developer
Posts: 673
Joined: May 2009
Reputation: 2
Location: The Netherlands
Post: #4
Could you please post the contens of the following;

Code:
cat /proc/cpuinfo | grep 'model name' -m1 | grep 'Atom'

Code:
aplay -l

Code:
lspci -nn | grep '0403'

Code:
/usr/bin/amixer -c 0 | grep 'Simple mixer control' | grep 'IEC958' | awk '{print $4,$5,$6}'
/usr/bin/amixer -c 1 | grep 'Simple mixer control' | grep 'IEC958' | awk '{print $4,$5,$6}'

This allows me to understand what might be wrong with our alsa config script.
find quote
Baswazz Offline
Fan
Posts: 379
Joined: Oct 2010
Reputation: 7
Location: Netherlands
Post: #5
Code:
$ cat /proc/cpuinfo
processor    : 0
vendor_id    : AuthenticAMD
cpu family    : 18
model        : 1
model name    : AMD A6-3500 APU with Radeon(tm) HD Graphics
stepping    : 0
cpu MHz        : 800.000
cache size    : 1024 KB
physical id    : 0
siblings    : 3
core id        : 0
cpu cores    : 3
apicid        : 0
initial apicid    : 0
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 6
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt arat cpb npt lbrv svm_lock nrip_save pausefilter
bogomips    : 4199.79
clflush size    : 64
cache_alignment    : 64
address sizes    : 40 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate [9]

processor    : 1
vendor_id    : AuthenticAMD
cpu family    : 18
model        : 1
model name    : AMD A6-3500 APU with Radeon(tm) HD Graphics
stepping    : 0
cpu MHz        : 800.000
cache size    : 1024 KB
physical id    : 0
siblings    : 3
core id        : 1
cpu cores    : 3
apicid        : 1
initial apicid    : 1
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 6
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt arat cpb npt lbrv svm_lock nrip_save pausefilter
bogomips    : 4199.63
clflush size    : 64
cache_alignment    : 64
address sizes    : 40 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate [9]

processor    : 2
vendor_id    : AuthenticAMD
cpu family    : 18
model        : 1
model name    : AMD A6-3500 APU with Radeon(tm) HD Graphics
stepping    : 0
cpu MHz        : 800.000
cache size    : 1024 KB
physical id    : 0
siblings    : 3
core id        : 2
cpu cores    : 3
apicid        : 2
initial apicid    : 2
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 6
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt arat cpb npt lbrv svm_lock nrip_save pausefilter
bogomips    : 4199.82
clflush size    : 64
cache_alignment    : 64
address sizes    : 40 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate [9]

Code:
$ cat /proc/cpuinfo | grep 'model name' -m1
model name    : AMD A6-3500 APU with Radeon(tm) HD Graphics

Code:
$ cat /proc/cpuinfo | grep 'Atom'
does not give any output.

if i add the full cmd it does not give output either.

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

Quote:$ /usr/bin/amixer -c 0 | grep 'Simple mixer control' | grep 'IEC958' | awk '{print $4,$5,$6}'
'IEC958',0

Code:
$ /usr/bin/amixer -c 1 | grep 'Simple mixer control' | grep 'IEC958' | awk '{print $4,$5,$6}'
'IEC958',0  
'IEC958 Default PCM',0

Frontend : Running on AMD Fusion A6-3500
Frontend : Raspberry PI (Raspbmc)
Remote : Motorola Nyxboard Hybrid (revised) / Boxee remote
Ziggo TV Channel Logo Pack (Dutch)
find quote
erhnam Offline
Team-XBMC Live Developer
Posts: 673
Joined: May 2009
Reputation: 2
Location: The Netherlands
Post: #6
Thanks. Do you have a ~/.asoundrc config? If yes, could you please post the contents as well?
find quote
Baswazz Offline
Fan
Posts: 379
Joined: Oct 2010
Reputation: 7
Location: Netherlands
Post: #7
If i do ls -all i don't see the .asoundrc file in my home folder.

Frontend : Running on AMD Fusion A6-3500
Frontend : Raspberry PI (Raspbmc)
Remote : Motorola Nyxboard Hybrid (revised) / Boxee remote
Ziggo TV Channel Logo Pack (Dutch)
find quote
Zaho Offline
Junior Member
Posts: 3
Joined: Nov 2011
Reputation: 1
Post: #8
I had the same problem. I spent many hours to solve this. My hardware is very similar to yours.

Code:
karta 0: Generic [HD-Audio Generic], urządzenie 3: HDMI 0 [HDMI 0]
  Urządzenia podrzędne: 1/1
  Urządzenie podrzędne #0: subdevice #0
karta 1: SB [HDA ATI SB], urządzenie 0: ALC887-VD Analog [ALC887-VD Analog]
  Urządzenia podrzędne: 1/1
  Urządzenie podrzędne #0: subdevice #0
karta 1: SB [HDA ATI SB], urządzenie 1: ALC887-VD Digital [ALC887-VD Digital]
  Urządzenia podrzędne: 1/1
  Urządzenie podrzędne #0: subdevice #0

Try this:

create .asoundrc file

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

and in XBMC settings:

Code:
Audio Output: Optical/Coax
Speaker Configuration: 5.1
DTS Capable Receiver: ON
Audio Output Device: CUSTOM
Custom Audio Device:
Passthrough Output Device: HDA ATI SB - IEC958 - 0 (ALSA)

Optical output works fine but play only 48 KHz audio sample video. If i want to play e.g trailer which I downloaded from youtube (44,1 KHz) I get: 'Failed to initialize audio device'.
(This post was last modified: 2012-04-20 19:13 by Zaho.)
find quote
Baswazz Offline
Fan
Posts: 379
Joined: Oct 2010
Reputation: 7
Location: Netherlands
Post: #9
Thanks for your input in this topic. I shall try it.
I hope we are able to fix this with erhnam's help.

edit:
I can confirm this does work for me. I tested it on The Trailers add-on as well, but indeed i get 'Failed to initialize audio device'.

Frontend : Running on AMD Fusion A6-3500
Frontend : Raspberry PI (Raspbmc)
Remote : Motorola Nyxboard Hybrid (revised) / Boxee remote
Ziggo TV Channel Logo Pack (Dutch)
(This post was last modified: 2012-04-20 19:54 by Baswazz.)
find quote
Zaho Offline
Junior Member
Posts: 3
Joined: Nov 2011
Reputation: 1
Post: #10
I know, it drives me crazy.
find quote
Baswazz Offline
Fan
Posts: 379
Joined: Oct 2010
Reputation: 7
Location: Netherlands
Post: #11
I did find this ubuntu wiki to test if the soundcard is supported.
This is my output:

Code:
$ grep "Codec:" /proc/asound/card*/codec*
/proc/asound/card0/codec#0:Codec: ATI R6xx HDMI
/proc/asound/card1/codec#0:Codec: Realtek ALC889

Also i see this wiki how to upgrade Alsa, i go test this tomorrow.

This is the driver version it does use now:

Code:
$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.24.

Frontend : Running on AMD Fusion A6-3500
Frontend : Raspberry PI (Raspbmc)
Remote : Motorola Nyxboard Hybrid (revised) / Boxee remote
Ziggo TV Channel Logo Pack (Dutch)
(This post was last modified: 2012-04-20 23:12 by Baswazz.)
find quote
Zaho Offline
Junior Member
Posts: 3
Joined: Nov 2011
Reputation: 1
Post: #12
Let me know if you succeeded.
find quote
Baswazz Offline
Fan
Posts: 379
Joined: Oct 2010
Reputation: 7
Location: Netherlands
Post: #13
No luck upgrading alsa.
I added a bug report you can follow:
http://trac.xbmc.org/ticket/12945

I hope we get some input soon.

Frontend : Running on AMD Fusion A6-3500
Frontend : Raspberry PI (Raspbmc)
Remote : Motorola Nyxboard Hybrid (revised) / Boxee remote
Ziggo TV Channel Logo Pack (Dutch)
find quote
Snippo Offline
Senior Member
Posts: 142
Joined: Dec 2011
Reputation: 4
Post: #14
Have you tried setting the custom audio (passthrough) device to 'plughw:1,1' ?
find quote
Baswazz Offline
Fan
Posts: 379
Joined: Oct 2010
Reputation: 7
Location: Netherlands
Post: #15
(2012-04-21 16:49)Snippo Wrote:  Have you tried setting the custom audio (passthrough) device to 'plughw:1,1' ?

Thanks for your input. It looks like this does the trick.
I now got:

Audio output device: HD-Audio Generic - iec958 - 0 (ALSA)
Passthrough output device: Custom
Custom passthrough device: plughw:1,1

Thanks you really made my day Big Grin

Frontend : Running on AMD Fusion A6-3500
Frontend : Raspberry PI (Raspbmc)
Remote : Motorola Nyxboard Hybrid (revised) / Boxee remote
Ziggo TV Channel Logo Pack (Dutch)
(This post was last modified: 2012-04-21 23:44 by Baswazz.)
find quote