All of lore.kernel.org
 help / color / mirror / Atom feed
* beep support?
@ 2010-02-02 13:09 Samuel Thibault
  2010-02-02 14:09 ` Felix Zielcke
  0 siblings, 1 reply; 14+ messages in thread
From: Samuel Thibault @ 2010-02-02 13:09 UTC (permalink / raw)
  To: grub-devel

Hello,

Some blind people have asked me about beep support.  I think at some
point there was somebody working on a module to get sound support, but
there isn't such thing in the main grub2 source, only
case '\a': /* FIXME */ break;
...

This is a regression from grub legacy which permited to use the
^G character for blind people to know when the menu is ready for
keypresses.

Samuel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-02 13:09 beep support? Samuel Thibault
@ 2010-02-02 14:09 ` Felix Zielcke
  2010-02-02 16:04   ` Samuel Thibault
  2010-02-02 23:00   ` Samuel Thibault
  0 siblings, 2 replies; 14+ messages in thread
From: Felix Zielcke @ 2010-02-02 14:09 UTC (permalink / raw)
  To: The development of GNU GRUB

Am Dienstag, den 02.02.2010, 14:09 +0100 schrieb Samuel Thibault:
> Hello,
> 
> Some blind people have asked me about beep support.  I think at some
> point there was somebody working on a module to get sound support, but
> there isn't such thing in the main grub2 source, only
> case '\a': /* FIXME */ break;
> ...
> 

There's play command in commands/i386/pc/play.c but I still don't know
what file format it actual plays.

-- 
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-02 14:09 ` Felix Zielcke
@ 2010-02-02 16:04   ` Samuel Thibault
  2010-02-02 23:00   ` Samuel Thibault
  1 sibling, 0 replies; 14+ messages in thread
From: Samuel Thibault @ 2010-02-02 16:04 UTC (permalink / raw)
  To: The development of GNU GRUB

Felix Zielcke, le Tue 02 Feb 2010 15:09:47 +0100, a écrit :
> Am Dienstag, den 02.02.2010, 14:09 +0100 schrieb Samuel Thibault:
> > Some blind people have asked me about beep support.  I think at some
> > point there was somebody working on a module to get sound support, but
> > there isn't such thing in the main grub2 source, only
> > case '\a': /* FIXME */ break;
> > ...
> 
> There's play command in commands/i386/pc/play.c but I still don't know
> what file format it actual plays.

Ah, that's it. Shouldn't the FIXME mentioned above use play?

Samuel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-02 14:09 ` Felix Zielcke
  2010-02-02 16:04   ` Samuel Thibault
@ 2010-02-02 23:00   ` Samuel Thibault
  2010-02-05 16:52     ` Vladimir 'φ-coder/phcoder' Serbinenko
  2010-02-07 21:54     ` Samuel Thibault
  1 sibling, 2 replies; 14+ messages in thread
From: Samuel Thibault @ 2010-02-02 23:00 UTC (permalink / raw)
  To: The development of GNU GRUB

Felix Zielcke, le Tue 02 Feb 2010 15:09:47 +0100, a écrit :
> There's play command in commands/i386/pc/play.c but I still don't know
> what file format it actual plays.

Ok, reading the source code told me how it works.  I'm considering
adding to grub2/util/grub.d/00_header.in a BEEP option that the user can
very easily enable to get a beep at boot, does it seem OK?

Samuel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-02 23:00   ` Samuel Thibault
@ 2010-02-05 16:52     ` Vladimir 'φ-coder/phcoder' Serbinenko
  2010-02-05 18:11       ` Samuel Thibault
  2010-02-07 21:54     ` Samuel Thibault
  1 sibling, 1 reply; 14+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-02-05 16:52 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

Samuel Thibault wrote:
> Felix Zielcke, le Tue 02 Feb 2010 15:09:47 +0100, a écrit :
>   
>> There's play command in commands/i386/pc/play.c but I still don't know
>> what file format it actual plays.
>>     
>
> Ok, reading the source code told me how it works.  I'm considering
> adding to grub2/util/grub.d/00_header.in a BEEP option that the user can
> very easily enable to get a beep at boot, does it seem OK?
>
>   
Yes. Basically putting \a in messages is a wrong approach since such a
character has neither a graphical representation nor it influences
appearence of other characters. Additionally it's unclear what has to be
done when characters around \a are redrawn. Could you detail at which
events beep should be produced and propose a patch to add appropriate hooks?
On the other hand doing a BIOS call with \a is a valid way to produce a beep
> Samuel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-05 16:52     ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-02-05 18:11       ` Samuel Thibault
  2010-02-05 18:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
                           ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Samuel Thibault @ 2010-02-05 18:11 UTC (permalink / raw)
  To: The development of GNU GRUB

Vladimir 'φ-coder/phcoder' Serbinenko, le Fri 05 Feb 2010 17:52:02 +0100, a écrit :
> Could you detail at which events beep should be produced and propose a
> patch to add appropriate hooks?

A beep just when the menu is first drawn is already a good thing and is
trivial to add by just calling play in the main menu.

An additional very useful hook would be when browsing between items:
giving a play file name for each different menu entry for instance.

Samuel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-05 18:11       ` Samuel Thibault
@ 2010-02-05 18:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2010-02-05 18:28           ` Samuel Thibault
  2010-02-05 18:28         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2010-02-14 18:09         ` Samuel Thibault
  2 siblings, 1 reply; 14+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-02-05 18:24 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

Samuel Thibault wrote:
> Vladimir 'φ-coder/phcoder' Serbinenko, le Fri 05 Feb 2010 17:52:02 +0100, a écrit :
>   
>> Could you detail at which events beep should be produced and propose a
>> patch to add appropriate hooks?
>>     
>
> A beep just when the menu is first drawn is already a good thing and is
> trivial to add by just calling play in the main menu.
>
> An additional very useful hook would be when browsing between items:
> giving a play file name for each different menu entry for instance.
>   
What do you think about a syntax like this:
menuentry "blah bla" {
 ...
} onselect {
   play abcd
}
> Samuel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-05 18:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-02-05 18:28           ` Samuel Thibault
  0 siblings, 0 replies; 14+ messages in thread
From: Samuel Thibault @ 2010-02-05 18:28 UTC (permalink / raw)
  To: The development of GNU GRUB

Vladimir 'φ-coder/phcoder' Serbinenko, le Fri 05 Feb 2010 19:24:55 +0100, a écrit :
> What do you think about a syntax like this:
> menuentry "blah bla" {
>  ...
> } onselect {
>    play abcd
> }

Looks fine!

Samuel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-05 18:11       ` Samuel Thibault
  2010-02-05 18:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-02-05 18:28         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2010-02-05 18:35           ` Samuel Thibault
  2010-02-14 18:09         ` Samuel Thibault
  2 siblings, 1 reply; 14+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-02-05 18:28 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

Samuel Thibault wrote:
> Vladimir 'φ-coder/phcoder' Serbinenko, le Fri 05 Feb 2010 17:52:02 +0100, a écrit :
>   
>> Could you detail at which events beep should be produced and propose a
>> patch to add appropriate hooks?
>>     
>
> A beep just when the menu is first drawn is already a good thing and is
> trivial to add by just calling play in the main menu.
>
> An additional very useful hook would be when browsing between items:
> giving a play file name for each different menu entry for instance.
>   
BTW in exp we have:
menuentry "blah blah" --hotkey b {
 ...
}
Then to boot "blah blah" one has just to press 'b'.
> Samuel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-05 18:28         ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-02-05 18:35           ` Samuel Thibault
  0 siblings, 0 replies; 14+ messages in thread
From: Samuel Thibault @ 2010-02-05 18:35 UTC (permalink / raw)
  To: The development of GNU GRUB

Vladimir 'φ-coder/phcoder' Serbinenko, le Fri 05 Feb 2010 19:28:43 +0100, a écrit :
> BTW in exp we have:
> menuentry "blah blah" --hotkey b {
>  ...
> }
> Then to boot "blah blah" one has just to press 'b'.

Good!

I'm wondering however how to integrate that into auto-generated menu
entries. Maybe automatically use the last digit of the kernel version?

Samuel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-02 23:00   ` Samuel Thibault
  2010-02-05 16:52     ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-02-07 21:54     ` Samuel Thibault
  2010-02-14  0:19       ` Samuel Thibault
  1 sibling, 1 reply; 14+ messages in thread
From: Samuel Thibault @ 2010-02-07 21:54 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: subdino2004

Samuel Thibault, le Wed 03 Feb 2010 00:00:43 +0100, a écrit :
> Felix Zielcke, le Tue 02 Feb 2010 15:09:47 +0100, a écrit :
> > There's play command in commands/i386/pc/play.c but I still don't know
> > what file format it actual plays.
> 
> Ok, reading the source code told me how it works.

I'm more and more considering extending the play command a bit: for now
it takes a file name as parameter and plays it. However this is far
from user-friendly, needs to access /boot already, and one typically
just wants to play a few notes, so a separate file seems overkill to
me. It would perhaps be good to be able to use the following two
syntaxes:

play (hd0,1)/boot/grub/melody
or
play 120 440 1

BTW, the tempo part of the play command currently depends on the value
of GRUB_TICKS_PER_SECOND, shouldn't it be independent from it by using
the patch below, so that with a base tempo 60 and a duration 1, one gets
one second?

Samuel

2010-02-07  Samuel Thibault  <samuel.thibault@ens-lyon.org>

        * commands/i386/pc/play.c (BASE_TEMPO): Set to 60 *
        GRUB_TICKS_PER_SECOND.

--- commands/i386/pc/play.c	2010-01-03 22:05:07 +0000
+++ commands/i386/pc/play.c	2010-02-07 21:48:43 +0000
@@ -29,7 +29,7 @@
 #include <grub/command.h>
 #include <grub/i18n.h>
 
-#define BASE_TEMPO 120
+#define BASE_TEMPO (60 * GRUB_TICKS_PER_SECOND)
 
 /* The speaker port.  */
 #define SPEAKER			0x61




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-07 21:54     ` Samuel Thibault
@ 2010-02-14  0:19       ` Samuel Thibault
  0 siblings, 0 replies; 14+ messages in thread
From: Samuel Thibault @ 2010-02-14  0:19 UTC (permalink / raw)
  To: The development of GNU GRUB

Mmm, the subdino2004@yahoo.fr mail address is not working any more.  May
I consider taking over maintainship of the play module?

Samuel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-05 18:11       ` Samuel Thibault
  2010-02-05 18:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
  2010-02-05 18:28         ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2010-02-14 18:09         ` Samuel Thibault
  2010-02-16 12:48           ` Vladimir 'φ-coder/phcoder' Serbinenko
  2 siblings, 1 reply; 14+ messages in thread
From: Samuel Thibault @ 2010-02-14 18:09 UTC (permalink / raw)
  To: The development of GNU GRUB

Samuel Thibault, le Fri 05 Feb 2010 19:11:18 +0100, a écrit :
> Vladimir 'φ-coder/phcoder' Serbinenko, le Fri 05 Feb 2010 17:52:02 +0100, a écrit :
> > Could you detail at which events beep should be produced and propose a
> > patch to add appropriate hooks?
> 
> A beep just when the menu is first drawn is already a good thing and is
> trivial to add by just calling play in the main menu.

Here is a proposed patch.  Is the GRUB_INIT_TUNE variable name Ok?

Samuel

2010-02-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* util/grub-mkconfig.in: Export GRUB_INIT_TUNE.
	* util/grub.d/00_header.in: Handle GRUB_INIT_TUNE.

--- util/grub-mkconfig.in	2010-02-10 18:53:13 +0000
+++ util/grub-mkconfig.in	2010-02-14 18:05:11 +0000
@@ -222,7 +222,8 @@ export GRUB_DEFAULT \
   GRUB_GFXMODE \
   GRUB_THEME \
   GRUB_GFXPAYLOAD_LINUX \
-  GRUB_DISABLE_OS_PROBER
+  GRUB_DISABLE_OS_PROBER \
+  GRUB_INIT_TUNE
 
 if test "x${grub_cfg}" != "x"; then
   rm -f ${grub_cfg}.new

=== modified file 'util/grub.d/00_header.in'
--- util/grub.d/00_header.in	2010-02-03 00:24:07 +0000
+++ util/grub.d/00_header.in	2010-02-14 17:55:04 +0000
@@ -158,3 +158,11 @@ else
 set timeout=${GRUB_TIMEOUT}
 EOF
 fi
+
+# Play an initial tune
+if [ "x${GRUB_INIT_TUNE}" != "x" ] ; then
+  cat << EOF
+insmod play
+play ${GRUB_INIT_TUNE}
+EOF
+fi




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: beep support?
  2010-02-14 18:09         ` Samuel Thibault
@ 2010-02-16 12:48           ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 14+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2010-02-16 12:48 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]

Samuel Thibault wrote:
> Samuel Thibault, le Fri 05 Feb 2010 19:11:18 +0100, a écrit :
>   
>> Vladimir 'φ-coder/phcoder' Serbinenko, le Fri 05 Feb 2010 17:52:02 +0100, a écrit :
>>     
>>> Could you detail at which events beep should be produced and propose a
>>> patch to add appropriate hooks?
>>>       
>> A beep just when the menu is first drawn is already a good thing and is
>> trivial to add by just calling play in the main menu.
>>     
>
> Here is a proposed patch.  Is the GRUB_INIT_TUNE variable name Ok?
>
>   
This is small clean patch and it improves accessibility. Please go ahead.
> Samuel
>
> 2010-02-14  Samuel Thibault  <samuel.thibault@ens-lyon.org>
>
> 	* util/grub-mkconfig.in: Export GRUB_INIT_TUNE.
> 	* util/grub.d/00_header.in: Handle GRUB_INIT_TUNE.
>
> --- util/grub-mkconfig.in	2010-02-10 18:53:13 +0000
> +++ util/grub-mkconfig.in	2010-02-14 18:05:11 +0000
> @@ -222,7 +222,8 @@ export GRUB_DEFAULT \
>    GRUB_GFXMODE \
>    GRUB_THEME \
>    GRUB_GFXPAYLOAD_LINUX \
> -  GRUB_DISABLE_OS_PROBER
> +  GRUB_DISABLE_OS_PROBER \
> +  GRUB_INIT_TUNE
>  
>  if test "x${grub_cfg}" != "x"; then
>    rm -f ${grub_cfg}.new
>
> === modified file 'util/grub.d/00_header.in'
> --- util/grub.d/00_header.in	2010-02-03 00:24:07 +0000
> +++ util/grub.d/00_header.in	2010-02-14 17:55:04 +0000
> @@ -158,3 +158,11 @@ else
>  set timeout=${GRUB_TIMEOUT}
>  EOF
>  fi
> +
> +# Play an initial tune
> +if [ "x${GRUB_INIT_TUNE}" != "x" ] ; then
> +  cat << EOF
> +insmod play
> +play ${GRUB_INIT_TUNE}
> +EOF
> +fi
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-02-16 12:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-02 13:09 beep support? Samuel Thibault
2010-02-02 14:09 ` Felix Zielcke
2010-02-02 16:04   ` Samuel Thibault
2010-02-02 23:00   ` Samuel Thibault
2010-02-05 16:52     ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-02-05 18:11       ` Samuel Thibault
2010-02-05 18:24         ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-02-05 18:28           ` Samuel Thibault
2010-02-05 18:28         ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-02-05 18:35           ` Samuel Thibault
2010-02-14 18:09         ` Samuel Thibault
2010-02-16 12:48           ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-02-07 21:54     ` Samuel Thibault
2010-02-14  0:19       ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.