LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Frustration With Audio (https://www.linuxquestions.org/questions/slackware-14/frustration-with-audio-4175492780/)

tb75252 01-27-2014 02:48 PM

Frustration With Audio
 
I have an ASUS Xonar DS PCI 7.1 audio card installed on an Intel DQ965GF motherboard. The OS is Slackware 14.1, 64-bit, and the desktop environment is KDE.

What frustrates me is that sometimes I have to reboot 3-4 times before I am able to get audio out to the speakers when trying to listen to Internet streaming music. (I like to visit places such as AccuRadio.com, Pandora.com, etc.) And other times the speakers work right away!!

I always hear the "musical scale" after Slackware's KDE has finished loading, so I don't think that the speakers or the audio card are to be blamed. There must be some driver that is not always loading correctly... Moreover, I always get music through the speakers when using Ubuntu or Linux Mint Debian Edition which are also installed on the same PC.

What could be in Slackware that causes this hit or miss with audio out to the speakers? I have checked Alsamixer and things seem ok, moreover Adobe Flash Player (for Linux) is installed correctly.

I am too much of a newbie to solve this on my own...

ReaperX7 01-27-2014 03:16 PM

Xonar support should be through the oxygen or virtuoso driver and is fairly straight forward in operation. Try AlienBOB's alsaconf script if you still have issues. You may need a asoundrc and module.conf config file set as well.

However, I've found that this chipset does work better with the OSSv4 driver rather than ALSA. Various patches for kernel compatibility are available from OSSv4's forums if you have issues. The OSS driver for me worked much better with less to configure.

Daedra 01-27-2014 05:21 PM

I have the Xonar D1 and it works perfectly in Slackware with the snd-virtuoso module. Given the limited information I have from your post my first instinct is the think that maybe you have either a video card wiht an hdmi audio or possibly you didn't disable the onboard audio and what is happening is that Alsa is setting your soundcards in the incorrect order. I am not 100% sure on this but to check open a terminal and type alsamixer and hit F6 or F5 I believe, and this will list all the soundcards in the system and what order they are listed. The xonar should be first. If it is not reply back to us, and list all the soundcards that appear in the alsamixer list.

ReaperX7 01-27-2014 06:56 PM

Try this setup, for your card. Use these to generate scripts for your system if you have the Intel Audio still enabled with the Xonar. I commented out but left in the snd-oxygen driver just in case snd-virtuoso has issues. Both drivers will work however on these cards as they are OxygenHD 8788 chipsets.

Code:

cat > /etc/modules.conf << "EOF"
      # ALSA portion
      alias char-major-116 snd
      alias snd-card-0 snd-virtuoso
      #alias snd-card-0 snd-oxygen
      alias snd-card-1 snd-hda-intel
      # module options should go here
     
      # OSS/Free portion - card #1
      alias char-major-14 soundcore
      alias sound-slot-0 snd-card-0
      alias sound-service-0-0 snd-mixer-oss
      alias sound-service-0-1 snd-seq-oss
      alias sound-service-0-3 snd-pcm-oss
      alias sound-service-0-8 snd-seq-oss
      alias sound-service-0-12 snd-pcm-oss

      # OSS/Free portion - card #2
      alias sound-slot-1 snd-card-1
      alias sound-service-1-0 snd-mixer-oss
      alias sound-service-1-3 snd-pcm-oss
      alias sound-service-1-12 snd-pcm-oss
EOF

Code:

cat > .asoundrc << "EOF"
      pcm.virtuoso {
          type hw
          card 0
      }
#      pcm.oxygen {
#          type hw
#          card 0
#      }
#      ctl.oxygen {
#          type hw
#          card 0
#      }
      ctl.virtuoso {
          type hw
          card 0
      }
      pcm.intel {
          type hw
          card 1
      }
      ctl.intel {
          type hw
          card 1
      }
EOF


Bertman123 01-27-2014 07:05 PM

How many audio cards do you have? Do you have more than one?

enorbet 01-27-2014 08:38 PM

Hello
According to Intel that board has onboard sound via SigmaTel* STAC9227. It also has onboard video but if you disabled that and use a discrete video card it may have HDMI, adding a 3rd audio device to your system.

The easiest way to find out what is being recognized by ALSA is with a simple command from any terminal

Code:

aplay -l 
-----or--------
cat /proc/asound/cards

The aplay command will give a slightly less detailed output than the /proc output but either will show what cards are detected and in what order for that boot. That order can change on udev based systems so to insure the same order every boot requires either blacklisting out those you never use, or hard assigning with the configuration files mentioned in some of the first responses.

ReaperX7 01-27-2014 08:58 PM

Technically from what I can tell he may have 2 (Xonar DS and Intel HD), possibly 3 if his video card has HDMI audio. I only included 2 for an example.

Regardless, that script should at least set the main output to the Xonar DS and push the Intel and HDMI audio to the 2nd and 3rd devices. PLus anything HDMI should be through the Intel HD driver anyways or the OEM proprietary driver.

tb75252 01-27-2014 09:38 PM

Quote:

Originally Posted by ReaperX7 (Post 5106416)
Try this setup, for your card. Use these to generate scripts for your system if you have the Intel Audio still enabled with the Xonar. I commented out but left in the snd-oxygen driver just in case snd-virtuoso has issues. Both drivers will work however on these cards as they are OxygenHD 8788 chipsets.

Code:

cat > /etc/modules.conf << "EOF"
      # ALSA portion
      alias char-major-116 snd
      alias snd-card-0 snd-virtuoso
      #alias snd-card-0 snd-oxygen
      alias snd-card-1 snd-hda-intel
      # module options should go here
     
      # OSS/Free portion - card #1
      alias char-major-14 soundcore
      alias sound-slot-0 snd-card-0
      alias sound-service-0-0 snd-mixer-oss
      alias sound-service-0-1 snd-seq-oss
      alias sound-service-0-3 snd-pcm-oss
      alias sound-service-0-8 snd-seq-oss
      alias sound-service-0-12 snd-pcm-oss

      # OSS/Free portion - card #2
      alias sound-slot-1 snd-card-1
      alias sound-service-1-0 snd-mixer-oss
      alias sound-service-1-3 snd-pcm-oss
      alias sound-service-1-12 snd-pcm-oss
EOF

Code:

cat > .asoundrc << "EOF"
      pcm.virtuoso {
          type hw
          card 0
      }
#      pcm.oxygen {
#          type hw
#          card 0
#      }
#      ctl.oxygen {
#          type hw
#          card 0
#      }
      ctl.virtuoso {
          type hw
          card 0
      }
      pcm.intel {
          type hw
          card 1
      }
      ctl.intel {
          type hw
          card 1
      }
EOF


Okay, I have created the two files as you suggested. Does it matter in which directory .asoundrc is placed? (Sorry, but I am a newbie...)

I have rebooted and have sound through the speakers. In the next few days I'll keep on testing and see if I have sound through the speakers every time that I boot up Slackware. If so then I will mark this thread as solved. If not, I'll be back... :-)

Thanks for your help.

ReaperX7 01-27-2014 09:41 PM

.asoundrc goes in your root user and each user account folders. You have to make one for each account. BTW those aren't the actual ready-to-use scripts I posted, but command scripts to generate the scripts, so you'll have to input those into a terminal line by line.

snale 01-27-2014 11:28 PM

I'm a complete newbie here - but is it possible this is a flash problem - maybe being blocked by other audio programs interfering with the sound card(s)? The OP states that he hears the KDE intro sound every time and only has the problem with internet radio - most internet radio is flash based.

ReaperX7 01-27-2014 11:31 PM

Depends on the radio station. Some use a streaming format like those used with GStreamer, MPlayer, etc.

snale 01-28-2014 12:02 AM

Quote:

Depends on the radio station. Some use a streaming format like those used with GStreamer, MPlayer, etc.
Very true - so I checked the page source of both sites the OP mentioned - pandora requires flash player 10 or above - accuradio is hard to tell but they mention SWFwrapper in some tags so maybe flash? I've never used them. I wish I knew more about how browsers and or flash interact with sound cards but it still may be an avenue of investigation for some one with more knowledge if he's still having a problem.

ReaperX7 01-28-2014 02:03 AM

Flash usually just outputs to whatever the default sound device is.

enorbet 01-28-2014 02:38 AM

KDE allows for the setting of different priorities for different devices on different job types. If you look in "System Settings > Multimedia > Phonon" there is a list on the left like for Playback and Recording. Under Playback you can set different hierarchies for "System Notifications" (the KDE greeter sound, etc), "Video", "Communication", "Games" , etc. There is a "Test" button at the bottom.

There is also a tab for the Backend such as MPLayer, Xine, etc.

Basically, use what works for you or alter your configs according to your desired setup.

tb75252 01-28-2014 08:17 PM

Quote:

Originally Posted by tb75252 (Post 5106498)
Okay, I have created the two files as you suggested. Does it matter in which directory .asoundrc is placed? (Sorry, but I am a newbie...)

I have rebooted and have sound through the speakers. In the next few days I'll keep on testing and see if I have sound through the speakers every time that I boot up Slackware. If so then I will mark this thread as solved. If not, I'll be back... :-)

Thanks for your help.

Well, the success was short-lived. This evening I've had to reboot three times before I could listen to AccuRadio.com or Pandora.com using Firefox.

The weird thing is that when I first booted up this evening I was able to listen to Internet music when launching Soma (it is an Internet radio player that can be launched via the command line). Now it is the other way around: I can listen to Internet radio with Firefox but I am unable to do it when I launch Soma via the command line.

ReaperX7 01-28-2014 08:22 PM

Okay now that's puzzling...

enorbet 01-28-2014 08:37 PM

Since I'm just naturally curious, why do you reboot again once you boot in to a session that works?

tb75252 01-28-2014 08:47 PM

Quote:

Originally Posted by enorbet (Post 5107120)
Since I'm just naturally curious, why do you reboot again once you boot in to a session that works?

The first and second reboots allowed me to listen to Internet music using Soma which is a stream player that can be launched via the command line. But I wanted to listen to either AccuRadio.com or Pandora.com using Firefox.

ReaperX7 01-28-2014 09:47 PM

At this point, I'm thinking this is an ALSA/dmix related issue. The audio should just work without a problem.

Although this may seem a radical solution, it did work for me on LFS.

Try installing PulseAudio. Normally this is generally a terrible idea, but the SBo for this is a clean implementation over ALSA and dmix, so it should work well. PulseAudio will auto-direct a lot of audio around your system to the appropriate output channels using it's audio output management daemon.

The SBo to build the package is located here:

http://slackbuilds.org/repository/14...io/pulseaudio/

Then delete the modules.conf and .asoundrc files

The only other solution I can think of would be to update the kernel and chance a fix that way, or blacklist out ALSA and install the OSSv4 drivers and see how they fair.

tb75252 01-30-2014 09:21 PM

Quote:

Originally Posted by ReaperX7 (Post 5107153)
At this point, I'm thinking this is an ALSA/dmix related issue. The audio should just work without a problem.

Although this may seem a radical solution, it did work for me on LFS.

Try installing PulseAudio. Normally this is generally a terrible idea, but the SBo for this is a clean implementation over ALSA and dmix, so it should work well. PulseAudio will auto-direct a lot of audio around your system to the appropriate output channels using it's audio output management daemon.

The SBo to build the package is located here:

http://slackbuilds.org/repository/14...io/pulseaudio/

Then delete the modules.conf and .asoundrc files

The only other solution I can think of would be to update the kernel and chance a fix that way, or blacklist out ALSA and install the OSSv4 drivers and see how they fair.

Well, that did not make an iota of difference... I'm almost inclined to reinstall Slackware and see if things get better! Maybe something went wrong during the first installation.

D1ver 01-30-2014 10:10 PM

I had a similar problem which I discussed in a little blog post here..

Try adding a file to /etc/modprobe.d/ called 'snd_virtuoso.conf' with the line
Code:

options snd slot=snd_virtuoso,snd_hda_intel
Then rename/delete the /etc/asound.conf and reboot and cross your fingers..

Drakeo 01-30-2014 10:18 PM

this is the kde environment I am sure you went into setting and set default Right . Then I am sure I hope you then applied it to your device list per per application in settings right. When you are sure you have that set up. So then I am not sure.

because if you don't save to those device list per application then you can have the problems with the .kde/share/config/kmixrc , I always get with multiple sound device kde likes to read alsa and change to what alsa default or config is. . just my 2 cents

tb75252 01-30-2014 10:51 PM

Quote:

Originally Posted by D1ver (Post 5108465)
I had a similar problem which I discussed in a little blog post here..

Try adding a file to /etc/modprobe.d/ called 'snd_virtuoso.conf' with the line
Code:

options snd slot=snd_virtuoso,snd_hda_intel
Then rename/delete the /etc/asound.conf and reboot and cross your fingers..

Unfortunately it does not work.

ReaperX7 01-30-2014 11:28 PM

At this point... you may have only one option...

OSSv4.

Now granted this driver isn't as difficult to use as ALSA, but it does require extra steps to get working, but it MAY solve your problems... but I won't guarantee it. It could just be a problem with the ALSA audio stack, the sound card, or who knows what.

You'll need all of these at least to get OSSv4 to install on Slackware with the latest kernel.

1. The SlackBuild

http://slackbuilds.org/repository/14.1/system/oss/

2. Kernels up to version 3.13 patch...

Code:

diff -ur oss-v4.2-build2008-src-gpl.orig/setup/Linux/oss/build/osscore.c oss-v4.2-build2008-src-gpl/setup/Linux/oss/build/osscore.c
--- oss-v4.2-build2008-src-gpl.orig/setup/Linux/oss/build/osscore.c        2013-11-06 22:22:05.760399613 +0400
+++ oss-v4.2-build2008-src-gpl/setup/Linux/oss/build/osscore.c        2013-11-06 22:34:41.908792755 +0400
@@ -436,11 +436,15 @@
 int
 oss_get_uid (void)
 {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
+  return __kuid_val(current->cred->uid);
+#else
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)
  return current->cred->uid;
 #else
  return current->uid;
 #endif
+#endif
 }
 
 typedef struct tmout_desc

If this doesn't work, I honestly don't know any more tricks to get your audio fully working. You'll have to block and blacklist ALSA, but OSSv4 works really well, and some people actually say it works better than ALSA.

Daedra 01-30-2014 11:50 PM

Quote:

Originally Posted by tb75252 (Post 5108476)
Unfortunately it does not work.

Try Adding options snd_virtuoso index=0 to the snd_virtuoso.conf file, might not work but give it a try.

ReaperX7 01-31-2014 06:04 AM

The strange thing I find is, I have the PCIe edition of that card the Xonar DX PCIe 7.1. When I've used it I've never had any issues getting audio to work correctly unless it was multi-source audio. PulseAudio cleared it up on LFS and Slackware both using the channel routing mixer provided by Pulse. It also worked well with OSS's mixer using the OSSv4 driver.

I know that Adobe Flash can require using HAL still, though it can be easily installed from the 13.37 repository, but usually that's for DRM which is completely unrelated though.

I do know that when I did use KDE, phonon didn't like to play well with setting up multi-source audio, so I used Xfce which uses GStreamer and it tended to work fine.

It very well could be Phonon causing the problems now that I think about it.


All times are GMT -5. The time now is 03:43 AM.