[alsa-devel] no sound with intel audio

Petr Maivald petr at jezdec.com
Sun Jun 1 22:37:23 CEST 2014


On Sun, Jun 1, 2014 at 8:22 AM, Takashi Iwai <tiwai at suse.de> wrote:
> At Sat, 31 May 2014 13:47:59 +0200,
> Petr Maivald wrote:
>>
>> On Fri, May 30, 2014 at 6:21 PM, Takashi Iwai <tiwai at suse.de> wrote:
>> > At Fri, 30 May 2014 18:05:06 +0200,
>> > Petr Maivald wrote:
>> >>
>> >> > As a primary test, for example, try the following on a terminal:
>> >> >
>> >> >   % amixer -c1 set "Auto-Mute Mode" "Enabled"
>> >> >   % aplay -Dplughw:1 -vv some-your-file.wav
>> >> >
>> >> > where some-your-file.wav is any WAV file you'd like to hear.
>> >> >
>> >> > If you're using PulseAudio, try like below instead:
>> >> >
>> >> >   % pasuspender -- aplay -D plughw:1 -vv some-your-file.wav
>> >> >
>> >> > Does it play anything?  Try both the headphone plugged and unplugged.
>> >>
>> >> My apologies, I did seriously try to figure out how to figure this out
>> >> and didn't come across anything that made any sense. So, I thought it
>> >> was a kernel bug...
>> >>
>> >> Your suggestion to try aplay did indeed produce sound. It is the first
>> >> sound I was able to get out of this configuration ever. I attached the
>> >> output of alsa-info.sh with aplay playing, and with mplayer playing
>> >> and not working, and the diff. Thanks for your help, at least now I
>> >> have some clue about where to look.
>> >
>> > Well, I still don't know what you did try.  This should have been
>> > clarified in the first ground.  Are you using PulseAudio?  If so, take
>> > a look at the mixer, pavucontrol, etc, and which output is being
>> > selected.  On your machine, the first device is HDMI, not the onboard
>> > audio.
>> >
>> > If you're using the direct ALSA API without PA, it's likely HDMI being
>> > picked up as the primary output.  You can change the device init order
>> > via index module option or specify the default card number in
>> > ~/.asoundrc or /etc/asound.conf in that case.
>>
>> Outstanding! You rock! I had no luck figuring out how to change the
>> device init order via index module option, but I googled around and
>> found that I can set /etc/asound.conf to
>>
>> pcm.!default {
>>     type hw
>>     card PCH
>> }
>>
>> ctl.!default {
>>     type hw
>>     card PCH
>> }
>>
>> And, that did the trick! Now I have sound!
>
> It's close to the solution, but the drawback of this setup is that you
> cannot play multiple streams at the same time.  Instead, you can pass
> the PCM definition like:
>
>   pcm.!default sysdefault:PCM
>
> Then dmix and dsnoop will be used for simultaneous accesses.
> The ctl definition can be what you used.
>
> But, as mentioned, another solution is to swap the devices in the
> driver level.  Instead of the ~/.asoundrc setup, pass index=1,0 option
> to snd-hda-intel module.  Then the order of PCM and HDMI will be
> swapped.
>
>
> Takashi
>
>> So, apparently I'm using the direct ALSA API without PA since mixer,
>> pavucontrol, and pasuspender is not installed. To go back to your
>> question of what I did try, I was running Flash, Gnome Mplayer,
>> Audacious, and VLC. I guess I neglected to mention that since the
>> sound problem didn't seem related to the media players (they all had
>> the same no sound problem).
>>
>> Sorry about the earlier confusion. I was trying to figure out dozens
>> of configuration files without knowing what was relevant or installed,
>> etc.
Thanks again, it's a bit tricky for me since I don't know what these things in
the file do. I realized that PCM should be the card's name (PCH), and I got
rid of the stuff in the first curly brackets and it worked just as you said.

At this point, after what I've read about it, the format of
/etc/modprobe.d/alsa-base.conf
isn't understandable to me. So, I don't think I can handle passing the
index=1,0 option
to the snd-hda-intel module. Part of the problem is that both cards
use snd-hda-intel,
but the main thing is that I have working sound now, so the current
solution seems
good to me.


More information about the Alsa-devel mailing list