* Re: [Pkg-alsa-devel] Bug#450805: alsa-tools-gui: hdspmixer initializes only first Hammerfall DSP card
[not found] <1194740278.31914.387158@goedel.fjf.gnu.de>
@ 2007-11-13 18:56 ` Elimar Riesebieter
2007-11-14 8:12 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Elimar Riesebieter @ 2007-11-13 18:56 UTC (permalink / raw)
To: Frank Heckenbach, 450805; +Cc: alsa-devel, control
forwarded 450805 alsa-devel@alsa-project.org
tags 450805 pending patch
Thanks
Hi ALSA developers,
does it make sense to apply the patch to HEAD? I don't have a
Hammerfall handy and can not test it.
Thanks for cooperation.
Elimar
On Sun, 11 Nov 2007 the mental interface of
Frank Heckenbach told:
Package: alsa-tools-gui
Version: 1.0.13-1
Severity: normal
Tags: patch
We are using Hammerfall DSP cards. After booting, their audio output
remains silent until hdspmixer is started. No interaction in the GUI
of hdspmixer is necessary to unmute the first HDSP card; however,
further cards are only unmuted when activating the respective GUI
page ("2", "3"). Apparently, hdspmixer does some automatic
initialization of the card when activating the page.
Since we'd like to have a fully automatic startup, the following
patch activates the page for each existing card on startup, thereby
initializing them. There are surely more elegant solutions, but this
patch is tested and solves the problem for us.
--- alsa-tools-1.0.13/hdspmixer/src/HDSPMixerCardSelector.h.orig 2007-04-16 19:49:22.000000000 +0200
+++ alsa-tools-1.0.13/hdspmixer/src/HDSPMixerCardSelector.h 2007-04-16 19:50:51.000000000 +0200
@@ -37,6 +37,7 @@
int card;
HDSPMixerWindow *basew;
HDSPMixerCardSelector(int x, int y, int w, int h, int card);
+ void ActivateCard (int i);
void draw();
int handle(int e);
};
--- alsa-tools-1.0.13/hdspmixer/src/HDSPMixerCardSelector.cxx.orig 2007-04-16 19:49:23.000000000 +0200
+++ alsa-tools-1.0.13/hdspmixer/src/HDSPMixerCardSelector.cxx 2007-04-16 19:53:45.000000000 +0200
@@ -45,27 +45,25 @@
}
}
+void HDSPMixerCardSelector::ActivateCard (int i)
+{
+ card = i + 1;
+ basew->current_card = i;
+ basew->cards[i]->setMode (basew->cards[i]->getSpeed ());
+ redraw ();
+}
+
int HDSPMixerCardSelector::handle(int e)
{
int xpos = Fl::event_x()-x();
switch (e) {
case FL_PUSH:
- if (xpos < 13 && card != 1) {
- card = 1;
- basew->current_card = 0;
- basew->cards[0]->setMode(basew->cards[0]->getSpeed());
- redraw();
- } else if (xpos >= 24 && xpos < 37 && card != 2 && basew->cards[1] != NULL) {
- card = 2;
- basew->current_card = 1;
- basew->cards[1]->setMode(basew->cards[1]->getSpeed());
- redraw();
- } else if (xpos >= 48 && card != 3 && basew->cards[2] != NULL) {
- card = 3;
- basew->current_card = 2;
- basew->cards[2]->setMode(basew->cards[2]->getSpeed());
- redraw();
- }
+ if (xpos < 13 && card != 1)
+ ActivateCard (0);
+ else if (xpos >= 24 && xpos < 37 && card != 2 && basew->cards[1] != NULL)
+ ActivateCard (1);
+ else if (xpos >= 48 && card != 3 && basew->cards[2] != NULL)
+ ActivateCard (2);
return 1;
default:
return Fl_Widget::handle(e);
--- alsa-tools-1.0.13/hdspmixer/src/HDSPMixerWindow.cxx.orig 2007-04-16 19:41:21.000000000 +0200
+++ alsa-tools-1.0.13/hdspmixer/src/HDSPMixerWindow.cxx 2007-04-16 19:55:13.000000000 +0200
@@ -700,6 +701,9 @@
Fl::atclose = atclose_cb;
Fl::add_handler(handler_cb);
Fl::add_timeout(0.030, readregisters_cb, this);
+ i = 0;
+ while (cards[i] != NULL)
+ inputs->buttons->cardselector->ActivateCard (i++);
}
int HDSPMixerWindow::handle(int e)
--
Experience is something you don't get until
just after you need it!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Pkg-alsa-devel] Bug#450805: alsa-tools-gui: hdspmixer initializes only first Hammerfall DSP card
2007-11-13 18:56 ` [Pkg-alsa-devel] Bug#450805: alsa-tools-gui: hdspmixer initializes only first Hammerfall DSP card Elimar Riesebieter
@ 2007-11-14 8:12 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2007-11-14 8:12 UTC (permalink / raw)
To: Elimar Riesebieter; +Cc: alsa-devel, 450805, Frank Heckenbach, control
At Tue, 13 Nov 2007 19:56:00 +0100,
Elimar Riesebieter wrote:
>
> forwarded 450805 alsa-devel@alsa-project.org
> tags 450805 pending patch
Yes, the patch looks useful. Now applied to ALSA HG tree.
Thanks!
Takashi
>
> Thanks
>
> Hi ALSA developers,
>
> does it make sense to apply the patch to HEAD? I don't have a
> Hammerfall handy and can not test it.
>
> Thanks for cooperation.
>
> Elimar
>
>
> On Sun, 11 Nov 2007 the mental interface of
> Frank Heckenbach told:
>
> Package: alsa-tools-gui
> Version: 1.0.13-1
> Severity: normal
> Tags: patch
>
>
> We are using Hammerfall DSP cards. After booting, their audio output
> remains silent until hdspmixer is started. No interaction in the GUI
> of hdspmixer is necessary to unmute the first HDSP card; however,
> further cards are only unmuted when activating the respective GUI
> page ("2", "3"). Apparently, hdspmixer does some automatic
> initialization of the card when activating the page.
>
> Since we'd like to have a fully automatic startup, the following
> patch activates the page for each existing card on startup, thereby
> initializing them. There are surely more elegant solutions, but this
> patch is tested and solves the problem for us.
>
> --- alsa-tools-1.0.13/hdspmixer/src/HDSPMixerCardSelector.h.orig 2007-04-16 19:49:22.000000000 +0200
> +++ alsa-tools-1.0.13/hdspmixer/src/HDSPMixerCardSelector.h 2007-04-16 19:50:51.000000000 +0200
> @@ -37,6 +37,7 @@
> int card;
> HDSPMixerWindow *basew;
> HDSPMixerCardSelector(int x, int y, int w, int h, int card);
> + void ActivateCard (int i);
> void draw();
> int handle(int e);
> };
> --- alsa-tools-1.0.13/hdspmixer/src/HDSPMixerCardSelector.cxx.orig 2007-04-16 19:49:23.000000000 +0200
> +++ alsa-tools-1.0.13/hdspmixer/src/HDSPMixerCardSelector.cxx 2007-04-16 19:53:45.000000000 +0200
> @@ -45,27 +45,25 @@
> }
> }
>
> +void HDSPMixerCardSelector::ActivateCard (int i)
> +{
> + card = i + 1;
> + basew->current_card = i;
> + basew->cards[i]->setMode (basew->cards[i]->getSpeed ());
> + redraw ();
> +}
> +
> int HDSPMixerCardSelector::handle(int e)
> {
> int xpos = Fl::event_x()-x();
> switch (e) {
> case FL_PUSH:
> - if (xpos < 13 && card != 1) {
> - card = 1;
> - basew->current_card = 0;
> - basew->cards[0]->setMode(basew->cards[0]->getSpeed());
> - redraw();
> - } else if (xpos >= 24 && xpos < 37 && card != 2 && basew->cards[1] != NULL) {
> - card = 2;
> - basew->current_card = 1;
> - basew->cards[1]->setMode(basew->cards[1]->getSpeed());
> - redraw();
> - } else if (xpos >= 48 && card != 3 && basew->cards[2] != NULL) {
> - card = 3;
> - basew->current_card = 2;
> - basew->cards[2]->setMode(basew->cards[2]->getSpeed());
> - redraw();
> - }
> + if (xpos < 13 && card != 1)
> + ActivateCard (0);
> + else if (xpos >= 24 && xpos < 37 && card != 2 && basew->cards[1] != NULL)
> + ActivateCard (1);
> + else if (xpos >= 48 && card != 3 && basew->cards[2] != NULL)
> + ActivateCard (2);
> return 1;
> default:
> return Fl_Widget::handle(e);
> --- alsa-tools-1.0.13/hdspmixer/src/HDSPMixerWindow.cxx.orig 2007-04-16 19:41:21.000000000 +0200
> +++ alsa-tools-1.0.13/hdspmixer/src/HDSPMixerWindow.cxx 2007-04-16 19:55:13.000000000 +0200
> @@ -700,6 +701,9 @@
> Fl::atclose = atclose_cb;
> Fl::add_handler(handler_cb);
> Fl::add_timeout(0.030, readregisters_cb, this);
> + i = 0;
> + while (cards[i] != NULL)
> + inputs->buttons->cardselector->ActivateCard (i++);
> }
>
> int HDSPMixerWindow::handle(int e)
>
> --
> Experience is something you don't get until
> just after you need it!
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-14 12:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1194740278.31914.387158@goedel.fjf.gnu.de>
2007-11-13 18:56 ` [Pkg-alsa-devel] Bug#450805: alsa-tools-gui: hdspmixer initializes only first Hammerfall DSP card Elimar Riesebieter
2007-11-14 8:12 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).