LinuxQuestions.org
Review your favorite Linux distribution.
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 07-09-2014, 11:05 PM   #31
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Original Poster
Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309

You know what? I give up. I got the one second of audio lag again today. There was nothing in my dmesg output as to why. At this point, I think I've exhausted all the options.

No worries; my new setup will be video over HDMI, audio from a Behringer UCA 202 USB sound card directly to speakers. It just makes it a bit more complicated if I want to hook other devices up to the TV.

EDIT: Hmm... the problem went away soon after I posted, suggesting that it's temporary. Still not something that I'm willing to deal with.

Last edited by dugan; 07-10-2014 at 12:44 AM.
 
Old 07-10-2014, 01:35 AM   #32
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,085

Rep: Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262Reputation: 7262
Quote:
Originally Posted by dugan View Post
You know what? I give up...
Well, you took it a lot farther than I did.
A year or two ago I spent a good amount of time trying to get HDMI audio to work after reading the documentation from NVIDIA and elsewhere and finally threw in the towel.
Kudos for all the effort you put into the project.
 
Old 07-10-2014, 06:11 AM   #33
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by dugan View Post
At this point, I think I've exhausted all the options.
So, did you try it with Pulseaudio?
 
Old 07-10-2014, 11:15 AM   #34
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Original Poster
Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by TobiSGD View Post
So, did you try it with Pulseaudio?
No. Is it as simple as following the README on SlackBuilds.org, and then setting the following .asoundrc?

https://projects.archlinux.org/svnto...ulseaudio-alsa
 
Old 07-10-2014, 11:30 AM   #35
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Should be. To be honest, I can't remember to even have a .soundrc on Slackware with Pulseaudio and I definitely don't have one now on Gentoo.
 
Old 07-11-2014, 01:57 AM   #36
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Original Poster
Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Got help from this thread. SOLVED] Proper pulseaudio setup for Slackware64-current They were:

Install alsa-plugins as well as pulseaudio

Add start-pulseaudio-x11 to ~/.config/openbox/autostart (because I'm using openbox)

Add to /etc/rc.d/rc.local:

Code:
if [ -x /etc/rc.d/rc.pulseaudio ]; then
	/etc/rc.d/rc.pulseaudio start
fi
Make /etc/rc.d/rc.pulseaudio executable and start it up

Add the following ~/.asoundrc

Code:
pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}
Pulseaudio is now working so transparently that I can't even tell if I'm outputting audio through Pulseaudio. I suppose that's a good problem to have. I'll post back if I get the lagging audio again, or if I manage to go for a week without it.

UPDATE: Hate to turn this into a Pulseaudio thread, but ugh... it turns out (ref) I need both a compat32 pulseaudio and a compat32 alsa-plugins to get audio in Wine now. I'll take care of that later.

UPDATE 2: Runner2 crashed immediately for what I strongly suspect is the same reason:

Code:
error 60: Error initializing output device. 
FMOD error 31: FMOD was not initialized correctly to support this function. 
Fatal error
Failed to load necessary sound data.  Game will exit. (437278 0x723acf08)
I'll try to take care of these tomorrow.

Last edited by dugan; 07-11-2014 at 02:21 AM.
 
1 members found this post helpful.
Old 07-12-2014, 12:00 AM   #37
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Original Poster
Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Tobi, were you able to get Bit Trip Runner2 working with Pulseaudio? I got this problem, and I can't fix it:

http://steamcommunity.com/app/218060...8810978055856/

Everything else I've tried (including other Steam games) works.
 
Old 07-12-2014, 12:29 AM   #38
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Original Poster
Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by ReaperX7 View Post
The best option is to just disable the onboard audio if possible. This will allow udev to detect only the HDMI processor and use the Intel HD Audio. It also helps if you have a PCI/PCIe audio card that uses a different chipset as well.
Hey ReaperX7. The reason this doesn't work is because ALSA's default output device is card 0, device 0, or 0:0. The devices on my discrete NVidia card, as you saw from my aplay output, are 3, 7, 8 and 9, with 7 being the "valid" one (that's what my ELD info said, as mentioned upthread). If you have the motherboard's audio interface enabled, then the NVidia sound card is card 1, and its devices are 1:3, 1:7, 1:8 and 1:9. Disabling the motherboard sound card simply shifts the NVidia card's number to 0, giving you four audio devices: 0:3, 0:7, 0:8 and 0:9. None of these are 0:0, and you'll therefore get no audio output unless you do further tweaking.

You can then use the following .asoundrc to set device 0:7 as the default:

Code:
pcm.!default {
  type hw
  card 1
  device 7
}
But then the audio will be going directly to the sound device and not through DMIX, so you'll only be able to play one sound at a time.

The simplest .asoundrc file that will send audio to dmix and then to 0:7 is:

Code:
pcm.ossmix {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,7"
    }
}
pcm.!default {
    type plug
    slave.pcm "ossmix"
}
I've found that that gives me stuttering audio in Warcraft 3, so I had to add the common period_size and buffer_size parameters. The bindings section is a common performance optimization (to only care about two channels):

Code:
pcm.ossmix {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,7"
	period_time 0
	period_time 1024
	buffer_size 8192
    }
    bindings {
        0 0
        1 1
    }
}
pcm.!default {
    type plug
    slave.pcm "ossmix"
}

Last edited by dugan; 07-12-2014 at 02:07 AM.
 
Old 07-12-2014, 02:07 AM   #39
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Original Poster
Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
UPDATE:

XRUN_DEBUG is turned on, of course.

OOOOOh, I got the audio lag again (with the above setup, no Pulseaudio), and this time I had stuff in my DMESG!

Code:
[ 2210.847854] ALSA: PCM: Lost interrupts? [Q] (stream=0, delta=422, new_hw_ptr=12276, old_hw_ptr=11854)
[ 2215.675804] snd_pcm_update_hw_ptr0: 276 callbacks suppressed
Later, I noticed that on a fresh boot, dmesg would contain the the recommendation I saw earlier for a larger bdl_pos_adj value.

If I started playing Google Play Music in Chromium, then my dmesg would be spammed with the above messages.

I was able to get the messages to disappear by adding the following to /etc/modprobe.d/snd-hda-intel.conf:

Code:
options snd-hda-intel enable_msi=1 bdl_pos_adj=64
(Notice that this is not the line I tried pasting in earlier from an Ubuntu ticket).

We'll see if this solves the delayed audio problem. I'm hopeful, because it gets rid of the "lost interrupt" warnings, and lost interrupts are obviously consistent with the symptoms.
 
Old 07-12-2014, 10:43 AM   #40
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by dugan View Post
Tobi, were you able to get Bit Trip Runner2 working with Pulseaudio? I got this problem, and I can't fix it:

http://steamcommunity.com/app/218060...8810978055856/

Everything else I've tried (including other Steam games) works.
Sorry, I don't own that game. Pulseaudio works for my games and any other sound output without any problems.
 
Old 07-16-2014, 11:32 AM   #41
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,780

Rep: Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431
Quote:
Originally Posted by dugan View Post
But then the audio will be going directly to the sound device and not through DMIX, so you'll only be able to play one sound at a time.
Hello Dugan. Hope you have been rewarded with at least some progress after all your hard work. The reason for quoting the above is that even though this may not help you on your present tack, I figure thorough and accurate data is important to a successful outcome to avoid blindly resorting to the time-wasting shotgun approach. So far it seems you have avoided such a fail. Maybe this might help keep that going.

I'm wondering where the idea above came from, or if it was ever true, what and when has it changed? I ask this because I've never worried about this issue, because as long as I can remember, it has never been an issue for me with Alsa. I don't even have pulseaudio installed but I have always been able to, for example, speak and hear on TeamSpeak 3 while at the same time hearing for example, Professor Putricide. declare "Hmmmm where did those come from?" in WOTLK. Upon a few occasions I have added XMMS2 or Aqualung, or even the typical flash players in browsers so that the raid can hear music while we hurl insults at Valanar.

I'm assuming this is what people mean by "multiple sound (sources) at the same time" and mine has always just worked. My system has 3 audio hardwares -

1] the HDMI built into my nVidia graphics card (though the audio portion of HDMI is blacklisted)

2] USB microphone section of Logitech webcam (though it still works just as well with a different Mic plugged into ======>>>>

3] Discrete semi-pro sound card ( ESI Juli@

I'm including the list in case alsa behaves differently with different hardware and notably mine has 4 discrete channels so has some onboard auto-mixing capability... however it is my understanding that essentially all sound cards have some level of internal mixing. I do use an .asoundrc but it is very basic and I can't see how it could be responsible for multi-source capability.

Hopefully this may help even if only something to check off and discard. Any other data I can provide to help if you want it, just say so. Linux is so uneven when it comes to audio in that some stuff is so advanced and/or solid and others are Rube Goldberg at best, so it's difficult to diagnose something as complex as full second delays. This can be more complicated by other Rube like devices like Flash in Browsers which is giving me fits since a Firefox "upgrade". So again, anything you need.....
Attached Thumbnails
Click image for larger version

Name:	Juli@-Swap.jpg
Views:	31
Size:	255.9 KB
ID:	15923  
 
Old 07-16-2014, 11:55 AM   #42
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
Quote:
Originally Posted by enorbet View Post
I'm wondering where the idea above came from, or if it was ever true, what and when has it changed?
probably from me or teh internet, if i understand what the topic is

by direct i meant direct
alsa by default, without an .asoundrc, resamples everything to 48kHz
if you make it be direct it will fail when a request for a sample rate or bitrate is made that is different from the one currently being played
at least on my 2 cards (i remember older ones too)

example .asoundrc
Code:
pcm.!default{
type hw
card 0
}
ctl.!default{
type hw
card 0
}
to check what the card is currently doing:
watch cat /proc/asound/card0/pcm0p/sub0/hw_params
(for card0, subdevice 0)

notice that when playing a, for example, 96kHz track without an asoundrc, it will say 48kHz

Last edited by genss; 07-16-2014 at 11:59 AM.
 
Old 07-16-2014, 12:17 PM   #43
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Original Poster
Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by enorbet View Post
I'm wondering where the idea above came from, or if it was ever true, what and when has it changed?I do use an .asoundrc but it is very basic and I can't see how it could be responsible for multi-source capability.
May I see your .asoundrc file, please?

I can confirm that if I use an .asoundrc file to send audio to my NVidia card (which, and this is significant, is not card 0, device 0) and I do not specify that it goes through DMix, then running two MPlayer instances at the same time will result in the second one erroring out with "sound device busy."

Last edited by dugan; 07-16-2014 at 12:55 PM.
 
Old 07-16-2014, 01:18 PM   #44
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by enorbet View Post
3] Discrete semi-pro sound card ( ESI Juli@

I'm including the list in case alsa behaves differently with different hardware and notably mine has 4 discrete channels so has some onboard auto-mixing capability...
That is exactly why it works for you, dmix is not needed for audio-cards that have mixing capabilities in the hardware.
Quote:
however it is my understanding that essentially all sound cards have some level of internal mixing.
Many cards, especially cheap and onboard audio-cards, only have software mixing capabilities, read: Alsa has to do the mixing, hence dmix must be used.
 
Old 07-16-2014, 03:38 PM   #45
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
problem is in the resampling part of mixing
mixing two inputs that have the same format is just add-ing them together with saturation

funny, i tried now playing two songs with the same format and got a "device busy"
i distinctly remember it working on my previous card (and that was a crap one)
interesting

anyway
i agree, proper hw mixing is rarely found in non-professional hardware
envy based cards being the only exception i found so far (ICE series has been continued as envy, they renamed after VIA bought them)
 
  


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
(RHEL 5.6) No sound after installing NVIDIA Video Card with hdmi neoserdes Linux - Hardware 8 08-19-2015 09:52 AM
[SOLVED] no sound ati video card HDMI Shadowmeph Linux Mint 3 01-27-2014 12:00 AM
No sound through inboard HDMI on Fedora 12 with proprietary NVIDIA video driver rcx11 Linux - Hardware 9 08-21-2010 08:29 PM
Debian Video Card Question, Nvidia and HDMI bruceam Linux - Hardware 5 07-31-2009 12:29 PM
Missing the perimeter of my desktop - Video Card / DVI-HDMI waffe Linux - Hardware 3 04-20-2009 01:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:26 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration