WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Getting Alsa / sound working  (Read 14088 times)

Offline liam391

  • Newbie
  • *
  • Posts: 8
Getting Alsa / sound working
« on: March 02, 2018, 08:29:29 AM »
Hello,
I know this has been asked many times before and apologise for my ignorance but I'm struggling to find a solution to get sound working on my Thinkpad T61 with dCore installed.

I initially followed the instructions found in http://tinycorelinux.net/dCore/x86/README/README-alsa-utils.txt . I then went through http://wiki.tinycorelinux.net/wiki:setting_up_sound, and attempted to understand my problem. I will provide the outputs of the relevant tools below, but as far as I can tell:

- amixer and alsamixer will not open with these errors -
Code: [Select]
amixer: Mixer attach default error: No such file or directory
cannot open mixer: No such file or directory
- System can see my sound card but Alsa is not recognising it
- I have the intel driver but am missing the required codec, or Alsa is not looking in the correct place
- when I got alsamixergui to open it showed only 2 sliders, and showed the following:
card:PulseAudio chip:PulseAudio
- conflict with Pulseaudio?
- I could not find 'alsaconf' sce to use it....this was my next port of call and I thought I may take a TCE from tinycore repos and use that?
- I'm not sure which .conf files I should be edting to resolve this as they have different names / locations compared to info I find on the Archwiki etc

I later loaded alsa-base and others in order to use the script which provides relevant info. I will copy and paste all relevant outputs from there and from command line utilities below:

lsmod:

Code: [Select]

tc@box:~$ lsmod | grep snd
snd_seq_dummy          12288  0
snd_pcm_oss            32768  0
snd_seq_oss            24576  0
snd_seq_midi_event     12288  1 snd_seq_oss
snd_seq                32768  5 snd_seq_midi_event,snd_seq_oss,snd_seq_dummy
snd_seq_device         12288  2 snd_seq,snd_seq_oss
snd_mixer_oss          16384  1 snd_pcm_oss
snd_hda_intel          20480  0
snd_hda_codec          53248  1 snd_hda_intel
snd_hwdep              12288  1 snd_hda_codec
snd_hda_core           24576  2 snd_hda_codec,snd_hda_intel
snd_pcm                49152  4 snd_pcm_oss,snd_hda_codec,snd_hda_intel,snd_hda_core
snd_timer              20480  2 snd_pcm,snd_seq
snd                    36864  10 snd_pcm_oss,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_hda_codec,snd_hda_intel,snd_seq_oss,snd_seq_device,snd_mixer_oss
soundcore              12288  1 snd

aplay:
Code: [Select]
tc@box:~$ aplay -l
aplay: device_list:268: no soundcards found...

alsa-base utility:

Code: [Select]
!!Script ran on: Fri Mar  2 12:35:20 UTC 2018


!!Linux Distribution
!!------------------




!!DMI Information
!!---------------

Manufacturer:      LENOVO
Product Name:      766311G
Product Version:   ThinkPad T61


!!Kernel Information
!!------------------

Kernel release:    4.2.9-tinycore
Operating System:  GNU/Linux
Architecture:      i686
Processor:         i686
SMP Enabled:       No


!!ALSA Version
!!------------

Driver version:     k4.2.9-tinycore
Library version:   
Utilities version:  1.1.0


!!Loaded ALSA modules
!!-------------------



!!Sound Servers on this system
!!----------------------------

Pulseaudio:
      Installed - Yes ()
      Running - No

ESound Daemon:
      Installed - Yes ()
      Running - No

aRts:
      Installed - Yes ()
      Running - No

Jack:
      Installed - Yes ()
      Running - No

No sound servers found.


!!Soundcards recognised by ALSA
!!-----------------------------

--- no soundcards ---


!!PCI Soundcards installed in the system
!!--------------------------------------

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)


!!Advanced information - PCI Vendor/Device/Subsystem ID's
!!--------------------------------------------------------

00:1b.0 0403: 8086:284b (rev 03)
Subsystem: 17aa:20ac


!!Loaded sound module options
!!--------------------------


!!ALSA Device nodes
!!-----------------

crw-rw---- 1 root audio 116,  1 Mar  2 12:00 /dev/snd/seq
crw-rw---- 1 root audio 116, 33 Mar  2 12:00 /dev/snd/timer


!!Aplay/Arecord output
!!------------

APLAY

aplay: device_list:268: no soundcards found...

ARECORD

arecord: device_list:268: no soundcards found...

!!Amixer output
!!-------------


!!Alsactl output
!!-------------

--startcollapse--
--endcollapse--


!!All Loaded Modules
!!------------------

Module
snd_seq_dummy
snd_pcm_oss
snd_seq_oss
snd_seq_midi_event
snd_seq
snd_seq_device
snd_mixer_oss
joydev
snd_hda_intel
snd_hda_codec
snd_hwdep
snd_hda_core
snd_pcm
snd_timer
snd
soundcore
drbg
ctr
ccm
cpufreq_stats
cpufreq_conservative
cpufreq_userspace
cpufreq_powersave
iwl4965
iwlegacy
mac80211
cfg80211
ppdev
pcspkr
wmi
ac
battery
8250_fintek
parport_pc
parport
video
backlight
squashfs
lz4_decompress
lpc_ich
acpi_cpufreq
loop
e1000e
ptp
pps_core


!!ALSA/HDA dmesg
!!------------------

[  408.810530] wls3: associated
[ 3745.975472] snd_hda_intel 0000:00:1b.0: probe_mask set to 0x1 for device 17aa:20ac
[ 3745.979603] snd_hda_intel 0000:00:1b.0: no codecs initialized
[ 3749.103202] floppy0: no floppy controllers found



Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: Getting Alsa / sound working
« Reply #1 on: March 02, 2018, 01:13:36 PM »
Try modprobing snd-hda-codec-analog, google says that's the codec on t61.

edit: you may also need to give the model=thinkpad option to snd-hda-intel.
« Last Edit: March 02, 2018, 01:16:19 PM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline liam391

  • Newbie
  • *
  • Posts: 8
Re: Getting Alsa / sound working
« Reply #2 on: March 02, 2018, 07:18:51 PM »
Thanks for the reply. I tried your suggestions but no joy, the modules don't appear to be loading. lsmod shows the new module. Restarted Alsa and got the following:

Code: [Select]
tc@box:/tmp/tcloop/alsa-modules-4.2.9-tinycore/usr$ sudo alsa reload
Unloading ALSA sound driver modules:/sbin/alsa: line 219: sed: not found
/sbin/alsa: line 219: sed: not found
/sbin/alsa: /sbin/alsa: line 219: sed: not found
line 219: sed: not found
.
Loading ALSA sound driver modules: (none to reload).

dmesg:

Code: [Select]
tc@box:/sbin$ dmesg | grep snd
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuzxenial initrd=/boot/dCorePlusxenial.gz tce=sda6 desktop=dwm blacklist=snd_mixer_oss, snd_seq_oss, snd_pcm_oss
[ 3745.975472] snd_hda_intel 0000:00:1b.0: probe_mask set to 0x1 for device 17aa:20ac
[ 3745.979603] snd_hda_intel 0000:00:1b.0: no codecs initialized

Code: [Select]
lsmod tc@box:/sbin$ lsmod | grep snd
snd_hda_codec_analog    12288  0
snd_hda_codec_generic    36864  1 snd_hda_codec_analog
snd_seq_dummy          12288  0
snd_pcm_oss            32768  0
snd_seq_oss            24576  0
snd_seq_midi_event     12288  1 snd_seq_oss
snd_seq                32768  5 snd_seq_midi_event,snd_seq_oss,snd_seq_dummy
snd_seq_device         12288  2 snd_seq,snd_seq_oss
snd_mixer_oss          16384  1 snd_pcm_oss
snd_hda_intel          20480  0
snd_hda_codec          53248  3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_analog
snd_hwdep              12288  1 snd_hda_codec
snd_hda_core           24576  4 snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_hda_codec_analog
snd_pcm                49152  4 snd_pcm_oss,snd_hda_codec,snd_hda_intel,snd_hda_core
snd_timer              20480  2 snd_pcm,snd_seq
snd                    36864  12 snd_pcm_oss,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_seq_oss,snd_seq_device,snd_mixer_oss,snd_hda_codec_analog
soundcore              12288  1 snd

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Getting Alsa / sound working
« Reply #3 on: March 02, 2018, 08:07:18 PM »
Hi liam391.  Re-import alsa-base or whichever SCE contains that package and see if it works now.

It appears sed is missing from the PATH specified in /sbin/alsa.  Our Busybox sed is located as /bb/sed. 

I added sed as a dependency of alsa-base as I tested /sbin/alsa does not work without /bin/sed existing. 
« Last Edit: March 02, 2018, 08:28:12 PM by Jason W »

Offline liam391

  • Newbie
  • *
  • Posts: 8
Re: Getting Alsa / sound working
« Reply #4 on: March 02, 2018, 08:35:48 PM »
Hi Jason, thanks for reply. I loaded the sce, now get the following when reloading alsa:

Code: [Select]
tc@box:/sbin$ alsamixer
cannot open mixer: No such file or directory
tc@box:/sbin$ amixer
amixer: Mixer attach default error: No such file or directory
tc@box:/sbin$ sudo alsa reload
Unloading ALSA sound driver modules: snd-hda-codec-analog snd-hda-codec-generic snd-seq-dummy snd-pcm-oss snd-seq-oss snd-seq-midi-event snd-seq snd-seq-device snd-mixer-oss snd-hda-intel snd-hda-codec snd-hwdep snd-hda-core snd-pcm snd-timer.
Loading ALSA sound driver modules: snd-hda-codec-analog snd-hda-codec-generic snd-seq-dummy snd-pcm-oss snd-seq-oss snd-seq-midi-event snd-seq snd-seq-device snd-mixer-oss snd-hda-intel snd-hda-codec snd-hwdep snd-hda-core snd-pcm snd-timermodprobe: bad line 2: 1 tokens found, 2 needed
modprobe: bad line 2: 1 tokens found, 2 needed
modprobe: bad line 2: 1 tokens found, 2 needed
modprobe: bad line 2: 1 tokens found, 2 needed
modprobe: bad line 2: 1 tokens found, 2 needed

    [EDIT]: Fixed code tag.  Rich
« Last Edit: March 03, 2018, 08:59:03 AM by Rich »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Getting Alsa / sound working
« Reply #5 on: March 02, 2018, 08:55:45 PM »
Try using no spaces after the comma in between the entries in your "blacklist=" bootcode and see if that helps.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Getting Alsa / sound working
« Reply #6 on: March 02, 2018, 08:59:58 PM »
Also, post your resulting /etc/modprobe.d/blacklist.conf file after booting.   Thanks. 

EDIT:  I tested with a "blacklist=snd_mixer_oss, snd_seq_oss, snd_pcm_oss" entry and saw the same error message of:  modprobe: bad line 2: 1 tokens found, 2 needed.  I changed it to "blacklist=snd_mixer_oss,snd_seq_oss,snd_pcm_oss" and no error, so that explains at least that error message.
« Last Edit: March 02, 2018, 09:44:06 PM by Jason W »

Offline liam391

  • Newbie
  • *
  • Posts: 8
Re: Getting Alsa / sound working
« Reply #7 on: March 03, 2018, 06:14:56 AM »
Thanks, that has resolved that error (I tried blacklisting the OSS modules after reading something about this in the wiki in relation to intel hda soundcards). My issue is really that I'm not sure which troubleshooting steps to go through, and whether I should only be using modprobe in the command line or editing a conf file. I've been reading up quite a lot on Alsa and the errors I've encountered but as a newb I struggle to understand it or the examples are for different soundcards and I don't know how to adapt (e..g there is kots of good info on https://alsa.opensrc.org/Sound_cards and associated pages but I've been unable to use it effectively so far).

Reloading Alsa now gives:

Code: [Select]
sudo alsa reload
Unloading ALSA sound driver modules: snd-seq-dummy snd-pcm-oss snd-mixer-oss snd-seq-oss snd-seq-midi-event snd-seq snd-seq-device snd-hda-intel snd-hda-codec-analog snd-hda-codec-generic snd-hda-codec snd-hwdep snd-hda-core snd-pcm snd-timer.
Loading ALSA sound driver modules: snd-seq-dummy snd-pcm-oss snd-mixer-oss snd-seq-oss snd-seq-midi-event snd-seq snd-seq-device snd-hda-intel snd-hda-codec-analog snd-hda-codec-generic snd-hda-codec snd-hwdep snd-hda-core snd-pcm snd-timer.

amixer stille gives:

Code: [Select]
amixer: Mixer attach default error: No such file or directory

blacklist.conf:
Code: [Select]
blacklist snd_mixer_oss
blacklist snd_seq_oss
blacklist snd_pcm_oss

I also read about editing the index numbers in the conf file but am unsure if this applies to my issue.

alsa-base.conf:
Code: [Select]
# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7

# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
#
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
#
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
# Cause optional modules to be loaded above sound card driver modules
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }

# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2

Thanks very much for the help, much appreciated.

Offline liam391

  • Newbie
  • *
  • Posts: 8
Re: Getting Alsa / sound working
« Reply #8 on: March 03, 2018, 06:33:57 AM »
Tinycore wiki gives the following advice - this is not available as an sce in dCore I believe but should I take this from Tinycore repos to perform the below?

Code: [Select]
alsaconf when the aplay list is empty

If you downloaded alsa and its in your onboot list and you rebooted, you should have sound devices configured. You may need to adjust the mixers to hear sound. However, if

aplay -l
does not show any devices, then download alsaconf so its also an “onboot” tcz and reboot to retest your sound. If on reboot, no sound devices are detected, then run

sudo alsaconf
and follow the prompts to search and configure your sound device.


Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Getting Alsa / sound working
« Reply #9 on: March 03, 2018, 11:50:31 AM »
You can try the alsaconf script, I will review it and see if it would work with dCore and make adjustments if needed and upload it to the prebuilt section.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Getting Alsa / sound working
« Reply #10 on: March 03, 2018, 09:11:45 PM »
liam391 - just to cover all possibilityes, have you tried the below command?

/etc/init.d/alsa-utils start


Offline liam391

  • Newbie
  • *
  • Posts: 8
Re: Getting Alsa / sound working
« Reply #11 on: March 04, 2018, 03:24:11 PM »
Hi Jason,

Tried the command (and re-starting Alsa then inputting command) but still no joy unfortunately. Thanks for your help anyway.