LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Videos don't have sound (https://www.linuxquestions.org/questions/slackware-14/videos-dont-have-sound-4175483290/)

asero12 11-03-2013 06:21 PM

Videos don't have sound
 
Hey everybody.

I installed Slackware and I've really liked it, but I have had some problems with sound, specially in videos.
Initially it was with mp3s, but I installed "gst-plugins-ugly" and now it's working fine. nevertheless, sound in videos (you tube and downloaded ones(mp4)) still doesn't work; It's really strange since mp3 work and system sound work too.

*I already instaled ALSA.

andrewthomas 11-03-2013 06:44 PM

So your video player's sound output is getting directed to the wrong place.

What player do you use?

asero12 11-03-2013 07:31 PM

Quote:

Originally Posted by andrewthomas (Post 5057864)
So your video player's sound output is getting directed to the wrong place.

What player do you use?



I use Mplayer and sometimes Kplayer, but nither
of the installed players work anyway.

kingbeowulf 11-03-2013 08:02 PM

If you have a Video Card with an HDMI output (most cards these days), make sure your video player is not sending sound to HDMI by default. This drove me nuts on my Nvidia GT430 so that I just blacklisted the Alsa nvidia HDMI modules. Also, KDE can be tricky in how you tell phonon to route sound from Alsa and which "hardware" device.

These CLI commands are your best friends for audio troubleshooting:

alsamixer
aplay
speaker-test

asero12 11-03-2013 09:10 PM

Quote:

Originally Posted by kingbeowulf (Post 5057885)
If you have a Video Card with an HDMI output (most cards these days), make sure your video player is not sending sound to HDMI by default. This drove me nuts on my Nvidia GT430 so that I just blacklisted the Alsa nvidia HDMI modules. Also, KDE can be tricky in how you tell phonon to route sound from Alsa and which "hardware" device.

These CLI commands are your best friends for audio troubleshooting:

alsamixer
aplay
speaker-test

No, it doesn't work even with HDMI

When i wrote speaker-test, I got this:

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_hw.c:1741: (_snd_pcm_hw_open) Unknown field slave
Playback open error: -22,Argumento inválido (Invalid Argument)


Last two lines seem to tell there's a problem.

Drakeo 11-03-2013 09:46 PM

I have the same thing and multiple cards and I had to point alsa to the card I wanted to use. hope this helps.

asero12 11-03-2013 10:10 PM

Quote:

Originally Posted by Drakeo (Post 5057921)
I have the same thing and multiple cards and I had to point alsa to the card I wanted to use. hope this helps.

Could you tell me please how you did that?

Drakeo 11-03-2013 11:12 PM

sure open a terminal and type alsamxer that will be your default card. that is what it placed it as. and if that is not the card you want as default then we go on to other things to do. in alsamixer press F6 to see all your devices. http://alsa.opensrc.org/Alsamixer

or you can also as root use this cat /proc/asound/cards
Quote:

# cat /proc/asound/cards
0 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0xf9ff4000 irq 16
1 [HD2200 ]: USB-Audio - HP Webcam HD-2200
HP Webcam HD-2200 HP Webcam HD-2200 at usb-0000:00:13.2-2, high speed
2 [CMI8738 ]: CMI8738 - C-Media CMI8738
C-Media CMI8738 (model 37) at 0xe800, irq 21
3 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfbd7c000 irq 19
This one is mine but when I installed the C-Media card bios always set it to 0 position.
so I finally just edited my /etc/modprobe.d/sound.conf


Quote:

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.25 ---
alias char-major-116 snd
alias char-major-14 soundcore
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
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd slots=snd-hda-intel,snd_cmipci,snd-usb-audio
# --- END: Generated by ALSACONF, do not edit. ---

I heard other ways to do it with alsa but the fact is this works for me and
that's what matters. This tells alsa what slot to use for the first second third device after that all the other sound devices load
after them. Note the do not edit yes well ok I do edit it. Learned it from Alsa manual.

asero12 11-04-2013 09:27 AM

Quote:

Originally Posted by Drakeo (Post 5057934)
sure open a terminal and type alsamxer that will be your default card. that is what it placed it as. and if that is not the card you want as default then we go on to other things to do. in alsamixer press F6 to see all your devices. http://alsa.opensrc.org/Alsamixer

or you can also as root use this cat /proc/asound/cards


This one is mine but when I installed the C-Media card bios always set it to 0 position.
so I finally just edited my /etc/modprobe.d/sound.conf



I heard other ways to do it with alsa but the fact is this works for me and
that's what matters. This tells alsa what slot to use for the first second third device after that all the other sound devices load
after them. Note the do not edit yes well ok I do edit it. Learned it from Alsa manual.

I tried all that you said but sound's still not working, when I "cat /proc/asound/cards" get this:

Quote:

0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7e10000 irq 41

I'm begging to think it has something to do with the drivers, 'cause Amarok reproduces MP3 correctly, but xmms tells me to check if my soundcard is configured or if the output plugin is the right one or if a program is locking the soundcard.
And Audacious gives this error
Quote:

ALSA error:snd_pcm_open failed: Invalid Argument
Also once KDE showed a message that told me that some audio devices weren't found, and if I wanted the system to "forget" about them,
but in Kinfo center they all appear anyway:

Quote:

THESE ARE ALL THE ALSA INTERFACES THAT KINFO CENTER DETECTS:
-ALSA TIMER DEVICE
-HDA INTEL PCH(92HD91BXX Analog)
-HDA INTEL PCH (HDA Intel ALSA Hardware specific device).
-HDA INTEL PCH.
-HDA INTEL PCH (HDA Intel ALSA Hardware specific device)
-HDA INTEL PCH(92HD91BXX Analog)
-HDA INTEL PCH(HDMI 0)

kikinovak 11-04-2013 02:44 PM

Sometimes I have a similar problem with SMPlayer, a different frontend for MPlayer. I usually resolve it by deleting ~/.config/smplayer.

andrewthomas 11-04-2013 05:54 PM

Quote:

Originally Posted by asero12 (Post 5058168)
I tried all that you said but sound's still not working, when I "cat /proc/asound/cards" get this:

What is your lspci output for your integrated audio
Code:

asus-gentoo ~ # lspci -vv|grep Audio
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] RV670/680 HDMI Audio [Radeon HD 3690/3800 Series]


asero12 11-04-2013 08:35 PM

Quote:

Originally Posted by andrewthomas (Post 5058357)
What is your lspci output for your integrated audio
Code:

asus-gentoo ~ # lspci -vv|grep Audio
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] RV670/680 HDMI Audio [Radeon HD 3690/3800 Series]



lspci shows:


Quote:

ash-4.2# lspci -vv|grep Audio
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)



andrewthomas 11-04-2013 08:44 PM

Code:

nano /etc/modprobe.d/alsa-base.conf
And add the following line:

Code:

options snd-hda-intel model=generic
or maybe :
Code:

options snd-hda-intel index=0

asero12 11-04-2013 11:54 PM

Quote:

Originally Posted by andrewthomas (Post 5058455)
Code:

nano /etc/modprobe.d/alsa-base.conf
And add the following line:

Code:

options snd-hda-intel model=generic
or maybe :
Code:

options snd-hda-intel index=0

No man, none of them worked, I even rebooted my pc, when I turned it on, a message said that it had stoped detecting some audio devices.
this problem is kinda' weird

asero12 11-05-2013 12:24 AM

I was seeing the audio configuration in Amarok, and i saw that phonon is in charge of managing audio devices, it detects a lot, but the only one that works is HDA Intel PCH (92HD91BXX Analog) there are also the HDMI ones but they don't sound, I imagine they do when a wire pluged. The rest have error messages, except hw:0,3 it doesn't show any error messages, but simply doesn't sound, yesterday it did, I don't know what hapenned. the fact is that when the mouse pinter stands still over the HDA Intel PCH (92HD91BXX Analog) it says that it has two devices "in it"

Quote:

ALSA:x-phonon:CARD=0,DEV=0
ALSA: plughw:CARD=0,DEV=0

I don't know if this can help somehow.

Germany_chris 11-05-2013 05:15 AM

did you unmute your speakers and PCM?

amixer sset Master unmute

kingbeowulf 11-05-2013 09:00 PM

Lets start at the beginning.
  1. Make sure you have speakers plugged into the correct audio jack.
  2. Check 'lsmod' to make sure all of your sound modules are loading.
  3. Check 'lspci -k' to see what kernel module is loading.
  4. Is this motherboard chip? Check BIOS!
  5. Are you using the stock kernel or did you "roll your own?"
  6. Are you using a kernel/alsa package that supports you chipset?
  7. Did you make '/etc/rc.d/rc.alsa' executable?
  8. Restore everything to default settings, reboot to CLI, and run alsamixer. Make sure NONE of your audio outputs are muted. Crank up the volume of any that are low.
  9. If you installed pulseaudio, I swear I'll beat you with a stick! ;)
At the very least, alsa should have automagically set up /etc/sound.conf with:
Code:

alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel

You need to make sure you don't have audio modules loaded for which their is no hardware installed. AND you need to make sure snd-hda-intel is the correct module.

While still in the CLI (no KDE etc.), run this (example from my Slack14.0 with CL Audigy):
Code:

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=Audigy
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    Default Audio Device
sysdefault:CARD=Audigy
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    Default Audio Device
front:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    Front speakers
rear:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    Rear speakers
center_lfe:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    Center and Subwoofer speakers
surround40:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
iec958:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    IEC958 (S/PDIF) Digital Audio Output

(Note that I have blacklisted HDMI and USB webcam so those won't show.). Hopefully you see a similar list, if errors, then you may have the wrong or bad module installed (or rc.alsa did not run on boot). Now for all regular outputs try each with, for example,
Code:

$ speaker-test -Dplug:default -c4 -twav
This outputs to "default" 4 channel (front and rear speakers). This will tell you too if you are plugged into front vs rear speaker jacks. I can't tell you how many times THAT caught me off guard! See (hear) which channel works, if any. If you get NO sound an any channel, any errors, you've got something borked in hardware or software. You can try reinstalling the alsa packages, find out what module you need to load, etc.

Good luck!

Drakeo 11-05-2013 11:48 PM

King that is a wonderful answer truth is that should play right out of the box on a full install. un-mute the auto-mute and in kde go to settings and keep testing till you get them speakers in the right plugins.

asero12 11-06-2013 08:12 PM

Quote:

Originally Posted by kingbeowulf (Post 5059028)
Lets start at the beginning.
  1. Make sure you have speakers plugged into the correct audio jack.
  2. Check 'lsmod' to make sure all of your sound modules are loading.
  3. Check 'lspci -k' to see what kernel module is loading.
  4. Is this motherboard chip? Check BIOS!
  5. Are you using the stock kernel or did you "roll your own?"
  6. Are you using a kernel/alsa package that supports you chipset?
  7. Did you make '/etc/rc.d/rc.alsa' executable?
  8. Restore everything to default settings, reboot to CLI, and run alsamixer. Make sure NONE of your audio outputs are muted. Crank up the volume of any that are low.
  9. If you installed pulseaudio, I swear I'll beat you with a stick! ;)
At the very least, alsa should have automagically set up /etc/sound.conf with:
Code:

alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel

You need to make sure you don't have audio modules loaded for which their is no hardware installed. AND you need to make sure snd-hda-intel is the correct module.

While still in the CLI (no KDE etc.), run this (example from my Slack14.0 with CL Audigy):
Code:

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=Audigy
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    Default Audio Device
sysdefault:CARD=Audigy
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    Default Audio Device
front:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    Front speakers
rear:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    Rear speakers
center_lfe:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    Center and Subwoofer speakers
surround40:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
iec958:CARD=Audigy,DEV=0
    SB Audigy 1 [SB0090], ADC Capture/Standard PCM Playback
    IEC958 (S/PDIF) Digital Audio Output

(Note that I have blacklisted HDMI and USB webcam so those won't show.). Hopefully you see a similar list, if errors, then you may have the wrong or bad module installed (or rc.alsa did not run on boot). Now for all regular outputs try each with, for example,
Code:

$ speaker-test -Dplug:default -c4 -twav
This outputs to "default" 4 channel (front and rear speakers). This will tell you too if you are plugged into front vs rear speaker jacks. I can't tell you how many times THAT caught me off guard! See (hear) which channel works, if any. If you get NO sound an any channel, any errors, you've got something borked in hardware or software. You can try reinstalling the alsa packages, find out what module you need to load, etc.

Good luck!

Thanks for the answer, but I tried and checked eveything you said and the audio just ain't working, it isn't a hardware problem, I just booted OpenSuse from a live CD and videos sounded pretty well. I'll keep investigating.

asero12 11-06-2013 09:14 PM

I just came with this hypothesis:

First look at this image: http://imageshack.us/a/img692/2626/wy5t.png

That image was taken from Phonon, as you know it's the Mutimedia framework of KDE, so only native application (QT) are managed by it (I don't know if this is 100% true, maybe I'm saying a nonsense). The fact is that Amarok "follows" what phonon says when setting sound devices, and if one doesn't work, it tries with the next one, and as you can see, DEFAULT shows error when tested... but since it's at the bottom of the list, it has shown no problems, that's why Amarok is ale to play. BUT NEITHER OF THE VIDEO PLAYERS I HAVE ARE QT NATIVE, THEY ALL ARE GTK, SO PHONON DOESN'T MANAGE THEM, BUT ALSA DOES, AND ALSO THE CONFIGURATON SETTING OF EACH PROGRAM, AND ALL THIS TIME I'VE TRYING TO SET THE "DEFAULT" DEVICE AS THE DEFAULT DEVICE (sorry for the repetition), THE SAME ONE THAT PHONON PROOVES DOESN'T WORK, SO I'LL TRY THESE SOLUTIONS:

-Download a native KDE video player that supports PHONON and see if sound works.
-Replace in alsa the "default" card for one of the " HDE Intel PCH" ones.

For the last one I need some help, since I don't know how to do it, could somone explain me please?

kingbeowulf 11-07-2013 02:32 AM

asero12,
If you go to the top of the audio list "reproduccion de audio" and make sure the working sound devices/channels are at the top of the list, then ALL KDE apps will use those sound outputs. Kplayer "should" pick it up if "output driver" set to "Auto". Otherwise, set to alsa, and pick a matching output device that works. Or, on mplayer, go to its configuration and from the "audio' tab and do the same thing.

Again, if "speaker-test" did not give sound on some or all channels, clear out all custom settings, reinstall the ALSA package, chmod +x /etc/rc.d/rc.alsa and reboot to try again. Speaker-test MUST work on valid analog output channels found with 'aplay -L" This shouldn't be difficult. I haven't had issues with Alsa on intel chipsets and Creative Labs cards in many years.

On you Slackware DVD/USB nstall media (example for Slackware64 14.0) reinstall, as root,
slackware64/ap/alsa-utils-1.0.26-x86_64-1.txz
slackware64/l/alsa-lib-1.0.26-x86_64-1.txz
slackware64/l/alsa-oss-1.0.25-x86_64-1.txz

with "upgradepkg --reinstall <package-name>"

asero12 11-07-2013 04:45 PM

Problem got fixed fellas.

I tried with speaker-test -Dplug:default -c4 -twav as kingbeowulf said,
but it didn't sound... so looked up for the name's of the other devices (default, front, hdmi, etc)
and tried with front. it sounded, so I opened /etc/asound.conf with nano and replaced all the defaults for fronts like this:


Quote:

pcm.!front {
type hw
card 0
}
ctl.!front {
type hw
card 0
}
pcm.!front {
type plug
slave.pcm “softvol”
}
pcm.front {
type softvol
slave {
pcm “dmix”
}
control {
name “Pre-Amp”
card 0
}
min_dB -5.0
max_dB 20.0
resolution 6
and videos are sounding now.


Thank you very much for the ones who helped me with this problem. ;)

Germany_chris 11-08-2013 07:23 AM

Someone read the arch wiki on ALSA


All times are GMT -5. The time now is 04:01 AM.