Mailing List Archive

ALSA no sound
Had gentoo linux for years. Original system had working sound, which
gradually petered out (working in some apps and not others) until no
sound at all.

Got a new system, a few months old, set it up according to the ALSA
guilde (wiki.gentoo.org/wiki/ALSA) but no sound.

Physically removed the speakers, plugged into laptop, works fine.
Put back in desktop (linux) and no sound.

linux # lsof /dev/snd/pcmC1D3p
linux # speaker-test -t wav -c 2

speaker-test 1.0.27.2

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 2048 to 8192
Period size range from 1024 to 1024
Using max buffer size 8192
Periods = 4
was set period_size = 1024
was set buffer_size = 8192
0 - Front Left
1 - Front Right
--
I got the sound device from lsof | grep snd with a java app running
which locks the sound device. Did the above with it shut down.

alsamixer shows 2 cards, 1 HDMI, so I presume I got the right 1.
The speaker cable is green so I plugged in the middle green hole
(which also says "line out"). Also tried the other ones ("line in" and
mic symbol).

There are no other audio slots anywhere so I think is a software problem.

alsamixer calls the card "HDA AIT SB:" chip "Realtek ALC887-VD"
I have PCI/Intel HD Audio/Realtek enabled (plus many others in that group).

I'm doing all this testing from root.

I've tried everything I can think of, what next?
Re: ALSA no sound [ In reply to ]
LOL started the java app, and got sound, no idea why speaker-test didn't work.

On Tue, Nov 18, 2014 at 2:35 PM, Daiajo Tibdixious <daiajo@gmail.com> wrote:
> Had gentoo linux for years. Original system had working sound, which
> gradually petered out (working in some apps and not others) until no
> sound at all.
>
> Got a new system, a few months old, set it up according to the ALSA
> guilde (wiki.gentoo.org/wiki/ALSA) but no sound.
>
> Physically removed the speakers, plugged into laptop, works fine.
> Put back in desktop (linux) and no sound.
>
> linux # lsof /dev/snd/pcmC1D3p
> linux # speaker-test -t wav -c 2
>
> speaker-test 1.0.27.2
>
> 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 2048 to 8192
> Period size range from 1024 to 1024
> Using max buffer size 8192
> Periods = 4
> was set period_size = 1024
> was set buffer_size = 8192
> 0 - Front Left
> 1 - Front Right
> --
> I got the sound device from lsof | grep snd with a java app running
> which locks the sound device. Did the above with it shut down.
>
> alsamixer shows 2 cards, 1 HDMI, so I presume I got the right 1.
> The speaker cable is green so I plugged in the middle green hole
> (which also says "line out"). Also tried the other ones ("line in" and
> mic symbol).
>
> There are no other audio slots anywhere so I think is a software problem.
>
> alsamixer calls the card "HDA AIT SB:" chip "Realtek ALC887-VD"
> I have PCI/Intel HD Audio/Realtek enabled (plus many others in that group).
>
> I'm doing all this testing from root.
>
> I've tried everything I can think of, what next?
Re: Re: ALSA no sound [ In reply to ]
On Tue, 18 Nov 2014 14:59:54 +1100
Daiajo Tibdixious <daiajo@gmail.com> wrote:

> > alsamixer shows 2 cards, 1 HDMI, so I presume I got the right 1.
> >

What are your two sound cards? Do you have an NVidia graphics card
on your system? If so, then the HDMI may refer to the on-board NVidia
sound.


What is the output of aplay -L?
Re: Re: ALSA no sound [ In reply to ]
linux # aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=SB
HDA ATI SB, ALC887-VD Analog
Default Audio Device
sysdefault:CARD=SB
HDA ATI SB, ALC887-VD Analog
Default Audio Device
front:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
Front speakers
surround21:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SB,DEV=0
HDA ATI SB, ALC887-VD Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=HDMI,DEV=0
HDA ATI HDMI, HDMI 0
HDMI Audio Output

The sound in the java app was short lived, cut out after a few mins,
been silent since.

On Tue, Nov 18, 2014 at 3:46 PM, Frank Peters <frank.peters@comcast.net> wrote:
> On Tue, 18 Nov 2014 14:59:54 +1100
> Daiajo Tibdixious <daiajo@gmail.com> wrote:
>
>> > alsamixer shows 2 cards, 1 HDMI, so I presume I got the right 1.
>> >
>
> What are your two sound cards? Do you have an NVidia graphics card
> on your system? If so, then the HDMI may refer to the on-board NVidia
> sound.
>
>
> What is the output of aplay -L?
>
>
Re: ALSA no sound [ In reply to ]
On Tue, 18 Nov 2014 14:35:29 +1100
Daiajo Tibdixious <daiajo@gmail.com> wrote:

>
> alsamixer shows 2 cards, 1 HDMI, so I presume I got the right 1.
>
>
> linux # lsof /dev/snd/pcmC1D3p
> linux # speaker-test -t wav -c 2
>
> speaker-test 1.0.27.2
>
> Playback device is default
>

The pcmC1D3p device refers to the second sound card (the HDMI output).

Try to invoke speaker-test using the first sound card:

speaker-test -Dhw:0,0 -c 2 -t wav

Also, make sure the first sound card is not muted.
Re: ALSA no sound [ In reply to ]
lsof shows java using the HDMI, yet when I run the test on hw:0,0 it
was locked until I shutdown java. After that the test worked
perfectly.

So the problem seems to be java using the wrong card, how to I force
it to use the external speakers?

On Tue, Nov 18, 2014 at 5:45 PM, Frank Peters <frank.peters@comcast.net> wrote:
> On Tue, 18 Nov 2014 14:35:29 +1100
> Daiajo Tibdixious <daiajo@gmail.com> wrote:
>
>>
>> alsamixer shows 2 cards, 1 HDMI, so I presume I got the right 1.
>>
>>
>> linux # lsof /dev/snd/pcmC1D3p
>> linux # speaker-test -t wav -c 2
>>
>> speaker-test 1.0.27.2
>>
>> Playback device is default
>>
>
> The pcmC1D3p device refers to the second sound card (the HDMI output).
>
> Try to invoke speaker-test using the first sound card:
>
> speaker-test -Dhw:0,0 -c 2 -t wav
>
> Also, make sure the first sound card is not muted.
>
>
Re: ALSA no sound [ In reply to ]
Daiajo Tibdixious posted on Tue, 18 Nov 2014 21:02:32 +1100 as excerpted:

> lsof shows java using the HDMI, yet when I run the test on hw:0,0 it was
> locked until I shutdown java. After that the test worked perfectly.
>
> So the problem seems to be java using the wrong card, how to I force it
> to use the external speakers?

The aplay -L list indicated that the HDMI was ATI, likely on your
graphics card, and that's what you want to ignore, correct?

If you're running the proprietary driver I've no idea, but with the radeon
driver on a Turks card here (Radeon hd6670 IIRC, the logs say turks),
kernel built-in not modular, the following kernel commandline option
disables HDMI audio here:

radeon.audio=0

But while I know it's disabled (at least back when the kernel radeon
driver first enabled hdmi audio by default I couldn't boot without it
disabled, so it definitely disables it or I'd have no graphics!), alsa
still shows it as a sound card that I can choose, I just never do, so I
don't know what would happen if I did.

And of course I don't do proprietary so haven't the foggiest how the
proprietary driver works in that regard.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
Re: ALSA no sound [ In reply to ]
On Tue, 18 Nov 2014 21:02:32 +1100
Daiajo Tibdixious <daiajo@gmail.com> wrote:

>
> So the problem seems to be java using the wrong card, how to I force
> it to use the external speakers?
>

The application may have a configuration setting that specifies
the audio device to use. This would be found in some application
menu entry or in some application configuration file.

You may want to try specifying a default PCM entry in your
alsa asoundrc configuration file. Information on that is
found here:

http://www.alsa-project.org/main/index.php/Asoundrc

Also, as Duncan suggested, you may want to disable the ATI HDMI
entirely. There could be several methods to accomplish this, but
I use the following procedure.

Find the ATI HDMI pci id with:

lspci | grep -i audio

The ID is the leftmost field, for example, 01:00.1.

Now, find the correct directory in the /sys tree that corresponds
to this pci id:

find /sys/devices -name *01:00.1

This will give an output similar to this:

/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1

Now, add add this to the appropriate boot script:

echo 1 > /sys/devices/pci0000\:00/0000\:00\:03.0/0000\:01\:00.1/remove

(where the ":" character is escaped with "/")

At each boot the ATI HDMI audio will be disabled.

Let us know if this works for you.
Re: ALSA no sound [ In reply to ]
On Mon, Nov 17, 2014 at 7:35 PM, Daiajo Tibdixious <daiajo@gmail.com> wrote:
> Had gentoo linux for years. Original system had working sound, which
> gradually petered out (working in some apps and not others) until no
> sound at all.
>
> Got a new system, a few months old, set it up according to the ALSA
> guilde (wiki.gentoo.org/wiki/ALSA) but no sound.
>
> Physically removed the speakers, plugged into laptop, works fine.
> Put back in desktop (linux) and no sound.
>
> linux # lsof /dev/snd/pcmC1D3p
> linux # speaker-test -t wav -c 2
>
> speaker-test 1.0.27.2
>
> 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 2048 to 8192
> Period size range from 1024 to 1024
> Using max buffer size 8192
> Periods = 4
> was set period_size = 1024
> was set buffer_size = 8192
> 0 - Front Left
> 1 - Front Right
> --
> I got the sound device from lsof | grep snd with a java app running
> which locks the sound device. Did the above with it shut down.
>
> alsamixer shows 2 cards, 1 HDMI, so I presume I got the right 1.
> The speaker cable is green so I plugged in the middle green hole
> (which also says "line out"). Also tried the other ones ("line in" and
> mic symbol).
>
> There are no other audio slots anywhere so I think is a software problem.
>
> alsamixer calls the card "HDA AIT SB:" chip "Realtek ALC887-VD"
> I have PCI/Intel HD Audio/Realtek enabled (plus many others in that group).
>
> I'm doing all this testing from root.
>
> I've tried everything I can think of, what next?
>

First, have you reviewed the Alsa documentation specifically for
setting the order of multiple cards? Without setting the order
specifically I can tell you that at times Alsa will change the order
on you. (kernel updates, Alsa updates) I have one machine with 3
cards, sync'ed using external digital clocks. It's critical to inform
Alsa as to the order I want them to appear.

http://alsa.opensrc.org/MultipleCards

After you've done that and verified it is setup then it's important to
make sure that you've enabled both your master volume as well as PCM
levels in either Alsamixer or your desktop mixer.

Also, make sure you set the options for saving and restarting in
/etc/conf.d/alsasound.

HTH,
Mark