WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] alsa.tcz: possible bug  (Read 4534 times)

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
[SOLVED] alsa.tcz: possible bug
« on: March 03, 2012, 01:23:00 AM »
Is there any reason to tce.installed script from alsa.tcz does not use depmod?

Right now, if we load alsa.tcz and run /usr/local/etc/init.d/alsasound start modules are not loaded and 'no such file' error raises.
« Last Edit: March 03, 2012, 03:16:26 PM by AmatCoder »

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: alsa.tcz: possible bug
« Reply #1 on: March 03, 2012, 04:40:06 AM »
depmod is run any time that kernel module extensions are loaded.  And depmod.tcz gets loaded as it is needed by alsa-modules-`uname -r`-tinycore.tcz.  It works fine here.

Did you use the appbrowser or t"ce-load -iw alsa.tcz", or did you download alsa.tcz manually?

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: alsa.tcz: possible bug
« Reply #2 on: March 03, 2012, 08:38:17 AM »
Thanks for reply. Consider the following sequence:

Code: [Select]
tc@box:~$ tce-load -i alsa
depmod.tcz: OK
alsa-config.tcz: OK
ncurses-common.tcz: OK
ncurses.tcz: OK
libpci.tcz: OK
pci-utils.tcz: OK
libasound.tcz: OK
i2c-3.0.3-tinycore.tcz: OK
v4l-dvb-3.0.3-tinycore.tcz: OK
input-joystick-3.0.3-tinycore.tcz: OK
alsa-modules-3.0.3-tinycore.tcz: OK
alsa.tcz: OK
tc@box:~$ sudo /usr/local/etc/init.d/alsasound start
amixer: Mixer attach default error: No such file or directory
Something went wrong, sound was not set up.
tc@box:~$ sudo depmod -a
tc@box:~$ sudo /usr/local/etc/init.d/alsasound start
Starting sound driver: snd-intel8x0 
tc@box:~$


1) I load alsa with tce-load -i alsa
2) I try alsasound script. Failed:
    amixer: Mixer attach default error: No such file or directory
    Something went wrong, sound was not set up.

3) I made depmod -a manually.
4) I repeat alsasound script. Now it is working:
     Starting sound driver: snd-intel8x0



Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: alsa.tcz: possible bug
« Reply #3 on: March 03, 2012, 11:46:51 AM »
Ok, I will add depmod to the /usr/local/tce.installed/alsa startup script, apparently the current setup works for some or most and not for others.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: alsa.tcz: possible bug
« Reply #4 on: March 03, 2012, 11:49:02 AM »
I wonder if the module detection's broken? AmatCoder, could you try instead of depmod and the startup script to run "modprobe snd-intel8x0" after loading alsa?
The only barriers that can stop you are the ones you create yourself.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: alsa.tcz: possible bug
« Reply #5 on: March 03, 2012, 11:58:27 AM »
I will take another look at the alsasound script and make sure it is still working as expected.

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: alsa.tcz: possible bug
« Reply #6 on: March 03, 2012, 01:30:35 PM »
I wonder if the module detection's broken? AmatCoder, could you try instead of depmod and the startup script to run "modprobe snd-intel8x0" after loading alsa?
If I try "modprobe snd-intel8x0" after loading alsa.tzc nothing happens...No sound and nothing into dmesg.

Let me put some dmesg logs here:

1) "tce-load -i alsa"
Code: [Select]
intel_rng: FWH not detected
Intel ICH 0000:00:1f.5: PCI INT B -> GSI 17 (level, low) -> IRQ 17
Intel ICH 0000:00:1f.5: setting latency timer to 64
intel_rng: FWH not detected
intel8x0_measure_ac97_clock: measured 51690 usecs (2491 samples)
intel8x0: clocking to 48000

2) "sudo modprobe snd-intel8x0" <- nothing is added to log.

3) "sudo /usr/local/etc/init.d/alsasound start" <- Error *No such file or directory*
Code: [Select]
Intel ICH 0000:00:1f.5: PCI INT B disabled
isa cs4231.0: please specify port
isa sb8.0: please specify irq
no AD1816A based soundcards found.
no Avance Logic based soundcards found

4) "sudo depmod -a" <- nothing is added to log.

5) "sudo /usr/local/etc/init.d/alsasound start" <- Now working
Code: [Select]
Intel ICH 0000:00:1f.5: PCI INT B -> GSI 17 (level, low) -> IRQ 17
Intel ICH 0000:00:1f.5: setting latency timer to 64
intel8x0_measure_ac97_clock: measured 53227 usecs (2565 samples)
intel8x0: clocking to 48000


Ok, I will add depmod to the /usr/local/tce.installed/alsa startup script, apparently the current setup works for some or most and not for others.

I think that some people load alsaconf.tcz in conjunction with (or instead of) alsa.tcz...That works because tce.intalled script from alsaconf.tcz has "depmod -a" command into.

Thanks to you both for your replies.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: alsa.tcz: possible bug
« Reply #7 on: March 03, 2012, 01:48:07 PM »
depmod -a is added to alsa.tcz tce.installed script, it can't hurt.

Update alsa.tcz and see if that makes the init.d/alsasound script work.

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: alsa.tcz: possible bug
« Reply #8 on: March 03, 2012, 03:15:24 PM »
I have downloaded new alsa.tcz (manually, update via appsaudit seems not working right now...) and it is working fine now.
Code: [Select]
tc@box:~$ tce-load -i alsa
depmod.tcz: OK
alsa-config.tcz: OK
ncurses-common.tcz: OK
ncurses.tcz: OK
libpci.tcz: OK
pci-utils.tcz: OK
libasound.tcz: OK
i2c-3.0.3-tinycore.tcz: OK
v4l-dvb-3.0.3-tinycore.tcz: OK
input-joystick-3.0.3-tinycore.tcz: OK
alsa-modules-3.0.3-tinycore.tcz: OK
alsa.tcz: OK
tc@box:~$ sudo /usr/local/etc/init.d/alsasound start
Starting sound driver: snd-intel8x0 
tc@box:~$

Just one last question: Have you considered the possibility of running alsasound script from tce.installed? So alsa would be automagically initialized when loading, like OSS...

Regards and thanks for your hard work with TC.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: [SOLVED] alsa.tcz: possible bug
« Reply #9 on: March 03, 2012, 03:58:22 PM »
Glad it works now.

But to run alsasound automatically would perhaps not be wanted by those who have to run alsaconf to get the desired results.  And many who have newer hardware don't have to run alsasound at all, alsa.tcz just works for them.

So given that, it is best left to be run by those who need it, manually or from /opt/bootlocal.sh.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: [SOLVED] alsa.tcz: possible bug
« Reply #10 on: March 03, 2012, 11:14:49 PM »
Thanks for testing. The module detection's fine, it's the fact that alsasound required GNU depmod to have run.
The only barriers that can stop you are the ones you create yourself.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: [SOLVED] alsa.tcz: possible bug
« Reply #11 on: March 10, 2012, 05:27:28 AM »
hmm, not sure if it occurred in this update or not, but:
Code: [Select]
$ cat /usr/local/etc/udev/rules.d/90-alsa-restore.rules
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS=="card*", \
        RUN+="/usr/sbin/alsactl restore $attr{number}"

alsactl is in /usr/local/sbin

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: [SOLVED] alsa.tcz: possible bug
« Reply #12 on: March 10, 2012, 06:06:01 AM »
Fixed and uploaded the rules file.