WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TCL on Pentium MMX 64 MB RAM: Sound doesn't work  (Read 7639 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #15 on: March 22, 2013, 02:46:20 AM »
Ah, yes, I was focused on the boot code, and your statement in reply #3 is equally valid regardless of swap file or partition.

However, in first post oom-killer already reports "Total swap = 0kB", so there was definitely no swap on there either.

EDIT:
Therefore it has not beyond a doubt been excluded that alsa could actually be loaded, if sufficient swap would be available.
I think it might be a good strategy to boot with as little as possible loaded onboot, and then trying to load alsa after first verifying free memory (including swap!).
« Last Edit: March 22, 2013, 03:06:40 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #16 on: March 22, 2013, 11:39:54 AM »
@aus9

The 2005 stands for the OSS build number (svn/hg revision or similar), not the year.
The only barriers that can stop you are the ones you create yourself.

aus9

  • Guest
Re: TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #17 on: March 22, 2013, 07:32:28 PM »
aaah

Offline DanielH

  • Newbie
  • *
  • Posts: 36
(SOLVED) TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #18 on: March 25, 2013, 12:22:15 AM »
Dear "tinycorers":

I have the pleasure to say THANK YOU!!! SOLVED!!!!
Following your indications and suggested procedures:

First: Cleaning my bootcodes.
a)
Deleted swapfile=sda2 (thanks, Rich!), my mistake; I did not know that swapfile is a "quasi-normal" file in a working partition (type 83), not a pointer to swap partition (type 82).
BTW, deleting this code was not enough, TCL doesn't autodetect my swap partition on reboot. WTF?
Well, doing sudo mkswap /dev/sda2 and then reboot, all is OK.
Mi first swap partition was made by Gparted Live CD... Gparted'd swap is not equal to mkswap'd swap????
b)
Deleted unnecesary bootcodes (thanks aus9): waitusb=5:UUID="ebf86d9e-bbde-46ac-9c59-4ba91891b05d" tce=UUID="ebf86d9e-bbde-46ac-9c59-4ba91891b05d"

My present bootcodes:
initrd=/tce/boot/core.gz nozswap xsetup kmap=/qwerty/es norestore noicons showapps tce=sda1 opt=sda1 home=sda1 BOOT_IMAGE=/tce/boot/vmlinuz
Booting in 62 seconds(!!!), including xsetup: Xvesa resolution setup and Mouse setup (I have a 2 button serial mouse).

Second: Deleting cups.tcz and OSS.tcz as onboot items (thanks, tinypoodle!).

Third: Uninstalling OSS.tcz and downloading alsa.tcz to fit with my old spec machine (thanks, curaga).
aus9: Thanks, but I have not enough knowledge to try your ISA apps. May be in the future...

Fourth: running alsa ...with some troubles, see below:

tc@box:~$ tce-load -i alsa.tcz
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.21-tinycore.tcz: OK
v4l-dvb-3.0.21-tinycore.tcz: OK
input-joystick-3.0.21-tinycore.tcz: OK
alsa-modules-3.0.21-tinycore.tcz: OK
alsa.tcz: OK

tc@box:~$ lsmod
Module                  Size  Used by    Not tainted
i2c_sis5595            12288  0
i2c_sis630             12288  0
acpi_cpufreq           12288  0
mperf                  12288  1 acpi_cpufreq
cpufreq_userspace      12288  0
cpufreq_conservative    12288  0
cpufreq_powersave      12288  0
cpufreq_stats          12288  0
squashfs               24576 18
3c59x                  28672  0
pcspkr                 12288  0
scsi_wait_scan         12288  0
loop                   16384 36

Loaded in 185 seconds... too slow...  :(    Ooops, I have a Pentium MMX 64 MB RAM, I must not forget that!

tc@box:~$ alsamixer
Nothing happens...
Now what???

tc@box:~$ sudo modprobe kernel.tclocal/sound/pci/ca0106/snd-sbawe.ko.gz

tc@box:~$ lsmod
Module                  Size  Used by    Not tainted
snd_sbawe              24576  0
snd_opl3_lib           12288  1 snd_sbawe
snd_sb16_dsp           12288  1 snd_sbawe
snd_sb16_csp           16384  1 snd_sbawe
snd_sb_common          12288  3 snd_sbawe,snd_sb16_dsp,snd_sb16_csp
snd_hwdep              12288  2 snd_opl3_lib,snd_sb16_csp
snd_mpu401_uart        12288  1 snd_sbawe
snd_rawmidi            16384  1 snd_mpu401_uart
snd_seq_device         12288  3 snd_sbawe,snd_opl3_lib,snd_rawmidi
snd_pcm                45056  2 snd_sbawe,snd_sb16_dsp
snd_timer              20480  2 snd_opl3_lib,snd_pcm
snd                    32768 11 snd_sbawe,snd_opl3_lib,snd_sb16_dsp,snd_sb16_csp,snd_sb_common,snd_hwdep,snd_mpu401_uart,snd_rawmidi,snd_seq_device,snd_pcm,snd_timer
soundcore              12288  1 snd
snd_page_alloc         12288  1 snd_pcm
i2c_sis5595            12288  0
i2c_sis630             12288  0
acpi_cpufreq           12288  0
mperf                  12288  1 acpi_cpufreq
cpufreq_userspace      12288  0
cpufreq_conservative    12288  0
cpufreq_powersave      12288  0
cpufreq_stats          12288  0
squashfs               24576 20
3c59x                  28672  0
pcspkr                 12288  0
scsi_wait_scan         12288  0
loop                   16384 40

tc@box:~$ alsamixer
OK; setting values (a lot of them!) ---->

tc@box:~$ speaker-test -c2 -t sine -f 440 -l 2

speaker-test 1.0.24.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 440.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 17 to 8916
Period size range from 17 to 8917
Using max buffer size 8916
Periods = 4
was set period_size = 1783
was set buffer_size = 8916
 0 - Front Left
 1 - Front Right
Time per period = 5.822118
 0 - Front Left
 1 - Front Right
Time per period = 5.945717

OOOMMMMMMM!!! I hear! I hear!
Running XMMS, playing an audio CD: OK!!!!

My questions:
1. How to load alsa and ALL needed modules for my sound card with one and only one command? I'm not experienced in script programming.
2. Is possible to run alsa.tcz as an ondemand item? I've tried, but without results.

Pending:
a) To test all sound apps (flrec, cdplay (CLI), xine or another video player...
b) To configure cups and xsane, with a little help from my friends: I haven't parallel (lead/cable/connector) printer nor parallel (lead/cable/connector) scanner to test these apps..
And yes, Mr. aus9, I use google translate to help me in my posts (not all, but...). I apologize for my bad english... twice.

Last but not least:
I will show this low spec machine running TCL, next april 27 in FLISoL "Festival Latinoamericano de Instalacion de Software Libre" (Latin American Free Software Installation Festival) www.flisol.info
FLISoL will be organized in my city Mar del Plata, Argentina, by a local LUG gulBAC "grupo de usuarios de linux Buenos Aires Central" www.gulbac.org.ar .
In gulBAC there are "debianists", "ubunters", "fedorians", "archers", but at this moment there is one and only one "tinycorer" (me, bah, but for production I use Debian or LMDE and graphical apps like Qelectrotech, LibreCAD, FreeCAD, etc.).
I will post more information... Seeing soon...

aus9

  • Guest
Re: TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #19 on: March 25, 2013, 02:07:15 AM »
hi

we have eliminated isapnptools as that is for OSS and you are now on ALSA

I suggest you run apps and remove alsa from onboot or ondemand and we start it with a script, as an attachement, I am a simple coder so show the code as well
Code: [Select]
#!/bin/sh
tce-load -i alsa
sudo modprobe snd-sbawe
/usr/local/sbin/alsactl -f /opt/asound.state restore

Now copy the attachement into /home/tc/.local/bin and make it executable with
Code: [Select]
chmod 755 .local/bin/sound.sh

(next is results of running it, the command called sound.sh)
sound.sh


alsa-config.tcz: OK
v4l-dvb-3.0.21-tinycore.tcz: OK
input-joystick-3.0.21-tinycore.tcz: OK
alsa-modules-3.0.21-tinycore.tcz: OK
alsa.tcz: OK

2) I assume you need to save mixer levels. Now you can run the script as is, but if mixer levels are wrong we will save your CHANGED settings somewhere persistent, I like /opt as its a system file, that  you are saving

so
Code: [Select]
alsamixer
(make changes, then save changes with)
sudo alsactl -f /opt/asound.state store

You only need to do this saving once. Now I suggest you reboot and try out sound.sh to see if its what you thought. Naturally you can add command line player to load etc as its your script and as its under your name, you can easily edit. Thanks Rich for alerting me to this function.

so if you need to add tczs the line will look like

tce-load -i alsa  app1  app2 app3 (etc)

good luck

3) If you can't resolve your printer or scanner issues please start a new post ok?
« Last Edit: March 25, 2013, 02:17:04 AM by aus9 »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: (SOLVED) TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #20 on: March 25, 2013, 06:35:16 AM »
I did not know that swapfile is a "quasi-normal" file in a working partition (type 83)

Partition type is irrelevant for swapfiles.

Code: [Select]
initrd=/tce/boot/core.gz nozswap xsetup kmap=/qwerty/es norestore noicons showapps tce=sda1 opt=sda1 home=sda1 BOOT_IMAGE=/tce/boot/vmlinuz
"xsetup" should not be permanently needed.

Quote
tc@box:~$ tce-load -i alsa.tcz
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.21-tinycore.tcz: OK
v4l-dvb-3.0.21-tinycore.tcz: OK
input-joystick-3.0.21-tinycore.tcz: OK
alsa-modules-3.0.21-tinycore.tcz: OK
alsa.tcz: OK

tc@box:~$ lsmod
Module                  Size  Used by    Not tainted
i2c_sis5595            12288  0
i2c_sis630             12288  0
acpi_cpufreq           12288  0
mperf                  12288  1 acpi_cpufreq
cpufreq_userspace      12288  0
cpufreq_conservative    12288  0
cpufreq_powersave      12288  0
cpufreq_stats          12288  0
squashfs               24576 18
3c59x                  28672  0
pcspkr                 12288  0
scsi_wait_scan         12288  0
loop                   16384 36

Loaded in 185 seconds... too slow...  :(    Ooops, I have a Pentium MMX 64 MB RAM, I must not forget that!

Using script already mentioned in Reply #12 might possibly improve that.

Quote
Pending:
a) To test all sound apps (flrec, cdplay (CLI), xine or another video player...

If memory serves me right, memory usage of xine might be overkill for your specs, mplayer would possibly use a friction of the memory that xine does.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #21 on: March 31, 2013, 08:20:06 PM »
Thank you, again!
All is iluminated.

aus9:

Following your suggests: sound.sh

#!/bin/sh
tce-load -i alsa
sudo modprobe snd-sbawe
alsamixer -c 0 -V all

Why alsamixer? Because each sound app needs its own mixer levels, plus mic/line-in setup (e.g. flrec).
Think about: this machine will be used to show TCL running on "low tech", I will call sound.sh eventually (about 3 minutes to load alsa and
snd-sbawe modules, alsamixer only adds 2 seconds to load and run!!).

tinypoodle:

You're right:

1)
xsetup bootcode isn't permanently needed. It saves resolution, mouse type and port in .xsession. Deleted...

2)
Replaced: xine out (uninstalled), MPlayer-svn-gtk1 in (installed an running).

-----------------------------------------------------------------------------

My next post is on multi-user setup (users, groups, passords), I've found a mistake in wiki page (Tiny Core passwords).
See you later...

aus9

  • Guest
Re: TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #22 on: March 31, 2013, 08:39:50 PM »
If you have 2 mixer settings then

first time you run alsamixer
Code: [Select]
alsamixer -c0 -V all
(make settings)
alsactl -f /opt/nomic.state store
(make alsamixer settings different from above)
alsactl -f /opt/mic.state store

if that second sound device is appearing then have a bootcode to blacklist its sound module

Now you will need 2 sound scripts

if you want mic off....call it nomic.sh....it does not matter if both have mic on, call each script something you can remember
#!/bin/sh
tce-load -i alsa
sudo modprobe snd-sbawe
alsactl -f /opt/nomic.state restore

and mic
#!/bin/sh
tce-load -i alsa
sudo modprobe snd-sbawe
alsactl -f /opt/mic.state restore

and remember to
Code: [Select]
cd /home/tc/.local/bin
chmod 755 * 

good luck
« Last Edit: March 31, 2013, 10:07:46 PM by aus9 »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #23 on: March 31, 2013, 09:06:49 PM »
#!/bin/sh
tce-load -i alsa
sudo modprobe snd-sbawe
alsamixer -c 0 -V all

Better change last line to:
Code: [Select]
aterm -e alsamixer -c 0 -V all &
for cases of invoking it in non-interactive mode.

Quote
about 3 minutes to load alsa and
snd-sbawe modules, alsamixer only adds 2 seconds to load and run!!

You are stressing that time again, but seem to ignore suggestion of how to potentially improve significantly...
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #24 on: April 02, 2013, 12:00:24 PM »
Dear "tinycoresrs":

I'm affraid that my bad english makes me harder to express my point of view. I'm sorry...

aus9:
1)
I think I don't need two sound scripts, since I wish to run alsamixer in interactive mode when I load alsa.tcz by script.
2)
I don't have a second mixer, -c 0 option in alsamixer call is to secure pointing to my sound card (SoundBlaster AWE64), it seems that "default" sometime is not pointing it.

tinypoodle:

I'm not ignoring your help, perhaps I don't understand completely your suggestions (I'm newbie and have a lot to learn).

1)
About http://forum.tinycorelinux.net/index.php/topic,9028.0.html: Local initramfs generation script (stripping unneeded modules)
I've read that page, but seems not to be applicable to my system: this script rebuilds initramfs and the optimized initramfs only includes the modules that are loaded at this moment.
Quote: "that means you cannot easily change the modules you generated with this type of local initramfs, be aware of that!"

I'm installing TCL in this low spech machine to learn (about TC, GNU/Linux and related stuff, I'm so newbie), and to show it in FLISoL next March 27.
I wish to keep my system as open and flexible as originally installed in PPR mode, with minimum changes needed to run apps.
The "optimized" initramfs will make difficult to easily upload other modules needed to run new applications in the future...

Freeing RAM:
I prefer to load .scm apps: to memory freeing is more easy to unload one mounted loop when a .scm app is closed (.tcz apps mounts one loop per each dep, isn't it?).
BTW: Is there a script to automatically unmount unneeded loops when a .tcz or a .scm app is closed, running TCL in PPR mode?

2)
About Links2: thanks you, I've used the Flush all caches menu. It improves the memory usage, but not so much (I haven't too many pages opened simultaneously).
BTW: now I'm using dillo3, reserving Links2 to https pages. dillo3 hasn't https and SSL support, but shows images and page styles much better than Links2...

3)
About alsa: I'm running alsa from a script sound.sh, it takes 3' 10" to run (including alsamixer showing all levers, always in interactive mode for my purposes).
Next steps: 1) make a context menu to run sound.sh; 2) ENJOY SOUND!!!!

Thank you again, and forgive me for my bad english...

Best regards,
DanielH

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #25 on: April 02, 2013, 12:38:59 PM »
WRT this remaster script:
If I understand right, it discards unused modules in base and in extensions from which certain modules are inserted at time of running it.
This should only restrict loading any of those discarded modules, but not modules from extensions of which no modules were inserted at time of remastering.

alsa takes time to load even on faster machines than yours, and a big part of that is due to module extensions being pulled in as deps; therefore my estimation would be that you could save a lot of time plus some resources.

If just before remastering you manually modprobe all modules from base and loaded extensions which are possibly compatible with your hardware - this is actually what I do myself - then there shouldn't be any restrictions when running same initramfs with same hardware.

An advantage of links2 is that when memory is tight, one could run it in graphics mode on a framebuffer console and thus freeing resources from being used by an X server.

"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: (SOLVED) TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #26 on: April 02, 2013, 12:53:24 PM »
Also:

acpi_cpufreq           12288  0
mperf                  12288  1 acpi_cpufreq
cpufreq_userspace      12288  0
cpufreq_conservative    12288  0
cpufreq_powersave      12288  0
cpufreq_stats          12288  0

I would be rather surprised if a Pentium MMX could ever do cpu frequency scaling and even more so if it could ever use the acpi_cpufreq module, so you might save some resources by running "modprobe -r" on those  ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

aus9

  • Guest
Re: TCL on Pentium MMX 64 MB RAM: Sound doesn't work
« Reply #27 on: April 02, 2013, 07:53:26 PM »
Quote
(SoundBlaster AWE64), it seems that "default" sometime is not pointing it

then add a sleep after loading the module and before you set your mixer levels. As you have a low spec machine, I should have spotted this before.
I know you have only one sound card, I am trying to help you.

If you start up alsamixer in interactive mode you are wasting your time. sorry if that sounds rude. Its smarter to start up your only sound device with mixer settings ONE or mixer settings TWO, got it? Your choice.

so one script might be

#!/bin/sh
tce-load -i alsa
sudo modprobe snd-sbawe
/bin/sleep 3
alsactl -f /opt/mic.state restore

good luck

(2) If you chose interactive mode because you need more than 2 mixer level settings, there is no limit how many scripts you create to handle that ok