No audio for some players

Hi,

I am using openSUSE 11.0. After getting some upgrades from packman repo, amarok, banshee, alsaplayer have stopped playing mp3. Rebooting has not helped. But mplayer, smplayer, audacious2 play them. For example amarok gives the error:

failed to connedt stream, invalid argument
Could someone help or give me some link for any such similar problem?

Thanks.

Some additional info:

speaker-test -Dplug:front -c2 -l5 -twav

works, but:

speaker-test -c2 -l5 -twav

does not and gives the error (even as root):

speaker-test 1.0.16

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 128 to 1048576
Period size range from 64 to 262144
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
*** PULSEAUDIO: Unable to create stream.
Unable to set hw params for playback: Input/output error
Setting of hwparams failed: Input/output error

What sound engine do you have selected in amarok? xine? gstreamer/yauap? Did you try the other? And dependent on which one you have selected/installed, exactly what rpms do you have installed associated with these?

Hi,

The repos enabled are:

| Alias | Name | Enabled | Refresh

–±--------------------------------------------±----------------------±--------±-------
1 | Index of /pub/packman/suse/11.0 | Packman Repository | Yes | No
2 | openSUSE-11.0-Updates | openSUSE-11.0-Updates | Yes | No
3 | repo-non-oss | openSUSE-11.0-Non-Oss | Yes | No
4 | repo_dvd | openSUSE_11.0_dvd | No | No
5 | repo_office | openSUSE_11.0_ooffice | No | No
6 | repo-oss | openSUSE-11.0-Oss | Yes | No
7 | repo-debug | openSUSE-11.0-Debug | No | No
8 | repo_local | openSUSE_11.0_local | Yes | Yes
The last one is just a dir in my local hdd. If the rpms are too big, i download them from elsewhere and put them here and update/install using them

I am not sure of the engines, but as per the guides in: Check your multimedia problem in ten steps - openSUSE Forums and Multi-media and Restricted Format Installation Guide - openSUSE Forums i have

amarok-packman (if kde or you want this media player) + amarok-xine
libavcodec52
libdvdnav4
libdvdplay0
libdvdread4
libffmpeg0
libquicktime0
libxine1
libxine1-codecs
libxvidcore4
smplayer
vlc
w32codec-all
xine-ui
xvidcore
installed and on running

rpm --verify --query --all '*gst*'

i get

S.5…T /usr/lib/gstreamer-0.10/libgstpulse.so
Also on running

rpm --query --all 'libav*' 'libpostproc*' 'libswscale*' '*xine*' '*gst*' MPlayer '*vlc*' | grep -v avahi | sort

i get

libavutil49-0.5-1.pm.8.8
libavutil50-0.5.20358svn-1.pm.4.1
and
libvlccore0-0.9.9a-0.pm.1
libvlccore2-1.0.3-0.pm.5.1
amongst others. I also never had audio for vlc.

ok. PLEASE look to see what engine. I asked because it is IMPORTANT. Every multimedia app should have a settings or preferences area where it is controlled. If you can not find it, then advise what multimedia application/player you are using , and if it is one that I also use I can advise you where to look.

Please provide the ENTIRE output.

Hi,

For amarok the engine is GStreamer/Yauap. Right now amarok is mplaying mp3, but alsaplayer is not (it was running a little while ago). Moreover now mplayer, smplayer have also stopped giving audio while vlc is now working !! The entire output of

rpm --query --all 'libav*' 'libpostproc*' 'libswscale*' '*xine*' '*gst*' MPlayer '*vlc*' | grep -v avahi | sort

is

amarok-xine-1.4.10-103.pm.107.41
banshee-1-backend-engine-gstreamer-1.4.1-2.1
gstreamer-0_10-0.10.25-999.pm.999.1
gstreamer-0_10-devel-0.10.25-999.pm.999.1
gstreamer-0_10-ffmpeg-0.10.9-999.pm.999.1
gstreamer-0_10-fluendo-mp3-0.10.10-42.pm.42.2
gstreamer-0_10-fluendo-mpegdemux-0.10.23-42.pm.42.2
gstreamer-0_10-fluendo-mpegmux-0.10.4-42.pm.42.2
gstreamer-0_10-lang-0.10.25-999.pm.999.1
gstreamer-0_10-plugins-bad-0.10.16-999.pm.1000.6
gstreamer-0_10-plugins-bad-lang-0.10.16-999.pm.1000.6
gstreamer-0_10-plugins-base-0.10.25-999.pm.999.1
gstreamer-0_10-plugins-base-devel-0.10.25-999.pm.999.1
gstreamer-0_10-plugins-base-lang-0.10.25-999.pm.999.1
gstreamer-0_10-plugins-farsight-0.12.11-0.pm.2.5
gstreamer-0_10-plugins-good-0.10.16-42.pm.42.1
gstreamer-0_10-plugins-good-extra-0.10.16-42.pm.42.1
gstreamer-0_10-plugins-good-lang-0.10.16-42.pm.42.1
gstreamer-0_10-plugins-ugly-0.10.13-999.pm.1000.2
gstreamer-0_10-plugins-ugly-lang-0.10.13-999.pm.1000.2
gstreamer-0_10-pulse-0.9.7-42.pm.1
gstreamer-0_10-utils-0.10.25-999.pm.999.1
kdemultimedia3-video-xine-3.5.9-44.pm.1
libavc1394-0-0.5.3-104.1
libavc1394-devel-0.5.3-104.1
libavcodec52-0.5.20358svn-1.pm.4.1
libavdevice52-0.5.20358svn-1.pm.4.1
libavformat52-0.5.20358svn-1.pm.4.1
libavogadro0-0.8.1-7.pm.2
libavutil49-0.5-1.pm.8.8
libavutil50-0.5.20358svn-1.pm.4.1
libgstapp-0_10-0-0.10.6-36.2
libgstbasevideo-0_10-0-0.10.16-999.pm.1000.6
libgstinterfaces-0_10-0-0.10.25-999.pm.999.1
libgstphotography-0_10-0-0.10.16-999.pm.1000.6
libgstreamer-0_10-0-0.10.25-999.pm.999.1
libgstsignalprocessor-0_10-0-0.10.16-999.pm.1000.6
libpostproc51-0.5.20358svn-1.pm.4.1
libswscale0-0.5.20358svn-1.pm.4.1
libvlc2-1.0.3-0.pm.5.1
libvlccore0-0.9.9a-0.pm.1
libvlccore2-1.0.3-0.pm.5.1
libxine1-1.1.16.3-2.pm.6.12
libxine1-aa-1.1.16.3-2.pm.6.12
libxine1-codecs-1.1.16.3-2.pm.6.12
libxine1-gnome-vfs-1.1.16.3-2.pm.6.12
libxine1-pulse-1.1.16.3-2.pm.6.12
libxine-devel-1.1.16.3-2.pm.6.12
MPlayer-1.0rc2_r29796-2.pm.2.1
vlc-1.0.3-0.pm.5.1
vlc-gnome-1.0.3-0.pm.5.1
vlc-mozillaplugin-1.0.3-0.pm.5.1
vlc-noX-1.0.3-0.pm.5.1
vlc-qt-1.0.3-0.pm.5.1
xine-lib-1.1.12-8.7
xinetd-2.3.14-115.1
xine-ui-0.99.5cvs-20090912.pm.20090912.22
Also,

speaker-test -c2 -l5 -twav

gives

speaker-test 1.0.16

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
*** PULSEAUDIO: Unable to connect: Connection refused
Playback open error: -111,Connection refused
*** PULSEAUDIO: Unable to connect: Connection refused
Playback open error: -111,Connection refused
*** PULSEAUDIO: Unable to connect: Connection refused
Playback open error: -111,Connection refused

I rebooted the system and am now back to same stage as post #1.

I’m not at a Linux PC right now, so I can not look at the detail of your output.

But its reading to me that for you, sometimes the audio works, and sometimes the audio does not work.

IMHO that is more likely due to one application seizing the audio device, and not letting go of the device, so that other applications can not access the audio device.

If you look at the openSUSE audio troubleshooting guide here: SDB:AudioTroubleshooting - determining which application is using the sound device - openSUSE you will note you can determine what application is using your audio sound device at any one time by typing:

 lsof /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*

In order to use this command to good purpose, you need to characterize/understand what its output is giving you. Hence save the output in a text file, with an appropriate label/description noting what application you were using to play audio at the time. Do this many times, and then compare the content of the different files.

To get a look at the sort of investigation one can do, please examine this thread: sound stop working after updating on asus k50in - openSUSE Forums

Now its not as complex as that thread might make you think.

Some basics you need to know wrt Linux sound. Typically Linux sound daemons/servers ONLY allow one application at a time to access the sound device/hardware. If that application is badly behaved, and does not let go of the device (when the application is closed) then no other applications can access the device. It may be worth your reading up on some sound concepts: Sound-concepts - openSUSE

Note that the alsa application is both an audio driver, and also provides an API (the alsa API). Not all desktops nor multimedia applications will use the alsa API. They ALL use the alsa sound driver. One advantage of the alsa API is it will allow sharing of audio between applications. ie if multimedia application-a is using the alsa API and multimedia application-b is using the alsa API, then they both will be able to access the audio device at the same time and hence they both will be able to play sound at the same time. Pulse audio was supposed to provide the same capability, but pulse audio has bugs (especially the earlier versions of pulse, such as are in openSUSE-11.0).

On my PCs, I have changed the output sound engines in all applications to use the “xine” sound engine and where selectable to use the alsa API (sometimes just labelled “alsa” or “advanced linux sound architecture” as opposed to OSS, or aRts, or esound). I have also used the application xine-ui to ensure my xine is using the alsa API.

Hence when I play amarok, I get audio. I can also launch smplayer, and get audio playing out of smplayer at the same time as amarok.

I am forming a view point (albeit I have not been able to check the details of the application versions you provided because I am not at a linux PC) that your difficulty is more likely due to the sound engines and/or sound server/daemon’s you have chosen.

Linux is all about choice, but unfortunately that plethora of choices can be confusing and can lead to misconfigurations.

Pulse audio was supposed to provide the same capability, but pulse audio has bugs (especially the earlier versions of pulse, such as are in openSUSE-11.0
After you said this i searched for newer versions of pulseaudio and upgraded then from /download.opensuse.org/repositories/multimedia:/libs/openSUSE_11.0/ I also downloaded the latest alsa as per instructions given in en.opensuse.org/Alsa-updateand now my sound is working. But vlc is still giving audio in fits and starts as is smplayer to a lesser extent.

rpm -qa *pulse*

gives

libpulse-browse0-0.9.14-5.6
pulseaudio-esound-compat-0.9.14-5.6
libpulsecore9-0.9.14-5.6
pulseaudio-0.9.14-5.6
pulseaudio-module-x11-0.9.14-5.6
alsa-plugins-pulse-1.0.21-19.4
libmpg123-0-pulse-1.9.1-0.pm.3.1
pulseaudio-module-gconf-0.9.14-5.6
pulseaudio-lang-0.9.14-5.6
pulseaudio-module-lirc-0.9.14-5.6
libxine1-pulse-1.1.16.3-2.pm.6.12
pulseaudio-module-bluetooth-0.9.14-5.6
pulseaudio-module-zeroconf-0.9.14-5.6
gstreamer-0_10-pulse-0.9.7-42.pm.1
xmms-pulse-0.9.4-0.pm.1
pulseaudio-utils-0.9.14-5.6
libpulse0-0.9.14-5.6

libpulse-mainloop-glib0-0.9.14-5.6

rpm -qa *alsa*

gives

alsa-oss-1.0.15-48.1
alsa-tools-gui-1.0.21-6.3
alsa-firmware-1.0.16-24.1
alsa-plugins-pulse-1.0.21-19.4
alsa-devel-1.0.21-49.1
alsa-1.0.21-49.1
alsa-plugins-1.0.21-19.4
alsa-utils-1.0.16-35.1
alsa-driver-kmp-pae-1.0.21.20091106_2.6.25.20_0.5-1.1
alsaplayer-0.99.80-1.pm.13.9
alsa-docs-1.0.21-49.1
Is it advisable to get the latest stable rpms from this multimedia repo?

What video (video/audio codec and bit rates) do you experience this ON ? All video ? or just selected video files? What graphic driver do you have installed on your PC ? What hardware spec (cpu, ram) does your PC have? In your video player what audio output model do you have selected ? Is beagle indexing your hard drive at the same time?

No it is NOT advisable. I recommend you immediately remove that multimedia repository from your Software Package manager.

Well, only smplayer and vlc have this problem. For vlc (audio: alsa, video: xvideo) the video moves ahead while the audio comes in fits and starts. For smplayer (audio: tried alsa and pulseaudio, video: xv) both audio and video start after a couple of secs. Hardware is not bad, P4 2.66GHz + 2Gb ram, internal graphics card, probably 32Mb (?). I don’t see beagle active on typing ‘top’ on a terminal.

No it is NOT advisable. I recommend you immediately remove that multimedia repository from your Software Package manager.
I had removed it after the upgrades. Do you recommend downgrading the stuff?

Is this for all videos? A good application for checking video codecs is mediainfo: PackMan :: Informationen zum Paket MediaInfo

A thread on that is here:
Determing contents of media containers like avi, mpeg? - openSUSE Forums

Once you have that installed, you can check to see what codecs cause this multimedia playback problem/effect.

Well, if it works now, IMHO don’t fix it ! :slight_smile:

Note if you installed alsa-driver-kmp-<your kernel> when there is a kernel update, there is a chance your audio may stop working, in which case at that time you may need to update again.