Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
AMD A6, BeaverCreek HDMI Audio and Hudson Azalia [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
mgnut57
Apprentice
Apprentice


Joined: 12 Jan 2008
Posts: 292

PostPosted: Mon Apr 09, 2012 2:49 am    Post subject: AMD A6, BeaverCreek HDMI Audio and Hudson Azalia [Solved] Reply with quote

I am trying to figure out how to use sound on this system. There are two vaguely relevant answers that I have found on the web, but neither seems to be good. One solution involves changing files in /usr/share (need I say more) and the other is only relevant to systems with audio hardware supported by different modules.

The problem is (I think) that that the audio output in use is the HDMI output, rather than the traditional audio jack. lspci shows 2 Audio cards:
lspci | grep Audio
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series]
00:14.2 Audio device: Advanced Micro Devices [AMD] Hudson Azalia Controller (rev 01)


However, looking further, both of these audio cards are supported by the same module (snd-hda-intel):
# lspci -k
00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 12h Processor Root Complex
Subsystem: ASUSTeK Computer Inc. Device 84c8
00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI BeaverCreek [Radeon HD 6530D]
Subsystem: ASUSTeK Computer Inc. Device 84c8
Kernel modules: fglrx
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series]
Subsystem: ASUSTeK Computer Inc. Device 84c8
Kernel driver in use: snd_hda_intel
Kernel modules: snd-hda-intel

00:10.0 USB controller: Advanced Micro Devices [AMD] Hudson USB XHCI Controller (rev 03)
Subsystem: ASUSTeK Computer Inc. Device 84c7
Kernel driver in use: xhci_hcd
Kernel modules: xhci-hcd
00:10.1 USB controller: Advanced Micro Devices [AMD] Hudson USB XHCI Controller (rev 03)
Subsystem: ASUSTeK Computer Inc. Device 84c7
Kernel driver in use: xhci_hcd
Kernel modules: xhci-hcd
00:11.0 SATA controller: Advanced Micro Devices [AMD] Hudson SATA Controller [AHCI mode] (rev 40)
Subsystem: ASUSTeK Computer Inc. Device 84c7
Kernel driver in use: ahci
00:12.0 USB controller: Advanced Micro Devices [AMD] Hudson USB OHCI Controller (rev 11)
Subsystem: ASUSTeK Computer Inc. Device 84c7
Kernel driver in use: ohci_hcd
00:12.2 USB controller: Advanced Micro Devices [AMD] Hudson USB EHCI Controller (rev 11)
Subsystem: ASUSTeK Computer Inc. Device 84c7
Kernel driver in use: ehci_hcd
00:13.0 USB controller: Advanced Micro Devices [AMD] Hudson USB OHCI Controller (rev 11)
Subsystem: ASUSTeK Computer Inc. Device 84c7
Kernel driver in use: ohci_hcd
00:13.2 USB controller: Advanced Micro Devices [AMD] Hudson USB EHCI Controller (rev 11)
Subsystem: ASUSTeK Computer Inc. Device 84c7
Kernel driver in use: ehci_hcd
00:14.0 SMBus: Advanced Micro Devices [AMD] Hudson SMBus Controller (rev 13)
Subsystem: ASUSTeK Computer Inc. Device 84c7
Kernel driver in use: piix4_smbus
Kernel modules: i2c-piix4
00:14.2 Audio device: Advanced Micro Devices [AMD] Hudson Azalia Controller (rev 01)
Subsystem: ASUSTeK Computer Inc. Device 836c
Kernel driver in use: snd_hda_intel
Kernel modules: snd-hda-intel

00:14.3 ISA bridge: Advanced Micro Devices [AMD] Hudson LPC Bridge (rev 11)
Subsystem: ASUSTeK Computer Inc. Device 84c7
00:14.4 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI Bridge (rev 40)
00:14.5 USB controller: Advanced Micro Devices [AMD] Hudson USB OHCI Controller (rev 11)
Subsystem: ASUSTeK Computer Inc. Device 84c7
Kernel driver in use: ohci_hcd
00:15.0 PCI bridge: Advanced Micro Devices [AMD] Device 43a0
Kernel driver in use: pcieport
00:15.1 PCI bridge: Advanced Micro Devices [AMD] Device 43a1
Kernel driver in use: pcieport
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 0 (rev 43)
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 3
Kernel driver in use: k10temp
Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 6
00:18.6 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 5
00:18.7 Host bridge: Advanced Micro Devices [AMD] Family 12h/14h Processor Function 7
01:05.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev 46)
Subsystem: Device 00ff:9a01
03:00.0 Ethernet controller: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet (rev c0)
Subsystem: ASUSTeK Computer Inc. Device 847e
Kernel driver in use: atl1c
Kernel modules: atl1c


I think that I need to swap the order of the sound cards, but, since they use the same module, I am stumped on how I should do this. Perhaps a udev rule?


Last edited by mgnut57 on Tue Apr 10, 2012 3:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
shrike
Apprentice
Apprentice


Joined: 20 Feb 2004
Posts: 187
Location: Closer to home

PostPosted: Tue Apr 10, 2012 1:16 am    Post subject: Reply with quote

mgnut57,

That's right, the device order determines which device to use as the 'default' device, at least from ALSA's pov. I have an AMD A8 APU and my immediate need was to get analog audio from the green 3.5mm jack on my box. To that end this should help:

Code:

# grep Codec /proc/asound/card*/codec*
# /proc/asound/card1/codec#0:Codec: ATI R6xx HDMI
# /proc/asound/card2/codec#0:Codec: Realtek ALC892

# ls -la /proc/asound/
# dr-xr-xr-x 4 root root 0 Mar 25 15:03 card0
# dr-xr-xr-x 3 root root 0 Mar 25 15:03 card1
# dr-xr-xr-x 6 root root 0 Mar 25 15:03 card2
# -r--r--r-- 1 root root 0 Mar 25 15:03 cards
# -r--r--r-- 1 root root 0 Mar 25 15:03 devices
# lrwxrwxrwx 1 root root 5 Mar 25 15:03 Generic -> card1
# lrwxrwxrwx 1 root root 5 Mar 25 15:03 Generic_1 -> card2
# -r--r--r-- 1 root root 0 Mar 25 15:03 hwdep
# lrwxrwxrwx 1 root root 5 Mar 25 15:03 M2496 -> card0
# -r--r--r-- 1 root root 0 Mar 25 15:03 modules
# -r--r--r-- 1 root root 0 Mar 25 15:03 pcm
# dr-xr-xr-x 2 root root 0 Mar 25 15:03 seq
# -r--r--r-- 1 root root 0 Mar 25 15:03 timers
# -r--r--r-- 1 root root 0 Mar 25 15:03 version


pcm.!default {
    type hw
    card Generic_1
    slave dsp
}
ctl.!default {
    type hw
    card Generic_1
}



Run the grep and ls commands above to determine your card order. In this example ALSA script (thanks ALSA wiki) I set the card name "Generic_1" as 'default'. (M2496 is a add-on) If you save this example as '~/.asoundrc' and edit as needed it should work next time you login.

I tried tweaking the /etc/modprobe.d/alsa.conf to change card order as per the ALSA wiki. Though I could affect the order I just couldn't get the ALC892 as 'card zero'. Perhaps the presence of M2496 got in the way.

I haven't tried HDMI yet. Or SPDIF (iec958).

shrike
Back to top
View user's profile Send private message
mgnut57
Apprentice
Apprentice


Joined: 12 Jan 2008
Posts: 292

PostPosted: Tue Apr 10, 2012 2:33 am    Post subject: Reply with quote

shrike wrote:
mgnut57,

That's right, the device order determines which device to use as the 'default' device, at least from ALSA's pov. I have an AMD A8 APU and my immediate need was to get analog audio from the green 3.5mm jack on my box. To that end this should help:

Code:

# grep Codec /proc/asound/card*/codec*
# /proc/asound/card1/codec#0:Codec: ATI R6xx HDMI
# /proc/asound/card2/codec#0:Codec: Realtek ALC892

# ls -la /proc/asound/
# dr-xr-xr-x 4 root root 0 Mar 25 15:03 card0
# dr-xr-xr-x 3 root root 0 Mar 25 15:03 card1
# dr-xr-xr-x 6 root root 0 Mar 25 15:03 card2
# -r--r--r-- 1 root root 0 Mar 25 15:03 cards
# -r--r--r-- 1 root root 0 Mar 25 15:03 devices
# lrwxrwxrwx 1 root root 5 Mar 25 15:03 Generic -> card1
# lrwxrwxrwx 1 root root 5 Mar 25 15:03 Generic_1 -> card2
# -r--r--r-- 1 root root 0 Mar 25 15:03 hwdep
# lrwxrwxrwx 1 root root 5 Mar 25 15:03 M2496 -> card0
# -r--r--r-- 1 root root 0 Mar 25 15:03 modules
# -r--r--r-- 1 root root 0 Mar 25 15:03 pcm
# dr-xr-xr-x 2 root root 0 Mar 25 15:03 seq
# -r--r--r-- 1 root root 0 Mar 25 15:03 timers
# -r--r--r-- 1 root root 0 Mar 25 15:03 version


pcm.!default {
    type hw
    card Generic_1
    slave dsp
}
ctl.!default {
    type hw
    card Generic_1
}



Run the grep and ls commands above to determine your card order. In this example ALSA script (thanks ALSA wiki) I set the card name "Generic_1" as 'default'. (M2496 is a add-on) If you save this example as '~/.asoundrc' and edit as needed it should work next time you login.

I tried tweaking the /etc/modprobe.d/alsa.conf to change card order as per the ALSA wiki. Though I could affect the order I just couldn't get the ALC892 as 'card zero'. Perhaps the presence of M2496 got in the way.

I haven't tried HDMI yet. Or SPDIF (iec958).

shrike


Great! Creating the ~/.asoundrc file with the entries you suggested solved the issue. I did not even have to log out to make it work. I did have to make a minor modification: the line:
slave dsp
was not accepted. I took this out and it worked!

I should also mention that the command "aplay -D default <some wave file>" helped me to find the issue in the ~/.asoundrc file:
Code:
aplay -D default test.wav
ALSA lib pcm_hw.c:1466:(_snd_pcm_hw_open) Unknown field slave
aplay: main:682: audio open error: Invalid argument



Thank you very much for your help!
Back to top
View user's profile Send private message
shrike
Apprentice
Apprentice


Joined: 20 Feb 2004
Posts: 187
Location: Closer to home

PostPosted: Tue Apr 17, 2012 4:12 pm    Post subject: Reply with quote

Big OOps.. the erroneous 'slave dsp' line reminded me that I had problems opening more than one sound app (flash, mplayer, etc) at a time. I found a 'dmix' plugin example and added 'Generic_1'. This is my current .asoundrc file which allows me to have multiple sound apps open at the same time:

Code:

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

pcm.dmixer  {
    type dmix
    ipc_key 1024
    slave {
      pcm "hw:Generic_1"
      period_time 0
      period_size 1024
      buffer_size 4096
      rate 44100
   }
   bindings {
      0 0
      1 1
   }
}

ctl.dmixer {
   type hw
   card Generic_1
}


Pardon my confusion.

shrike
Back to top
View user's profile Send private message
mgnut57
Apprentice
Apprentice


Joined: 12 Jan 2008
Posts: 292

PostPosted: Sun Apr 29, 2012 11:17 pm    Post subject: Reply with quote

[quote="mgnut57"]
shrike wrote:
mgnut57,

That's right, the device order determines which device to use as the 'default' device, at least from ALSA's pov. I have an AMD A8 APU and my immediate need was to get analog audio from the green 3.5mm jack on my box. To that end this should help:

Code:

# grep Codec /proc/asound/card*/codec*
# /proc/asound/card1/codec#0:Codec: ATI R6xx HDMI
# /proc/asound/card2/codec#0:Codec: Realtek ALC892

# ls -la /proc/asound/
# dr-xr-xr-x 4 root root 0 Mar 25 15:03 card0
# dr-xr-xr-x 3 root root 0 Mar 25 15:03 card1
# dr-xr-xr-x 6 root root 0 Mar 25 15:03 card2
# -r--r--r-- 1 root root 0 Mar 25 15:03 cards
# -r--r--r-- 1 root root 0 Mar 25 15:03 devices
# lrwxrwxrwx 1 root root 5 Mar 25 15:03 Generic -> card1
# lrwxrwxrwx 1 root root 5 Mar 25 15:03 Generic_1 -> card2
# -r--r--r-- 1 root root 0 Mar 25 15:03 hwdep
# lrwxrwxrwx 1 root root 5 Mar 25 15:03 M2496 -> card0
# -r--r--r-- 1 root root 0 Mar 25 15:03 modules
# -r--r--r-- 1 root root 0 Mar 25 15:03 pcm
# dr-xr-xr-x 2 root root 0 Mar 25 15:03 seq
# -r--r--r-- 1 root root 0 Mar 25 15:03 timers
# -r--r--r-- 1 root root 0 Mar 25 15:03 version


pcm.!default {
    type hw
    card Generic_1
    slave dsp
}
ctl.!default {
    type hw
    card Generic_1
}



Run the grep and ls commands above to determine your card order. In this example ALSA script (thanks ALSA wiki) I set the card name "Generic_1" as 'default'. (M2496 is a add-on) If you save this example as '~/.asoundrc' and edit as needed it should work next time you login.

I tried tweaking the /etc/modprobe.d/alsa.conf to change card order as per the ALSA wiki. Though I could affect the order I just couldn't get the ALC892 as 'card zero'. Perhaps the presence of M2496 got in the way.

I haven't tried HDMI yet. Or SPDIF (iec958).

shrike


Great! Creating the ~/.asoundrc file with the entries you suggested solved the issue. I did not even have to log out to make it work. I did have to make a minor modification: the line:
slave dsp
was not accepted. I took this out and it worked!

I should also mention that the command "aplay -D default <some wave file>" helped me to find the issue in the ~/.asoundrc file:
Code:
aplay -D default test.wav
ALSA lib pcm_hw.c:1466:(_snd_pcm_hw_open) Unknown field slave
aplay: main:682: audio open error: Invalid argument



Putting the entries in /etc/asound.conf produced the same result: sound works. Since the configuration is specific to the computer rather than the user, this is a much better way to configure it.
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4185
Location: india

PostPosted: Sat Oct 06, 2012 12:52 pm    Post subject: Reply with quote

Code:
ramaswamy@localhost ~ $ ls -la /proc/asound/
total 0
dr-xr-xr-x   6 root root 0 Oct  6 18:17 .
dr-xr-xr-x 127 root root 0 Oct  6 17:35 ..
lrwxrwxrwx   1 root root 5 Oct  6 18:17 Generic -> card0
lrwxrwxrwx   1 root root 5 Oct  6 18:17 Generic_1 -> card1
dr-xr-xr-x   3 root root 0 Oct  6 18:17 card0
dr-xr-xr-x   4 root root 0 Oct  6 18:17 card1
-r--r--r--   1 root root 0 Oct  6 18:17 cards
-r--r--r--   1 root root 0 Oct  6 18:17 devices
-r--r--r--   1 root root 0 Oct  6 18:17 hwdep
dr-xr-xr-x   2 root root 0 Oct  6 18:17 oss
-r--r--r--   1 root root 0 Oct  6 18:17 pcm
dr-xr-xr-x   2 root root 0 Oct  6 18:17 seq
-r--r--r--   1 root root 0 Oct  6 18:17 timers
-r--r--r--   1 root root 0 Oct  6 18:17 version
ramaswamy@localhost ~ $  grep Codec /proc/asound/card*/codec*
/proc/asound/card0/codec#0:Codec: ATI R6xx HDMI
/proc/asound/card1/codec#0:Codec: Realtek ALC269VB
ramaswamy@localhost ~ $


Code:
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI Wrestler HDMI Audio [Radeon HD 6250/6310]


i can't get my sound working even after making a asounrc as shown above

may request OP to post kernel .config of the sound portions pls?
it may help me
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
shrike
Apprentice
Apprentice


Joined: 20 Feb 2004
Posts: 187
Location: Closer to home

PostPosted: Sat Oct 06, 2012 2:10 pm    Post subject: Reply with quote

padoor,

This is with commented lines removed.

Code:

Llano shrike # gunzip -c /proc/config.gz |grep SND |sed -e '/^\(\t\| \)*#.*\|^\(\t\| \)*$/d' -e 's/\(.*\)#.*/\1/' "$@"
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_JACK=y
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_DEBUG=y
CONFIG_SND_VMASTER=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_RAWMIDI_SEQ=m
CONFIG_SND_MPU401_UART=m
CONFIG_SND_AC97_CODEC=m
CONFIG_SND_PCI=y
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_PREALLOC_SIZE=64
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_JACK=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS=y
CONFIG_SND_HDA_CODEC_HDMI=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_ICE1712=m
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m


and

Code:

Llano shrike # uname -a
Linux Llano 3.2.6-gentoo #1 SMP PREEMPT Fri Aug 31 12:44:53 EDT 2012 x86_64 AMD A8-3870 APU with Radeon(tm) HD Graphics AuthenticAMD GNU/Linux


Regards,

shrike
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum