SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1) OK, then alsa.conf. No problem. If you don't see the file, then run pkgtool, view each alsa package, and find the .conf file that has a pcm.default line in it.
2) Copy your /etc/asound.conf to asound.conf.bak, and ~/.asoundrc to ~/.asoundrc.bak. We'll tweak it in /usr/share/alsa/alsa.conf instead, and you don't want your other settings to get in the way.
3) OK, your devices are different than mine. It looks like you want card 0, device 3.
4) Post your /usr/share/alsa/alsa.conf from your slackware machine that you're having trouble with and I'll show you how to fix it.
5) Also, post lsmod | grep snd.
6) try this: mplayer -ao alsa:device=hw:0.3 KDE_Startup.wav (or is it alsa:device=hw=0.3)?
if that doesn't work, try mplayer -ao alsa:device=plughw:0.3 KDE_Startup.wav
try mplayer -ao alsa:device=hdmi KDE_Startup.wav as well.
Woodsman, for the configuration/installation in which you have aplay-l showing hdmi for card 0 device 3, try
mplayer -ao alsa:device=hw=0.3 yoursong
Also, I haven't tried lately but mythtv didn't work yet with kde4/qt4. Not sure if I tried after loading the optional kde3 stuff in extra subdirectory though.
Now that I'm at my linux box, try this: mplayer -ao alsa:device=plughw=0.3 KDE_Startup.wav. If that doesn't work try mplayer -ao alsa:device=plughw=0.1 KDE_Startup.wav.
Here's my /usr/share/alsa/alsa.conf...it will be a little different than yours due to hardware differences. Look for the 2 lines I commented out--the ones below are my changes.
Code:
#
# ALSA library configuration file
#
# pre-load the configuration files
@hooks [
{
func load
files [
"/etc/asound.conf"
"~/.asoundrc"
]
errors false
}
]
# load card-specific configuration files (on request)
cards.@hooks [
{
func load
files [
{
@func concat
strings [
{ @func datadir }
"/cards/aliases.conf"
]
}
]
}
{
func load_for_all_cards
files [
{
@func concat
strings [
{ @func datadir }
"/cards/"
{ @func private_string }
".conf"
]
}
]
errors false
}
]
#
# defaults
#
# show all name hints also for definitions without hint {} section
defaults.namehint.showall off
# show just basic name hints
defaults.namehint.basic on
# show extended name hints
defaults.namehint.extended off
#
defaults.ctl.card 0
defaults.pcm.card 0
#defaults.pcm.device 0
defaults.pcm.device 1
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660
defaults.pcm.dmix.max_periods 0
#defaults.pcm.dmix.rate 48000
defaults.pcm.dmix.rate 44100
defaults.pcm.dmix.format "unchanged"
defaults.pcm.dmix.card defaults.pcm.card
defaults.pcm.dmix.device defaults.pcm.device
defaults.pcm.dsnoop.card defaults.pcm.card
defaults.pcm.dsnoop.device defaults.pcm.device
defaults.pcm.front.card defaults.pcm.card
defaults.pcm.front.device defaults.pcm.device
defaults.pcm.rear.card defaults.pcm.card
defaults.pcm.rear.device defaults.pcm.device
defaults.pcm.center_lfe.card defaults.pcm.card
defaults.pcm.center_lfe.device defaults.pcm.device
defaults.pcm.side.card defaults.pcm.card
defaults.pcm.side.device defaults.pcm.device
defaults.pcm.surround40.card defaults.pcm.card
defaults.pcm.surround40.device defaults.pcm.device
defaults.pcm.surround41.card defaults.pcm.card
defaults.pcm.surround41.device defaults.pcm.device
defaults.pcm.surround50.card defaults.pcm.card
defaults.pcm.surround50.device defaults.pcm.device
defaults.pcm.surround51.card defaults.pcm.card
defaults.pcm.surround51.device defaults.pcm.device
defaults.pcm.surround71.card defaults.pcm.card
defaults.pcm.surround71.device defaults.pcm.device
defaults.pcm.iec958.card defaults.pcm.card
defaults.pcm.iec958.device defaults.pcm.device
defaults.pcm.modem.card defaults.pcm.card
defaults.pcm.modem.device defaults.pcm.device
# truncate files via file or tee PCM
defaults.pcm.file_format "raw"
defaults.pcm.file_truncate true
defaults.rawmidi.card 0
defaults.rawmidi.device 0
defaults.rawmidi.subdevice -1
defaults.hwdep.card 0
defaults.hwdep.device 0
defaults.timer.class 2
defaults.timer.sclass 0
defaults.timer.card 0
defaults.timer.device 0
defaults.timer.subdevice 0
#
# PCM interface
#
# redirect to load-on-demand extended pcm definitions
pcm.cards cards.pcm
pcm.default cards.pcm.default
pcm.front cards.pcm.front
pcm.rear cards.pcm.rear
pcm.center_lfe cards.pcm.center_lfe
pcm.side cards.pcm.side
pcm.surround40 cards.pcm.surround40
pcm.surround41 cards.pcm.surround41
pcm.surround50 cards.pcm.surround50
pcm.surround51 cards.pcm.surround51
pcm.surround71 cards.pcm.surround71
pcm.iec958 cards.pcm.iec958
pcm.spdif iec958
pcm.hdmi cards.pcm.hdmi
pcm.dmix cards.pcm.dmix
pcm.dsnoop cards.pcm.dsnoop
pcm.modem cards.pcm.modem
pcm.phoneline cards.pcm.phoneline
pcm.hw {
@args [ CARD DEV SUBDEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_PCM_CARD
ALSA_CARD
]
default {
@func refer
name defaults.pcm.card
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_PCM_DEVICE
]
default {
@func refer
name defaults.pcm.device
}
}
}
@args.SUBDEV {
type integer
default {
@func refer
name defaults.pcm.subdevice
}
}
type hw
card $CARD
device $DEV
subdevice $SUBDEV
hint {
show {
@func refer
name defaults.namehint.extended
}
description "Direct hardware device without any conversions"
}
}
pcm.plughw {
@args [ CARD DEV SUBDEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_PCM_CARD
ALSA_CARD
]
default {
@func refer
name defaults.pcm.card
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_PCM_DEVICE
]
default {
@func refer
name defaults.pcm.device
}
}
}
@args.SUBDEV {
type integer
default {
@func refer
name defaults.pcm.subdevice
}
}
type plug
slave.pcm {
type hw
card $CARD
device $DEV
subdevice $SUBDEV
}
hint {
show {
@func refer
name defaults.namehint.extended
}
description "Hardware device with all software conversions"
}
}
pcm.plug {
@args [ SLAVE ]
@args.SLAVE {
type string
}
type plug
slave.pcm $SLAVE
}
pcm.shm {
@args [ SOCKET PCM ]
@args.SOCKET {
type string
}
@args.PCM {
type string
}
type shm
server $SOCKET
pcm $PCM
}
pcm.tee {
@args [ SLAVE FILE FORMAT ]
@args.SLAVE {
type string
}
@args.FILE {
type string
}
@args.FORMAT {
type string
default {
@func refer
name defaults.pcm.file_format
}
}
type file
slave.pcm $SLAVE
file $FILE
format $FORMAT
truncate {
@func refer
name defaults.pcm.file_truncate
}
}
pcm.file {
@args [ FILE FORMAT ]
@args.FILE {
type string
}
@args.FORMAT {
type string
default {
@func refer
name defaults.pcm.file_format
}
}
type file
slave.pcm null
file $FILE
format $FORMAT
truncate {
@func refer
name defaults.pcm.file_truncate
}
}
pcm.null {
type null
hint {
show {
@func refer
name defaults.namehint.basic
}
description "Discard all samples (playback) or generate zero samples (capture)"
}
}
#
# Control interface
#
ctl.default {
type hw
card {
@func getenv
vars [
ALSA_CTL_CARD
ALSA_CARD
]
default {
@func refer
name defaults.ctl.card
}
}
}
ctl.hw {
@args [ CARD ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_CTL_CARD
ALSA_CARD
]
default {
@func refer
name defaults.ctl.card
}
}
}
type hw
card $CARD
}
ctl.shm {
@args [ SOCKET CTL ]
@args.SOCKET {
type string
}
@args.CTL {
type string
}
type shm
server $SOCKET
ctl $CTL
}
#
# RawMidi interface
#
rawmidi.default {
type hw
card {
@func getenv
vars [
ALSA_RAWMIDI_CARD
ALSA_CARD
]
default {
@func refer
name defaults.rawmidi.card
}
}
device {
@func igetenv
vars [
ALSA_RAWMIDI_DEVICE
]
default {
@func refer
name defaults.rawmidi.device
}
}
}
rawmidi.hw {
@args [ CARD DEV SUBDEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_RAWMIDI_CARD
ALSA_CARD
]
default {
@func refer
name defaults.rawmidi.card
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_RAWMIDI_DEVICE
]
default {
@func refer
name defaults.rawmidi.device
}
}
}
@args.SUBDEV {
type integer
default -1
}
type hw
card $CARD
device $DEV
subdevice $SUBDEV
hint {
description "Direct rawmidi driver device"
device $DEV
}
}
rawmidi.virtual {
@args [ MERGE ]
@args.MERGE {
type string
default 1
}
type virtual
merge $MERGE
}
#
# Sequencer interface
#
seq.default {
type hw
}
seq.hw {
type hw
}
#
# HwDep interface
#
hwdep.default {
type hw
card {
@func getenv
vars [
ALSA_HWDEP_CARD
ALSA_CARD
]
default {
@func refer
name defaults.hwdep.card
}
}
device {
@func igetenv
vars [
ALSA_HWDEP_DEVICE
]
default {
@func refer
name defaults.hwdep.device
}
}
}
hwdep.hw {
@args [ CARD DEV ]
@args.CARD {
type string
default {
@func getenv
vars [
ALSA_HWDEP_CARD
ALSA_CARD
]
default {
@func refer
name defaults.hwdep.card
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars [
ALSA_HWDEP_DEVICE
]
default {
@func refer
name defaults.hwdep.device
}
}
}
type hw
card $CARD
device $DEV
}
#
# Timer interface
#
timer_query.default {
type hw
}
timer_query.hw {
type hw
}
timer.default {
type hw
class {
@func refer
name defaults.timer.class
}
sclass {
@func refer
name defaults.timer.sclass
}
card {
@func refer
name defaults.timer.card
}
device {
@func refer
name defaults.timer.device
}
subdevice {
@func refer
name defaults.timer.subdevice
}
hint.description "Default direct hardware timer device"
}
timer.hw {
@args [ CLASS SCLASS CARD DEV SUBDEV ]
@args.CLASS {
type integer
default {
@func refer
name defaults.timer.class
}
}
@args.SCLASS {
type integer
default {
@func refer
name defaults.timer.sclass
}
}
@args.CARD {
type string
default {
@func refer
name defaults.timer.card
}
}
@args.DEV {
type integer
default {
@func refer
name defaults.timer.device
}
}
@args.SUBDEV {
type integer
default {
@func refer
name defaults.timer.subdevice
}
}
type hw
class $CLASS
sclass $SCLASS
card $CARD
device $DEV
subdevice $SUBDEV
}
Okay, another weekend and I'm back to trying to resolve this silly problem.
To recap, I'm using Slackware Current/13.0 with a 2.6.30.4 kernel.
Ideally, I want sound through both external speakers (analog device 0:0) and HDMI (device 0:3). Which device is primary is not important. The box should send audio to both devices. I want the external speakers as an available audio device because I'm a long way from configuring this box as a HTPC and testing in my office is more convenient. Yet I need sound through HDMI for when I test configuration changes with my HD TV.
The aplay -l command does list the HDMI audio device. That seems to be half the battle. However, I cannot consistently get any audio through HDMI when I use Current/13.0. I can get audio with xbmc and sometimes with PCLOS.
First test this weekend in my office with small, cheap, external speakers from a console (no X):
mplayer -ao alsa:device=hw=0.0 soundfile
I hear the wave file from my external speakers. I then tried a slight variation:
mplayer -ao alsa:device=plughw=0.0 soundfile
I again hear the sound file.
I moved the PC from the office to the HD TV. I connected a (3.5 mm) stereo speaker cable from the PC audio out port to the TV computer audio port. The TV audio port is intended for use with the D-Sub/RGB video connector.
I heard the test file from the HD TV speakers with both mplayer commands (using analog device 0:0).
Next test was the HDMI audio device:
mplayer -ao alsa:device=hw=0.3 soundfile
Nothing.
Next:
mplayer -ao alsa:device=plughw=0.3 soundfile
Nothing.
Next I added the following changes to /usr/share/alsa/alsa.conf:
I restarted alsa and tried the same mplayer commands.
I had sound from the analog device (0:0) but no sound from the HDMI device (0:3).
I disabled the /etc/asound.conf file and rebooted. Same results.
I restored /usr/share/alsa/alsa.conf.
Some strangeness: when I'm not in X, the mplayer and speaker-test command line tests to the analog device (0:0) are good. That is, I hear audio through the TV speakers but through the analog device (0:0). The same tests to the HDMI audio device (0:3) fail. When I start X there is no audio with the same tests to the analog device 0:0. Yet in X I get audio through the TV speakers through the HDMI audio device (0:3). I toggled to a different console outside X and I can hear audio through 0:0 but not 0:3.
More strangeness: Although I get audio through HDMI with the command line tests in X, I have no audio from any GUI media player (Xine, MPlayer, Dragon Player) with either port. KMix and alsamixer shows no muted ports.
At the moment I sort of have audio through HDMI but everything is hit and miss. I'm not seeing any patterns. Why no audio through the media players?
As a side note, I have been able to get audio through HDMI in xbmc. Yet I noticed in my several previous tests with xbmc that audio and video often are out of sync.
A little hard to help you since I don't have that hardware.
Back up a little bit. What does lspci and lsmod show?
Here is one link that has this working. You've probably already seen it. It shows a 2.6.28 kernel works. So maybe a 2.6.27.x won't work for you. Seems the 2.6.30.x should.
What did you select when building custom kernel for the audio driver?
My guess is you would pick all modules
Code:
Sound card support
PCI sound devices
Intel HD Audio
Build Realtek HD-audio codec support
Build NVIDIA HDMI HD-audio codec
Enable generic HD-audio codec support
.
Since you already show the device in aplay -l, I would think the rest is turning it on via the video driver. Is there maybe an option required in xorg.conf for this? For example with the proprietary radeon driver (catalyst aka fglrx) this now seems to be enabled per default but with the radeonhd open source driver I have to explicitly turn this on with something like:
Yes, I have seen that thread. Thanks. Seems so simple yet so many people experience different results. Weird.
Quote:
Since you already show the device in aplay -l, I would think the rest is turning it on via the video driver. Is there maybe an option required in xorg.conf for this?
I thought something similar but I see nothing in the nvidia-settings tool.
Quote:
audio.device.alsa_front_devicelughw:0,3
Well! That trick seemed to awaken xine! Gxine now seems to work too. By the way how did gxine end up as the default media player in KDE 4.x?
Quote:
ao="alsa:device=hw=0.3"
Well! That trick seemed to awaken mplayer!
No audio yet from dragon.
Quote:
Last suggestion I came across is to upgrade bios and check settings.
BIOS is the latest 0604. First thing I did when I powered up the box was flash the BIOS.
Well, that I have xine working is a partial victory.
However, the system does not always terminate the audio and leaves a background humming noise. Seems I have to exit X, reboot, run another video, or send a test audio from the command line to stop the humming. Once again, I don't see any patterns.
One thing adding to the frustration is nothing in KDE 4.x is configured the way I liked in KDE 3.5.10. I have to reconfigure everything in KDE from scratch.
gxine: agreed. First thing I did was relink those suffixes back to xine or mplayer. xine seems to work better with screen scaling (or I haven't figured how to do it with mplayer). Mplayer lets you go back a few seconds which xine is not good at.
I get high pitched oscillator sound when first starting X. This happens for me with either the proprietary or open source drivers. I use the TV remote to flip between TV and hdmi 1 to 5 times and it goes away.
Since you have mplayer working with hdmi out (probably in -current) you have something mythtv can use. Problem now is mythtv didn't run or compile with qt4 which is in -current. Maybe they've fixed this by now. We'll have to check.
Just weird. Then again, I seem to recall that any time gxine is installed that the app is given or grabs precedence over other apps. I always remove the package but for those few days when gxine is installed, seems that is the behavior. Must be something in the packaging?
Quote:
I get high pitched oscillator sound when first starting X. This happens for me with either the proprietary or open source drivers. I use the TV remote to flip between TV and hdmi 1 to 5 times and it goes away.
I haven't yet noticed any pattern when the humming noise starts. If I terminate a video in xine by pressing the q key, then this sometimes happen. I'll try to remember to experiment with stopping the video before pressing the quit key and see whether that makes a difference.
Quote:
Since you have mplayer working with hdmi out (probably in -current) . . .
Yes, I have given up trying to get audio through HDMI in 12.2 and am now only testing Current/13.0.
I still prefer KDE 3.5.10. However, as this box will be an HTPC, I'm not overly concerned with several issues many people (including me) have with KDE 4. All I need is a basic desktop, some basic file management and a tool to watch videos. Gradually I'm trying to get KDE 4 configured to my taste but the process is slow. I have read many times not to try to merge KDE 3.5 configuration settings into KDE 4. So reconfiguring from scratch is painful. Some things are the same, some are not. I still haven't grasped how to completely configure the panel.
I will say that KDE 4 is much more pleasing to view on the HD TV than KDE 3.5.10 or Xfce 4.6.1. I would like to know why the latter two look so grainy and awful on the TV when KDE 4 does not.
XBMC also looks much nicer on the TV but I can't get that interface to play videos without losing sync between video and audio. I was considering XBMC as an option for an HTPC interface. I found an XBMC Slackware build script for 12.2 but I'm going to guess the build will fail with Current. I have a feeling that XBMC will run better as a package on Slackware rather than integrated into Ubuntu as is done with the Live CD version I installed.
Quote:
. . . you have something mythtv can use. Problem now is mythtv didn't run or compile with qt4 which is in -current. Maybe they've fixed this by now. We'll have to check.
That has been a background concern for me. As I now seem "stuck" with using Current to get audio through HDMI, that means waiting to see which third-party packages will successfully build with Current/13.0. I can "survive" with a basic KDE desktop to watch TV recordings and DVDs. I wrote some very basic scripts to record TV, which I have been using for several months under 12.2. Function before form. Yet eventually I'd like a nice interface for the project. Also MythTV provides more robustness than my meager scripts for scheduling recordings and archiving.
Odd, now that I sort of have audio through HDMI. I pretty much use xine to watch any recordings or DVDs but now xine is hard-coded to only send audio to HDMI. When I have the PC in my office I'm connected to some inexpensive external computer speakers and I have to manually reconfigure xine to route audio back to the external speakers rather than HDMI. In the end I'll only be using the TV but during this experiment and testing phase I need both audio devices. I'm hoping I can find a way for xine to concurrently send audio to both devices.
I have audio over HDMI now working in 13.0. I had to hard-code the Xine config file to send audio to HDMI. I wrote a shell script to thelp me toggle to external speakers when I have the box connected in my office and vice-versa. Clunky but doable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.