LinuxQuestions.org

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

tb75252 01-27-2014 03: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 04: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 06: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 07: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 08:05 PM

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

enorbet 01-27-2014 09: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 09: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 10: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 10: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-28-2014 12:28 AM

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-28-2014 12:31 AM

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

snale 01-28-2014 01: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 03:03 AM

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

enorbet 01-28-2014 03: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 09: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.


All times are GMT -5. The time now is 02:10 AM.