LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-27-2014, 03:01 PM   #1
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
No beep in the installer.


I want to be able to produce a "beep" sound inside a Slint or Slackware installer, to give a prompt to blind folks using a Braille device (I will ship brltty in the installer).

As the module pcspkr is not shipped by default in Slackware installers, I have added it.

Once the installer has started, "modprobe pcspkr" works (checked with lsmod) but then I don't hear a "beep" when I type:
Code:
echo -e "\a"
What could be wrong?

In the script that customizes the installer, I do this:
Code:
# Install pcspkr modules
for kernel_version in `ls $TMP/initrd/lib/modules`; do
  cp $TARGET/packages/pcspkr.ko $TMP/initrd/lib/modules/$kernel_version
  depmod -a -b $TMP/initrd $kernel_version
done
During the script's execution I get warnings
Code:
depmod: WARNING: could not open /tmp/slint-20141122/initrd/lib/modules/3.10.17/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/slint-20141122/initrd/lib/modules/3.10.17/modules.builtin: No such file or directory
depmod: WARNING: could not open /tmp/slint-20141122/initrd/lib/modules/3.10.17-smp/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/slint-20141122/initrd/lib/modules/3.10.17-smp/modules.builtin: No such file or directory
I assume that doesn't hurt as I can insert the modules, but maybe I'm wrong

EDIT I made another try, this time installing the package kmod in the installer. In the running installer "depmod -a" gave the same kind of warnings as the command in the build script, "modprobe pcspkr" worked again, but 'echo -e "\a"' still produced no sound.

Last edited by Didier Spaier; 11-27-2014 at 03:45 PM. Reason: EDIT added.
 
Old 11-27-2014, 03:41 PM   #2
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
run depmond -a in /tmp/slint-20141122/initrd/lib/modules/3.10.17/ to update its modules depend file.
if you run echo -e "\a" in xterm, make sure visual bell is off.
 
Old 11-27-2014, 03:48 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by number22 View Post
run depmond -a in /tmp/slint-20141122/initrd/lib/modules/3.10.17/ to update its modules depend file.
if you run echo -e "\a" in xterm, make sure visual bell is off.
Thanks for the suggestion. While you wrote I edited my first post: I ran that command in the installer itself (in a tty, no visual bell there), still no luck.

PS I get the beep in an installed Slackware 14.1, so that's not a hardware or BIOS issue.

Last edited by Didier Spaier; 11-27-2014 at 03:53 PM. Reason: PS added
 
Old 11-27-2014, 03:57 PM   #4
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
check your alsamixer, is it muted by alsa?
 
Old 11-27-2014, 04:03 PM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by number22 View Post
check your alsamixer, is it muted by alsa?
No alsa in the installer. Not even the module soundcore.
 
Old 11-27-2014, 04:21 PM   #6
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
setterm -blength 200
setterm -bfreq 760
 
1 members found this post helpful.
Old 11-27-2014, 04:38 PM   #7
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Most modern legacy-free PCs don't have pcspkr support anymore. So even if you achieve a beep on a specific configuration, it most likely won't work on the next machine. My recommandation: Let the installer load sound drivers, then play a waveform through the audio device (cat whatever.au > /dev/audio).
 
1 members found this post helpful.
Old 11-27-2014, 04:39 PM   #8
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
as a backup plan

play -n synth 0.2 tri 760
 
1 members found this post helpful.
Old 11-27-2014, 04:47 PM   #9
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by genss View Post
play -n synth 0.2 tri 760
That needs sox in the installer image.
 
1 members found this post helpful.
Old 11-27-2014, 05:25 PM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Original Poster
Rep: Reputation: Disabled
Progress report: at first this command didn't help:
Code:
setterm -blength 200 -bfreq 760
But then I realized that I was in a framebuffer drawn by fbterm (/dev/pts/0). Doing the same after going back to a plain Linux tty typing "exit" worked. That's good enough as long as there is a support for pcspkr, as anyway I know that brltty doesn't work in a framebuffer if drawn by a userland console drawer like fbterm. So thanks number22 for the tip. At least I won't have to install kmod in the installer. That's not heavy, but still (at second thought I'll still need modprobe, maybe).

But I think that, as jtsn suggested, I should play a sound through the sound card in addition. I will try that tomorrow (I will need to add the modules in the installer) and will report the outcome.

PS I will try not to use sox, as according to ldd the binary has a lot of dependencies not shipped in the installer.

PPS Actually, as long as a regular tty is in use the setterm command is not even necessary. Oh, well...

Last edited by Didier Spaier; 11-27-2014 at 09:51 PM. Reason: PPS added.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash Videos beep-beep-beep Audio Quantumstate Linux - Desktop 1 07-24-2011 08:57 AM
beep, beep ... waring on java code thuan1975 Linux - Software 0 01-24-2011 01:27 AM
LXer: beep-beep from Brazil! LXer Syndicated Linux News 0 11-11-2010 08:00 PM
Debian goes Beep Beep? SuperDude123 Linux - Newbie 3 12-20-2009 02:49 AM
How to disable the warning sound "beep, beep" ICO Red Hat 1 04-04-2006 01:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration