LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-27-2014, 07:57 PM   #1
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 228

Rep: Reputation: 18
Problems with Alsa (I think) (14.1 x64, kernel 3.13.0)


So I've been battling to get a functional XBMC server working, and I've hit my second roadblock with sound.

My sound doesn't work through HDMI by default. So I compiled kernel 3.13.0 to get that working and now my (minor) problem is that it's muted when my system starts. It seems that the ATI HDMI device lists a S/PDIF device, which can only either be muted (by default) or set to [00] (at which point sounds work). However, when I try to use programs to listen to music, they usually work but throw errors. Furthermore, on XBMC, I can watch certian movies, but others will cause my TV to pop up a message about incompatible PCM signals and then none of my sound will work again until I reboot.

I've been pulling my hair out, going through docs.slackware.org stuff and other things (mostly help stuff from Arch Linux, limited help from XBMC sources but nothing concrete) without success. Anyone have any tips for me?

Thanks.

EDIT: I dug up a pdf of the manual for my TV... turns out it basically supports nothing but PCM, so I fixed that in XBMC. How, errors I get while trying to play music (which doesn't play as of now) throw errors like ALSA error: : No suitable mixer element found, ALSA error: snd_mixer_find_selem failed, and ALSA error: snd_pcm_open failed: No such file or directory

Last edited by spudgunner; 01-27-2014 at 08:48 PM.
 
Old 01-27-2014, 09:07 PM   #2
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0
Posts: 3,188
Blog Entries: 15

Rep: Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826
Can you run:

Code:
cat /proc/asound/cards
and post the results?
 
Old 01-27-2014, 09:14 PM   #3
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.1, LFS-current, NetBSD 6.1.3
Posts: 119

Rep: Reputation: 38
Quote:
Originally Posted by spudgunner View Post
So I've been battling to get a functional XBMC server working, and I've hit my second roadblock with sound.

My sound doesn't work through HDMI by default. So I compiled kernel 3.13.0
Did you compile the drivers into the kernel or did you recompile them as modules?
It looks to me that you forgot to compile the sound modules for that card.

Please post the relivent portion of lspci -vv and cat /usr/src/linux/.config
 
Old 01-28-2014, 07:28 AM   #4
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 228

Original Poster
Rep: Reputation: 18
@ReaperX7: As requested

cat /proc/asound/cards
Code:
 0 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfef44000 irq 42
 1 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfef40000 irq 16
@/dev/random: As requested

(Hopefully) Relevant portions of lspci -vv
Code:
00:01.1 Audio device: AMD/ATI [Advanced Micro Devices, Inc.] Trinity HDMI Audio Controller
	Subsystem: AMD/ATI [Advanced Micro Devices, Inc.] Trinity HDMI Audio Controller
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin B routed to IRQ 42
	Region 0: Memory at fef44000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

...

00:14.2 Audio device: AMD [Advanced Micro Devices, Inc.] FCH Azalia Controller (rev 01)
	Subsystem: Gigabyte Technology Co., Ltd Device a002
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 32, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at fef40000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
(Hopefully) Relevant portion of my config file:
Code:
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_DSP_LOADER=y
CONFIG_SND_HDA_PREALLOC_SIZE=2048
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
# CONFIG_SND_HDA_INPUT_BEEP is not set
CONFIG_SND_HDA_INPUT_JACK=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
CONFIG_SND_HDA_CODEC_HDMI=y
CONFIG_SND_HDA_I915=y
CONFIG_SND_HDA_CODEC_CIRRUS=y
CONFIG_SND_HDA_CODEC_CONEXANT=y
CONFIG_SND_HDA_CODEC_CA0110=y
CONFIG_SND_HDA_CODEC_CA0132=y
CONFIG_SND_HDA_CODEC_CA0132_DSP=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
 
Old 01-28-2014, 08:33 AM   #5
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 490

Rep: Reputation: 35
Every time I need sound in the HDMI interface I have to activate a switch in xfce-mixer (IEC958).
After that I can redirect the sound through the HDMI interface.

Hope it helps.
 
Old 01-28-2014, 10:08 PM   #6
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0
Posts: 3,188
Blog Entries: 15

Rep: Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826
You may also want to setup an alsa module.conf file and a user .asoundrc profile to default the audio to your HDA codec and not the HDMI.
 
Old 01-28-2014, 11:32 PM   #7
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.1, LFS-current, NetBSD 6.1.3
Posts: 119

Rep: Reputation: 38
By any chance does this HTPC you are building have a integrated sound card? if so find the module it is using and black list it.
 
Old 01-28-2014, 11:42 PM   #8
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0
Posts: 3,188
Blog Entries: 15

Rep: Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826Reputation: 826
If he Blacklists it, since he's using HDMI, it would Blacklist the snd-intel-hda module which would diable both sound cards. He needs to setup his device controls actually since he's using this method.

Correction on my last reply regarding which audio device to default to.

As far as a mixer issue. Alsa uses dmix, so you may need to check the alsa utilities packages that handle dmix.
 
Old 01-29-2014, 07:31 AM   #9
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 228

Original Poster
Rep: Reputation: 18
Blacklisting the module definitely doesn't work, I've already tried that.

I haven't fooled around with it much since I got XBMC working correctly, but here's a couple more pieces of info that may be of use:

(1) At one point I tried editing /usr/share/alsa/alsa.conf, and I changed the line

Code:
defaults.pcm.device 0
to

Code:
defaults.pcm.device 3
(due to what running aplay -l tells me about my devices) and I was able to adjust the volume of the HDMI PCM device via alsamixer (whereas before, it's only set to MM or 00). However, this didn't appear to do anything for me, so I switched to back to try to keep as much as possible at default values to isolate my problems.

(2) I have tried defining a default device in /etc/asound.conf but then I cannot use alsamixer at all (but the sound does work), I'll confirm tonight with music players still give me error messages with this setting.

(3) When I boot my computer or restart ALSA, sometimes I get the following message:

Code:
/usr/sbin/alsactl: set_control:1452: control.7.value.2 is not specified
/usr/sbin/alsactl: set_control:1452: control.7.value.3 is not specified
/usr/sbin/alsactl: set_control:1452: control.7.value.4 is not specified
/usr/sbin/alsactl: set_control:1452: control.7.value.5 is not specified
/usr/sbin/alsactl: set_control:1452: control.7.value.6 is not specified
/usr/sbin/alsactl: set_control:1452: control.7.value.7 is not specified
I know it comes up when I set the default device in /etc/asound.conf, and it may or may not come up if I make the change listed in (1). (I never did establish that pattern, but luckily I have time tonight to keep trying to diagnose the problems and work through them). I don't know what the above messages mean, but it almost looks to me as if it's trying to do something with multiple audio channels and failing.

Hopefully this info may be able to lead you guys in the right direction.
 
Old 01-29-2014, 08:28 AM   #10
55020
Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 366
Blog Entries: 4

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
This just popped up in the changelog for kernel 3.13.1, which is just out:

Quote:
David Henningsson (1):
ALSA: hda - Explicitly keep codec powered up in hdmi_present_sense
Worth a try...?
 
Old 01-29-2014, 09:20 AM   #11
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 228

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by 55020 View Post
This just popped up in the changelog for kernel 3.13.1, which is just out:



Worth a try...?
Might as well, can't hurt anything. I can compile it now (ssh in from work) but I won't be able to test it out until I get home tonight.
 
Old 01-29-2014, 09:43 AM   #12
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 692

Rep: Reputation: 291Reputation: 291Reputation: 291
Greetings
It is my understanding and experience that blacklisting is only good if you never want to use a secondary card for a secondary purpose. I can't tell you exactly how you should do this on your system but I can give you an example of how I do it on mine.

I have 3 sound devices - an onboard Realtek ACL898 Codec, an Intel-hda-hdmi, and a discrete Esi Juli@ semi-pro recording quality card based on Ice1724. Since at this time I have no plans to use the HDMI output, it is blacklisted.
BUT
I prefer to use the onboard capture for network/speech usage, such as Skype, TeamSpeak, etc but never use it for music recording. To accomplish this I had to make a $HOME/.asoundrc shown here

Code:
 pcm.!default {                         # declare the default PCM device

        type asym                      # combine playback and capture devices

        playback.pcm {                 ### Playback object ###
                type plug              # convert audio to mixer format
                slave.pcm {
                        type dmix      # mix multiple audio streams
                        ipc_key 6969   # shared memory key; must be unique
                        ipc_key_add_uid true      # add UID to shared mem key
                        ipc_perm 0600             # shared mem file permissions
                        slave {
                                pcm {
                                   type hw        # define the playback hardware
                                   card "Ice1724"   # playback card name
                                   device 0       # playback device on that card
                                }
                                format S16_LE     # bits per sample format
                                rate 44100        # samples per second
                                channels 2        # number of audio channels
                        }
                }
        }

        capture.pcm {                   ### Capture object ###
                type plug               # convert audio format from the hardware
                slave {
                        pcm {
                                type hw        # define the capture hardware
                                card "Intel"       # capture card name
                                device 0       # capture device on that card
                        }
                }
        }
}
Presently, I load the Ice1724 capture for recording manually only because I rarely use "Microphone In" for music recording since usually I am inputting at Line Level from a standalone mixer. On the rare occasion that I use the "Mic In" I need to walk through a routine checklist so I KNOW it is on and onboard is off, not left to assume software did it properly. Psychological I suppose, but necessary nonetheless for me. Not a recommendation, just mentioned for clarity sake. This just works for me.

Hope this helps you find yours.
 
Old 01-30-2014, 07:19 AM   #13
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 228

Original Poster
Rep: Reputation: 18
Wow, that situation is far more complicated than mine is. However, I will play around with some of the things you've presented here. Does they ipc_key have to be any particular number or is it just a random, made-up number? And I'm assuming you are able to adjust the volume on multiple audio channels via alsamixer with that configuration?
 
Old 01-30-2014, 12:34 PM   #14
rvdboom
Member
 
Registered: Jul 2007
Distribution: Slackware
Posts: 183

Rep: Reputation: 23
Quote:
Originally Posted by spudgunner View Post
(1) At one point I tried editing /usr/share/alsa/alsa.conf, and I changed the line

Code:
defaults.pcm.device 0
to

Code:
defaults.pcm.device 3
(due to what running aplay -l tells me about my devices) and I was able to adjust the volume of the HDMI PCM device via alsamixer (whereas before, it's only set to MM or 00). However, this didn't appear to do anything for me, so I switched to back to try to keep as much as possible at default values to isolate my problems.
Try with card instead.
I have some issues with AMD audio too. When I run "aplay -l", I get :

Code:
bash-4.2$ aplay -l
**** Liste des Périphériques Matériels PLAYBACK ****
carte 0: Generic [HD-Audio Generic], périphérique 3: ID aa01 Digital [ID aa01 Digital]
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0
carte 1: Generic_1 [HD-Audio Generic], périphérique 0: ALC887-VD Analog [ALC887-VD Analog]
  Sous-périphériques: 0/1
  Sous-périphérique #0: subdevice #0
bash-4.2$

I've put the following in /etc/asound.conf :

Code:
defaults.ctl.card 1
defaults.pcm.card 1
defaults.timer.card 1
Now I get sound in every application though I can't manage to have two applications accessing the audio device, while I could before.
Kmix is also not displaying the proper mixing channels, but that seems to be a bug in current kmix as the HDMI and Analog audio have the same name. alsamixer works fine though.
This is really quite a mess.
 
Old 03-21-2014, 07:37 PM   #15
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 228

Original Poster
Rep: Reputation: 18
First off, sorry to revive a dead thread (and sorry for leaving you all hanging).

I had it somewhat working, as in I could hear audio but I had no volume control or no individual channel control in alsamixer. But it was working well enough for what I needed it for, so I gave up in trying to make it better because I was frustrated.

Fast forward to today: the power was cut to my machine and when I booted it back up audio was again not working. I can't remember my somewhat solution and I've tried lots of asound.conf stuff but nothing is working for me. So currently, I have a S/PDIF channel that defaults to mute and only goes to 00 if it's not muted. When I unmute and test with aplay -D, I get a static sound.

So (since I never had it working quite right to begin with anyways), please try to help me once again.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FFMPEG for APACHE 2.4.6 (x64), PHP 5.5 (x64), MYSQL 5.6 (x64) on WINDOWS 8 (x64) Punctual Programming 3 08-07-2013 05:20 PM
Intel audio 82801I & alsa on Slack 13.1 x64 carlitoco Slackware 1 02-26-2011 07:48 AM
Alsa problems, 2.6 kernel Macky Slackware 5 11-10-2005 09:57 PM
2.6.7 kernel and alsa problems. FLOODS Linux - Hardware 12 07-23-2004 02:49 PM
Problems with ALSA in Kernel 2.6.3 jironimo Linux - Software 7 03-14-2004 10:39 PM


All times are GMT -5. The time now is 05:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration