HomeCinemaBanter

HomeCinemaBanter (http://www.homecinemabanter.com/index.php)
-   UK digital tv (http://www.homecinemabanter.com/forumdisplay.php?f=5)
-   -   General sound problems (http://www.homecinemabanter.com/showthread.php?t=71781)

Alan Secker May 7th 12 12:32 PM

General sound problems
 
Sound problems on two different machines with two different distros
highlighted how little I know about the way sound signals move through the
Linux software maze.

All the sound requirements worked fine on both machines until a week or two
ago and then bits stopped.

On my desktop:

TV Card - OK
BBC IPlayer - OK
YouTube - No
Skype - No for both sound output and microphone input)
Clementine (Music Player) - No

On my wife's laptop only mplayer seems to produce sound.

What I need is a link to a site that runs through the tests needed to pin
down and correct the problems. Has anyone any erxperence that could help?

I am running PcLinuxOS (64-bit test rig)
Th laptop has Vetor Linux 7




Davey May 7th 12 12:41 PM

General sound problems
 
On Mon, 07 May 2012 11:32:01 +0100
Alan Secker wrote:

Sound problems on two different machines with two different distros
highlighted how little I know about the way sound signals move
through the Linux software maze.

All the sound requirements worked fine on both machines until a week
or two ago and then bits stopped.

On my desktop:

TV Card - OK
BBC IPlayer - OK
YouTube - No
Skype - No for both sound output and microphone input)
Clementine (Music Player) - No

On my wife's laptop only mplayer seems to produce sound.

What I need is a link to a site that runs through the tests needed to
pin down and correct the problems. Has anyone any erxperence that
could help?

I am running PcLinuxOS (64-bit test rig)
Th laptop has Vetor Linux 7




I had a similar problem, but with the colour of You-tube images. It
turned out to be the last Add-on I had added on. Removal of that fixed
it.
--
Davey.


J G Miller[_4_] May 7th 12 05:54 PM

General sound problems
 
On Monday, 07 May 2012 11:32:01 +0100, Alan Secker wrote:

Sound problems on two different machines with two different distros
highlighted how little I know about the way sound signals move through the
Linux software maze.


Quick overview and then on to the diagnostics.

The layers (upside down tree) from hardware to software are as follows

hardware device

kernel module for that hardware (ALSA by default)
related kernel modules for sound (other ALSA modules)

device interface files for ALSA under /dev/snd
summary in /dev/sndstat (only present if OSS emulation module loaded for ALSA)

ALSA library for ALSA utilities
(eg alsamixer, aplay) and software applications

pulseaudio server (running on top of ALSA)
pulseaudio library for pulse audio utilities
(eg pavucontrol, paplay etc) and software applications


The most likely cause of *loss* of sound is simply that the mixer levels
for output have been turned down. This happens a lot with pulseaudio
which frequently mutes the sound level at the ALSA level for some reason
(a bug in pulseaudio).

So the simple way to restore sound is fire up

alsamixer

in a nice big Terminal Emulator filling the whole screen

By default it should be on the PulseAudio server (sound device #0)
with just two controls for output and capture

Use F6 to change to sound device #1, the second item in the menu
which should appear and will hopefully be the ALSA interface for
your hardware sound device

You will then see all the ALSA mixer controls.

On the master, check that it is unmuted (use the M key to turn muting
on/off) and use the up arrow key to set the sound level about 84%
(go into the red and then lower it until the red disappears)

Then check along the other controls and do similarly for FRONT left and RIGHT
and possibly PCM. You may also want to also do the same for CD input
if present. Fine tune anything else which is relevant.

The do the F6 again and go back to Pulse Audio (device #0). Adjust the
master to about 84% also and ensure that the output is not muted.

NB If you go back to card 1 now you may very well notice that some
of the levels have changed. This is normal -- altering the pulse audio
level messes around with the ALSA mixers. Just check that nothing has
gone back to zero and nothing has muted.

As root, you should now do alsactl store to save your mixer settings
in /var/lib/alsa/asound.state which should be read and used when your
machine is rebooted and the alsa tool init.d script or equivalent is read.

As a user you can then always do

alsactl restore

to load the stored settings if sound has been muted again.

Other diagnostics from the top

1) do dmesg and look for the hardware device in the long listing --
this shews the kernel recognising the hardware

2) do lsmod | egrep snd to list the sound modules loaded
one of the snd_ modules should have a name related to your hardware
eg snd_hda_intel

3) cat /dev/sndstat to check the sound card properties

And finally if you have set everything up with ALSA mixer, you can do,
assuming you have GNOME desktop installed,

gnome-control-center sound

to use the Gnome Control center interface to adjust the pulse audio
level and play a test sound.

A more extensive interface to PulseAudio can be accessed with pavucontrol

Should this question not have been posted to alt.linux.os rather than a
digital TV technical news group?

Jim Lesurf[_2_] May 8th 12 10:00 AM

General sound problems
 
In article , J G Miller
wrote:
On Monday, 07 May 2012 11:32:01 +0100, Alan Secker wrote:



The most likely cause of *loss* of sound is simply that the mixer levels
for output have been turned down. This happens a lot with pulseaudio
which frequently mutes the sound level at the ALSA level for some reason
(a bug in pulseaudio).


In my experience pulse also has a habit of deciding (and changing!) where
*it* thinks the output should go, even when you use various methods to tell
it otherwise.

e.g. On my current shuttle box, it keeps sending output to the headphone
socket and ignores my external dac, regardless of my using various methods
to tell it (and gstreamer) what I want.

So if, like me, you struggle to get pulse to do as you want, I'd recommend
simply focussing on setting up alsa defaults. However, first try out what
JGM has explained.

If that works - and doesn't suddenly cease working again on a later date -
fine. If not, raise this again and I'll explain a simpler and more 'direct
to alsa' method that may cut through the problems. Although once you have
pulse on a system, expect it to get in the way if you want to do something
different to what *it* thinks is OK.

Slainte,

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html


J G Miller[_4_] May 8th 12 11:14 AM

General sound problems
 
On Tuesday, May 8th, 2012, at 09:00:26h +0100, Jim Lesurf complained:

e.g. On my current shuttle box, it keeps sending output to the headphone
socket and ignores my external dac, regardless of my using various methods
to tell it (and gstreamer) what I want.


If your configuration is correct and PulseAudio really is not routing
sound the way the configuration states, you really, really should file
a bug report.

Did you ever use set-default-sink in the last section of /etc/pulse/default.pa

Pulseaudio does have some significant bugs which do need to be fixed, and
in order to get them fixed, they do need to be brought to the attention
of the developers.

J G Miller[_4_] May 8th 12 11:14 AM

General sound problems
 
On Tuesday, May 8th, 2012, at 09:00:26h +0100, Jim Lesurf complained:

e.g. On my current shuttle box, it keeps sending output to the headphone
socket and ignores my external dac, regardless of my using various methods
to tell it (and gstreamer) what I want.


If your configuration is correct and PulseAudio really is not routing
sound the way the configuration states, you really, really should file
a bug report.

Did you ever use set-default-sink in the last section of /etc/pulse/default.pa

Pulseaudio does have some significant bugs which do need to be fixed, and
in order to get them fixed, they do need to be brought to the attention
of the developers.

J G Miller[_4_] May 8th 12 11:44 AM

General sound problems
 
On Tuesday, May 8th, 2012, at 09:14:20h +0000, J G Miller wrote:

Did you ever use set-default-sink in the last section of /etc/pulse/default.pa


And the way to configure pulse audio to set up a sync with ALSA for a particular device
in /etc/pulse/default.pa is to change

load-module module-alsa-sink

to

load-module module-alsa-sink device=hw:{card_number},{device_number}

Further discussion at

http://superuser.com/questions/293131/changing-default-audio-device-in-pulseaudio

Alan Secker May 8th 12 02:24 PM

General sound problems
 
J G Miller wrote:

On Tuesday, May 8th, 2012, at 09:14:20h +0000, J G Miller wrote:

Did you ever use set-default-sink in the last section of
/etc/pulse/default.pa


And the way to configure pulse audio to set up a sync with ALSA for a
particular device in /etc/pulse/default.pa is to change

load-module module-alsa-sink

to

load-module module-alsa-sink
device=hw:{card_number},{device_number}

Further discussion at

http://superuser.com/questions/29313...dio-device-in-

pulseaudio

I have 'solved' the problem on my wife's HP Laptop. I had alsamixer open
while running Skype. Everytime a test call was started, the mike button on
the alsamixer went from black to red and the volume sliders slid down.

I tried every mic source option one by one and suddenly one of them worked.
It turned out that Skype was bypassing the mixer as the slider position made
no difference to the volume.

I tried that same approach on my desktop where the only problem is mic
input. Nothing worked. Infortunately the distro only has kmix available so I
will have to try and compile alsamixer from source before I try again and
take advantage of your collective advice.

Thanks very much.

Regards, Alan

J G Miller[_4_] May 8th 12 09:19 PM

General sound problems
 
On Tuesday, May 8th, 2012, at 13:24:38h +0100, Alan Secker explained:

I have 'solved' the problem on my wife's HP Laptop. I had alsamixer open
while running Skype. Everytime a test call was started, the mike button on
the alsamixer went from black to red and the volume sliders slid down.


If you look in the Skype settings dialog under Sound, I think there is
a check box for "let Skype control mixer settings". Unchecking that
should prevent Skype from taking control and messing things up if it
is not leaving the settings at their correct levels after use.

I tried every mic source option one by one and suddenly one of them worked.


Mic source within alsamixer? I would have thought there was only one
slider to control that.

It turned out that Skype was bypassing the mixer as the slider position made
no difference to the volume.


See that magic check box in the Skype settings dialo.

Infortunately the distro only has kmix available so I
will have to try and compile alsamixer from source before I try again


That is very odd if alsamixer is not provided. Have you looked
for something like alsa-tools package?

Also within kmix, is it not possible to select ALSA (device hardware)
as the sound device to adjust?

kmix - Settings - Audio Setup

popups up Phonon KDE Control Module dialog

Click "Audio Hardware Setup" tab

Under Hardware there is clickable menu which you should then be
able to change from the default Pulse internal audio to the
actual "sound card hardware" device for ALSA.

When you close this dialog with Apply, back in the Kmixer
window you will then see the slider for the ALSA hardware device,
which you can then adjust the playback level to about 84%.

Check the other tab "Capture" as well and adjust the sliders there
to around 84% as well if necessary.

Do *not forget* to then go through the above procedure kmix - Settings
to reset the default audio back to the Pulse Audio internal.

This way you can at least avoid having to compile alsamixer from
source if your distribution fails to provide it in one of the packages.

Sadly the KDE Phonon system which is the KDE4 interface to Pulse Audio,
is even more of a black box / hidden magic system than Pulse audio its-self.

Alan Secker May 9th 12 12:00 AM

General sound problems
 
J G Miller wrote:

On Tuesday, May 8th, 2012, at 13:24:38h +0100, Alan Secker explained:

I have 'solved' the problem on my wife's HP Laptop. I had alsamixer open
while running Skype. Everytime a test call was started, the mike button
on the alsamixer went from black to red and the volume sliders slid down.


If you look in the Skype settings dialog under Sound, I think there is
a check box for "let Skype control mixer settings". Unchecking that
should prevent Skype from taking control and messing things up if it
is not leaving the settings at their correct levels after use.

I tried every mic source option one by one and suddenly one of them
worked.


Mic source within alsamixer? I would have thought there was only one
slider to control that.

It turned out that Skype was bypassing the mixer as the slider position
made no difference to the volume.


See that magic check box in the Skype settings dialo.

Infortunately the distro only has kmix available so I
will have to try and compile alsamixer from source before I try again


That is very odd if alsamixer is not provided. Have you looked
for something like alsa-tools package?

Also within kmix, is it not possible to select ALSA (device hardware)
as the sound device to adjust?

kmix - Settings - Audio Setup

popups up Phonon KDE Control Module dialog

Click "Audio Hardware Setup" tab

Under Hardware there is clickable menu which you should then be
able to change from the default Pulse internal audio to the
actual "sound card hardware" device for ALSA.

When you close this dialog with Apply, back in the Kmixer
window you will then see the slider for the ALSA hardware device,
which you can then adjust the playback level to about 84%.

Check the other tab "Capture" as well and adjust the sliders there
to around 84% as well if necessary.

Do *not forget* to then go through the above procedure kmix - Settings
to reset the default audio back to the Pulse Audio internal.

This way you can at least avoid having to compile alsamixer from
source if your distribution fails to provide it in one of the packages.

Sadly the KDE Phonon system which is the KDE4 interface to Pulse Audio,
is even more of a black box / hidden magic system than Pulse audio
its-self.


Right, alsamixer has been installed and working. It is no improvement over
kmix. I turned pulseaudio on, set all mic and capture inputs to 'on' and vol
levels to high.

kmix - Settings - Audio Setup

Under Hardware there is no Pulse internal audio. Apart from the web-cam, the
only source presented is HDA ATI SB (VT1708S Analog).

At any rate, with this setup Skype would no longer make its ringing tones.
To recover those Pulseaudio had to be switched off!

Back to square one!

Oh! Reaarding the remark that this thread should have been directed
elsewhere. Quite right. I slipped up when selecting the NG! Profound
apologies but grateful for the support.

Kind regards, Alan









All times are GMT +1. The time now is 12:02 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
HomeCinemaBanter.com