[lfs-support] Sounding a beep when building LFS.

Paul Rogers paulgrogers at fastmail.fm
Fri Sep 18 10:22:52 PDT 2015

>On 09/17/2015 03:22 PM, Paul Rogers wrote:
>>> I've tried snd-pcsp, snd_dummy, and a beep utility without success. I'm
>>> probably missing something simple.  How can I sound a beep when building
>>> LFS with alsa enabled?
>>> Playing a sound file with mpg123 would be an acceptable alternative,
>>> which I do when building BLFS.  But how when I'm building LFS?  I've
>>> tried linking host programs with no success.
>> aplay?
>> if [ $? -eq 0 ]
>>   then
>>     aplay "happytune.au"
>>   else
>>     aplay "braaak.au"
>> fi
>Yes, but how do I do that when logged in as LFS.  I receive:
>ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
>ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver >returned error: No such file or directory
>ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
>ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned >error: No such file or directory
>ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
>ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned >error: No such file or directory
>ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
>ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
>aplay: main:722: audio open error: No such file or directory

It's not configured.

Like Ken says, you have to remember in the chroot the host still owns
the hardware.  I think you said ALSA was in the host environment.  Is it
working there?  Have you got all the mounts right?  And as much trouble
as it might cause, you probably can't run alsaconf for the chroot
environment without root priveleges, at least for the moment.  Don't
know, I've always done it from root, on that expectation, and never in
the chroot.  Anyway, this is way too complicated just to get a beep!

>If I can fix that problem with aplay it seems I could use the same logic and
>use mpg123.

Why?  You've just installed ALSA with something of its own that works,
don't muddy the waters trying to get something else to play nicely!

Paul Rogers
paulgrogers at fastmail.fm
Rogers' Second Law: "Everything you do communicates."
(I do not personally endorse any additions after this line. TANSTAAFL


http://www.fastmail.com - mmm... Fastmail...

More information about the lfs-support mailing list