Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Laptop audiocard with alsa
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
znavko
n00b
n00b


Joined: 09 Oct 2017
Posts: 14

PostPosted: Tue Oct 10, 2017 4:19 pm    Post subject: [solved] Laptop audiocard with alsa Reply with quote

I use Funtoo. I want to use alsa (without pulseaudio if it is possible).

My both users are in audio group:

Code:

id -Gn
root bin daemon sys adm disk wheel floppy audio tape video


Sound does not work, alsamixer does not detect audio device.

https://postimg.org/image/qqh6se87t/

I tried to add audio device this way.

I configured and compiled kernel as described here http://www.funtoo.org/Intel_HD_Audio

I use debian-sources kernel and genkernel utility. As I understand I can run genkernel in any place, such as ~.

Code:

localhost ~ # genkernel --menuconfig all

localhost ~ # cat /usr/src/linux/.config | nc termbin.com 9999


http://termbin.com/jo2ek


I did not find "Indel HD Audio" and "USB audio" lines https://postimg.org/image/gug3sr2ft/

When the kernel was recompiled with this options command 'alsamixer' shows the same as in the picture before.

Please, how to detect audio device? Should I use debian-sources? How to configure?


Last edited by znavko on Sat Oct 14, 2017 9:24 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16891
Location: here

PostPosted: Tue Oct 10, 2017 4:55 pm    Post subject: Reply with quote

HD Audio is not under "PCI sound devices" but at same level
Code:
    Device Drivers  --->
        <*> Sound card support  --->
            <*>   Advanced Linux Sound Architecture  --->
                 HD-Audio  --->

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
znavko
n00b
n00b


Joined: 09 Oct 2017
Posts: 14

PostPosted: Tue Oct 10, 2017 6:12 pm    Post subject: Reply with quote

There is not also "Intel HD Audio"
https://postimg.org/image/wilwda7fd/

Picture shows as it was. But now I cannot see audio device in alsamixer. Please how to install my audio card?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16891
Location: here

PostPosted: Tue Oct 10, 2017 6:20 pm    Post subject: Reply with quote

znavko wrote:
There is not also "Intel HD Audio"
https://postimg.org/image/wilwda7fd/

"Intel HD Audio" = "HD Audio"
You can post (with wgetpaste) output of lspci and grep SND_HDA /usr/src/linux/.config
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
znavko
n00b
n00b


Joined: 09 Oct 2017
Posts: 14

PostPosted: Wed Oct 11, 2017 4:46 am    Post subject: Reply with quote

I am sorry. After reboot my laptop works on console, Xorg does not start:
Code:
$ startx
...
Using system config directory "/usr/share/X11/xorg.conf.d"
[KMS] drm report modesetting isn't supported.
(EE)
Fatal server error:
(EE) no screens found(EE)
...


Also does not work my Wi-fi command:

Code:
$ wpa_supplicant -B -i wlan0 -c<(wpa_passphrase 'WIFI222" '20172017') && dhcpcd wlan0
Successfully initialized wpa_supplicant
nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'


I do not know why this happened, cause I only recompiled kernel once with only changes in sound drivers as described on Funtoo.org; after that I started `genkernel --menuconfig all` twice to view menu again and closed terminal without saving, without exiting from menu. Why have I these errors?

I can boot to system-rescue-cd and chroot to my system. Should I download debian-sources again and compile as it is?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16891
Location: here

PostPosted: Wed Oct 11, 2017 6:03 am    Post subject: Reply with quote

Genkernel default configuration (in gentoo) save old kernel config in /etc/kernels/, you can pass on of this configuration to genkernel with options --kernel-config=/path/to/kernel.config
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
znavko
n00b
n00b


Joined: 09 Oct 2017
Posts: 14

PostPosted: Thu Oct 12, 2017 4:40 am    Post subject: Reply with quote

Yes, there were old configs: /usr/src/linux, I compiled with .config--2017-10-10-11-27-24.bak and everything is ok.
So I do not know how to enable HD Audio without cracking the system.

lspci
http://termbin.com/0zlw

grep SND_HDA /usr/src/linux/.config--2017-10-10-11-27*
http://termbin.com/14st


Last edited by znavko on Thu Oct 12, 2017 7:37 am; edited 1 time in total
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Guru
Guru


Joined: 13 Feb 2016
Posts: 458

PostPosted: Thu Oct 12, 2017 5:36 am    Post subject: Reply with quote

znavko, it looks like the you did it because you now have module for SND_HDA_INTEL, so the next thing is to check if the module is loaded and then associating the driver to the soundcard.

Check lsmod to see if snd_hda_intel exists, and if it is not the use modprobe -a

You can then look at verbose output of lspci -v to check if the driver is recognized by your hardware. At that point it will just be a matter of configuring ALSA, are you up for it? Hopefully it will work out of the box -- that is all I can say. Otherwise, remember to remain patient and check the forums (here) for answers to those types of things there are some very good guides at how to troubleshoot, and configure ALSA. The main thing is that before you go making changes to 5 or 6 different configuation files that you understand a bit first about what each change does, such as enabling multiple cards, or usb sound etc.

When you go to configure ALSA, keep in mind you have two audio cards, from the lspci output (one of those is going to control the audio through HDMI and the other through the speakers and headphones)
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16891
Location: here

PostPosted: Thu Oct 12, 2017 5:47 am    Post subject: Reply with quote

Try to see also this thread
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
znavko
n00b
n00b


Joined: 09 Oct 2017
Posts: 14

PostPosted: Thu Oct 12, 2017 7:51 am    Post subject: Reply with quote

Code:
$ lsmod|grep snd_hda
snd_hda_codec_realtek    86016  1
snd_hda_codec_generic    69632  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     45056  1
snd_hda_intel          36864  0
snd_hda_codec         135168  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core           81920  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               110592  4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
snd                    86016  8 snd_hda_intel,snd_hwdep,snd_hda_codec,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek,snd_pcm


$ lspci -v
...
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio
   Subsystem: ASUSTeK Computer Inc. Kabini HDMI/DP Audio
   Flags: bus master, fast devsel, latency 0, IRQ 35
   Memory at feb64000 (64-bit, non-prefetchable) [size=16K]
   Capabilities: [48] Vendor Specific Information: Len=08 <?>
   Capabilities: [50] Power Management version 3
   Capabilities: [58] Express Root Complex Integrated Endpoint, MSI 00
   Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
   Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel

00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Function 0
   Flags: fast devsel
...

00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 02)
   Subsystem: ASUSTeK Computer Inc. FCH Azalia Controller
   Flags: bus master, slow devsel, latency 32, IRQ 16
   Memory at feb60000 (64-bit, non-prefetchable) [size=16K]
   Capabilities: [50] Power Management version 2
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
...




Yes, I have two audiocards in my Asus X552E: headphones and speaker. As I determined Funtoo does not get them at the box. I am not familiar with ALSA configurations, had never seen them.


https://forums.gentoo.org/viewtopic-t-951638-start-0.html not helped me.
Back to top
View user's profile Send private message
znavko
n00b
n00b


Joined: 09 Oct 2017
Posts: 14

PostPosted: Fri Oct 13, 2017 7:59 am    Post subject: Reply with quote

Sorry, my card is not Intel, but I cannot determine which entry should I choose here http://bugtrack.alsa-project.org/main/index.php/Matrix:Main with these deices:

Code:
lspci -vnn | grep -A 1 -i audio
00:01.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio [1002:9840]
   Subsystem: ASUSTeK Computer Inc. Kabini HDMI/DP Audio [1043:148d]
   Flags: bus master, fast devsel, latency 0, IRQ 35
--
00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller [1022:780d] (rev 02)
   Subsystem: ASUSTeK Computer Inc. FCH Azalia Controller [1043:148d]
Back to top
View user's profile Send private message
znavko
n00b
n00b


Joined: 09 Oct 2017
Posts: 14

PostPosted: Sat Oct 14, 2017 9:23 am    Post subject: Reply with quote

solved with this http://icomputo.com/SinsonidoconALSAAMDFCHAzaliaControllerrev02Solucion

Code:
$ cat /etc/modprobe.d/50-alsa.conf
options snd-hda-intel index=1,0

$ reboot
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Guru
Guru


Joined: 13 Feb 2016
Posts: 458

PostPosted: Sun Oct 15, 2017 10:58 pm    Post subject: Reply with quote

Nice to see this got solved! Sometimes the shorter thread has more directly applicable help if you can find the specific issue. Note that this solution involved tells ALSA to associate intel sound drivers with a particular setting (for the hardware plug I think). Meaning, even though it is a bit overkill (and at worst may even get in the way at times) just keep that in mind so you have a place to start with the next time you are troubleshooting it. And that is, the solution if need be could be more configurable than the option of linking by index the sound card device and driver.

In my experience, a helpful way of going with the laptop is also to make sure you have in that same file you changed the setting for multiple sound cards (say you want HDMI audio sometimes and other times speakers or headphones). That is you can set snd_card_limits=2 if it isn't already. Then you can restart the machine and see if maybe you can test out each using the aplay and speaker-test utilities of alsa.

Those are my only thoughts.
Back to top
View user's profile Send private message
znavko
n00b
n00b


Joined: 09 Oct 2017
Posts: 14

PostPosted: Tue Oct 17, 2017 11:12 am    Post subject: Reply with quote

Thank you for refining!
When I try to comment line with option snd-hda-intel index and add line with snd crads_limit=2 it does not work.
I've foud "The newer "slots=" method" instead of older index method here: http://alsa.opensrc.org/MultipleCards
Thee is a line
Code:
options snd slots=snd-interwave,snd-ens1371


I could get the list of sound modules

Code:
# cat /proc/modules |grep snd
snd_hda_codec_realtek 86016 1 - Live 0xffffffffc0855000 (E)
snd_hda_codec_generic 69632 1 snd_hda_codec_realtek, Live 0xffffffffc0818000 (E)
snd_hda_codec_hdmi 45056 1 - Live 0xffffffffc080c000 (E)
snd_hda_intel 36864 0 - Live 0xffffffffc0656000 (E)
snd_hda_codec 135168 4 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel, Live 0xffffffffc07ea000 (E)
snd_hda_core 81920 5 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec, Live 0xffffffffc06b6000 (E)
snd_hwdep 16384 1 snd_hda_codec, Live 0xffffffffc06b1000 (E)
snd_pcm 110592 4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core, Live 0xffffffffc0695000 (E)
snd_timer 32768 1 snd_pcm, Live 0xffffffffc05ae000 (E)
snd 86016 8 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer, Live 0xffffffffc06fa000 (E)
soundcore 16384 1 snd, Live 0xffffffffc0527000 (E)


so I tried to add this line in alsa.conf:

Code:
# tail -n 4 /etc/modprobe.d/alsa.conf

# Set this to the correct number of cards.
options snd cards_limit=2
options snd slots=snd-hda-intel,snd-hda-codec-realtek


but this did not do the effect. I really do not know how to determine snd card name for alsa: realtek or or generic, underscore or hyphen[/code]
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Guru
Guru


Joined: 13 Feb 2016
Posts: 458

PostPosted: Wed Oct 18, 2017 7:13 am    Post subject: Reply with quote

What I meant to say was in case you have problems getting sound out of HDMI (now) than try the option for setting snd_card_limit to 2.

Somehow, not sure why but on my machine it isn't actually necessary but it may have something to do with the particular drivers in use by each sound device. (Both use snd_hda_intel as the driver.

I am able to confirm the fact using lspci -nnk which shows the kernel driver in use for each, see below...


00:03.0 Audio device [0403]: Intel Corporation Broadwell-U Audio Controller [8086:160c] (rev 09)
Subsystem: Hewlett-Packard Company Broadwell-U Audio Controller [103c:8094]
Kernel driver in use: snd_hda_intel
....
00:1b.0 Audio device [0403]: Intel Corporation Wildcat Point-LP High Definition Audio Controller [8086:9ca0] (rev 03)
Subsystem: Hewlett-Packard Company Wildcat Point-LP High Definition Audio Controller [103c:8094]
Kernel driver in use: snd_hda_intel

I'm actually not totally sure what this could mean, even though I was able to look into a little bit and find out through the intel website that the driver is apparently capable of handling the hardware (for the most part) and that while there may be issues that involve codecs and sound quality for the particular card when using the driver that was considered not to be an issue with the driver. It's all very circular. What I had hoped to say was the suggestion that now you have something working, then to use the asound configuration files in order to further fine tune the controls, and leave the settings for alsa.conf as something to consider too, especially if what you'd like to do is either index the cards. But I will do a bit more looking into the new versus old method and then hopefully we will have gained some clarity.

Just wondering, were you ever planning to make use of the second audio source? Maybe not, in which case this part of the discussion is really quite meaningless.
Back to top
View user's profile Send private message
znavko
n00b
n00b


Joined: 09 Oct 2017
Posts: 14

PostPosted: Thu Oct 19, 2017 1:49 pm    Post subject: Reply with quote

I have no HDMI port, I only use speaker and may be headphones.


Code:
$  lspci -nnk
...
00:01.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio [1002:9840]
   Subsystem: ASUSTeK Computer Inc. Kabini HDMI/DP Audio [1043:148d]
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
...
00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller [1022:780d] (rev 02)
   Subsystem: ASUSTeK Computer Inc. FCH Azalia Controller [1043:148d]
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
...


I try
Code:
$ tail -n 4 /etc/modprobe.d/alsa.conf

# Set this to the correct number of cards.
options snd cards_limit=1
options snd slots=snd-hda-intel


not works.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4809
Location: The Peanut Gallery

PostPosted: Fri Oct 20, 2017 11:20 am    Post subject: Reply with quote

LIsLinuxIsSogood wrote:
Just wondering, were you ever planning to make use of the second audio source? Maybe not, in which case this part of the discussion is really quite meaningless.
Not really; the issue is that if you have the intel-hda driver loaded for one card, it will also pick up the other one (as your output shows.)

HDMI outputs often use that driver for audio, and they usually get picked up first (when the graphics card is initialised), so ALSA uses them by default.

As the OP showed us, the index option tells the driver to swap the order, correcting the problem.

You often end up needing a card-specific option for intel-hda, as well. Not sure how that interacts with index, when you do want the HDMI output available for video.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Guru
Guru


Joined: 13 Feb 2016
Posts: 458

PostPosted: Sat Oct 21, 2017 8:54 am    Post subject: Reply with quote

I apologize that I may have said that without considering my own situation, being the same or similar to the OP because both sound devices are using 1 common driver. This is a valuable lesson for learning the handling of this important alsa module configuring (at that level of index). One more thing while it would look like there is some new slotting allowed, because it does not automatically replace or deprecate the index method, which should still work. The truth I also hadn't picked up on the hardware loading issue in the first place, but that is what the index should accomplish thanks to SteveL for mentioning that. And, with only one driver I believe the other issue is null or non-existent meaning for sound card limits.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Guru
Guru


Joined: 13 Feb 2016
Posts: 458

PostPosted: Sat Oct 21, 2017 9:05 am    Post subject: Reply with quote

Quote:
I really do not know how to determine snd card name for alsa: realtek or or generic, underscore or hyphen


I meant to also respond earlier to this, alsa does not care about the hardware itself, but the driver in use, which you probably already figured out since I saw this in a more recent post in the thread, where it looks like you may have included two incompatbile types of devices for the sound card in one line, so I'm not surprised that it didn't work when you had multiple "slots" listed which included snd_hda_intel and some other device driver that from what is listed throughout the Thread does not look like it is in use by alsa.

As for what it was that was last mentioned in terms of a setting that may have also failed, was the following:
Quote:
options snd cards_limit=1
options snd slots=snd-hda-intel


I cannot say why this doesn't work, as I have not tried it myself.

But as SteveL suggests indexing the card and make it so that ALSA can use the correct device (from the list, which you can also query with aplay -l or aplay -L for more summary information)

Then with that, I think that the use of both (speaker/devices) is dependent on either making some headway with the newer slotting, or else this definitely works too...

options snd-hda-intel id=** index=0
options snd-hda-intel id=** index=1[/quote]

Where "**" stands for what the output is of the devices from aplay -l.

(NOTE: since the discussion has been about the kernel and I am not sure the names of the devices, just have a look at what my dual card setup is here below, and then treat yours similarly but just with one card if you wish).

Code:
# Set this to the correct number of cards.
options snd cards_limit=2
options snd-hda-intel id=PHC index=0
options snd-hda-intel id=HDMI index=1
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4809
Location: The Peanut Gallery

PostPosted: Sun Oct 22, 2017 10:38 am    Post subject: Reply with quote

"LIsLinuxIsSogood": You're welcome, but it was the OP (znavko) who found the index solution; I just summarised in response to your later post.

It's happened to me before, two cards being picked up by that driver, HDMI first. I ended up just not using onboard audio; intel hda isn't very good quality, and Griz told me the onboard audio is a waste of time (though he sorted it out on my laptop with a model-specific option.)
USB headsets work surprisingly well (they have a simple USB audio device available) for basic audio in Linux. Though that was more so we could teamspeak.

WRT device names, I'd replace hyphens with underscores by default, since C (like most languages apart from functional ones) does not allow hyphens/dashes in identifiers: they're always read as a minus sign. So kernel driver names will use underscores, not hyphens.
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Guru
Guru


Joined: 13 Feb 2016
Posts: 458

PostPosted: Mon Oct 23, 2017 7:54 am    Post subject: Reply with quote

SteveL, not to try and take over the post here (little late though anyhow) is "_" instead of "-" for the entirety of settings in alsa.conf? Or just sound device, what about things like mixer or other modules? Do I sub them out as well for underscored versions that are currently hyphens in there?
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4809
Location: The Peanut Gallery

PostPosted: Tue Oct 24, 2017 10:59 am    Post subject: Reply with quote

LIsLinuxIsSogood wrote:
SteveL, not to try and take over the post here (little late though anyhow) is "_" instead of "-" for the entirety of settings in alsa.conf? Or just sound device, what about things like mixer or other modules? Do I sub them out as well for underscored versions that are currently hyphens in there?
To be completely honest: I have no idea.
But I would try underscores before hyphens.

When it comes to making changes, do them incrementally, with as little change as possible.

Consider also using git on /etc, if you're administering multiple systems.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum