* RFC: ALSA patches for 2.6.16
@ 2007-01-06 3:59 Adrian Bunk
2007-01-08 10:53 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2007-01-06 3:59 UTC (permalink / raw)
To: Takashi Iwai, Arnaud Patard, Clemens Ladisch, perex; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 699 bytes --]
The following patches that were added to the -stable 2.6.18 seem to make
sense for 2.6.16:
2.6.18.1:
ALSA: Fix initiailization of user-space controls
2.6.18.2:
ALSA: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
ALSA: snd_rtctimer: handle RTC interrupts with a tasklet
For an easier review, I've attached the patches.
Do these patches look OK for 2.6.16, or should I not apply some or all?
Are there any critical patches I missed?
TIA
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
[-- Attachment #2: 2.6.18.1-alsa-fix-initiailization-of-user-space-controls.patch --]
[-- Type: text/x-diff, Size: 1053 bytes --]
>From stable-bounces@linux.kernel.org Mon Sep 25 03:51:05 2006
Date: Mon, 25 Sep 2006 11:49:01 +0200
Message-ID: <s5h7izs8eeq.wl%tiwai@suse.de>
From: Takashi Iwai <tiwai@suse.de>
To: stable@kernel.org
Subject: ALSA: Fix initiailization of user-space controls
From: Takashi Iwai <tiwai@suse.de>
ALSA: Fix initiailization of user-space controls
Fix an assertion when accessing a user-defined control due to lack of
initialization (appears only when CONFIG_SND_DEBUg is enabled).
ALSA sound/core/control.c:660: BUG? (info->access == 0)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/core/control.c | 1 +
1 file changed, 1 insertion(+)
--- linux-2.6.18.orig/sound/core/control.c
+++ linux-2.6.18/sound/core/control.c
@@ -997,6 +997,7 @@ static int snd_ctl_elem_add(struct snd_c
if (ue == NULL)
return -ENOMEM;
ue->info = *info;
+ ue->info.access = 0;
ue->elem_data = (char *)ue + sizeof(*ue);
ue->elem_data_size = private_size;
kctl.private_free = snd_ctl_elem_user_free;
[-- Attachment #3: 2.6.18.2-alsa-emu10k1-fix-outl-in-snd_emu10k1_resume_regs.patch --]
[-- Type: text/x-diff, Size: 1439 bytes --]
>From stable-bounces@linux.kernel.org Mon Oct 16 05:37:02 2006
Date: Mon, 16 Oct 2006 14:35:57 +0200
Message-ID: <s5hr6x8a15e.wl%tiwai@suse.de>
From: Arnaud Patard <arnaud.patard@rtp-net.org>
To: stable@kernel.org
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Subject: ALSA: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
Content-Type: text/plain; charset="us-ascii"
From: Arnaud Patard <arnaud.patard@rtp-net.org>
[PATCH] ALSA: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
The emu10k1 driver saves the A_IOCFG and HCFG register on suspend and restores
it on resumes. Unfortunately, this doesn't work as the arguments to outl() are
reversed.
From: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
sound/pci/emu10k1/emu10k1_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.18.1.orig/sound/pci/emu10k1/emu10k1_main.c
+++ linux-2.6.18.1/sound/pci/emu10k1/emu10k1_main.c
@@ -1460,8 +1460,8 @@ void snd_emu10k1_resume_regs(struct snd_
/* resore for spdif */
if (emu->audigy)
- outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
- outl(emu->port + HCFG, emu->saved_hcfg);
+ outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
+ outl(emu->saved_hcfg, emu->port + HCFG);
val = emu->saved_ptr;
for (reg = saved_regs; *reg != 0xff; reg++)
[-- Attachment #4: 2.6.18.2-alsa-snd_rtctimer-handle-rtc-interrupts-with-a-tasklet.patch --]
[-- Type: text/x-diff, Size: 2463 bytes --]
>From stable-bounces@linux.kernel.org Fri Oct 27 05:18:49 2006
Message-Id: <1161951335.22005.274364635@webmail.messagingengine.com>
From: "Clemens Ladisch" <clemens@ladisch.de>
To: stable@kernel.org
Content-Disposition: inline
MIME-Version: 1.0
Date: Fri, 27 Oct 2006 14:15:35 +0200
Subject: ALSA: snd_rtctimer: handle RTC interrupts with a tasklet
Content-Type: text/plain; charset="us-ascii"
The calls to rtc_control() from inside the interrupt handler can
deadlock the RTC code, so move our interrupt handling code to a tasklet.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
sound/core/rtctimer.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
--- linux-2.6.18.1.orig/sound/core/rtctimer.c
+++ linux-2.6.18.1/sound/core/rtctimer.c
@@ -50,7 +50,9 @@ static int rtctimer_stop(struct snd_time
* The hardware dependent description for this timer.
*/
static struct snd_timer_hardware rtc_hw = {
- .flags = SNDRV_TIMER_HW_FIRST|SNDRV_TIMER_HW_AUTO,
+ .flags = SNDRV_TIMER_HW_AUTO |
+ SNDRV_TIMER_HW_FIRST |
+ SNDRV_TIMER_HW_TASKLET,
.ticks = 100000000L, /* FIXME: XXX */
.open = rtctimer_open,
.close = rtctimer_close,
@@ -60,6 +62,7 @@ static struct snd_timer_hardware rtc_hw
static int rtctimer_freq = RTC_FREQ; /* frequency */
static struct snd_timer *rtctimer;
+static struct tasklet_struct rtc_tasklet;
static rtc_task_t rtc_task;
@@ -81,6 +84,7 @@ rtctimer_close(struct snd_timer *t)
rtc_task_t *rtc = t->private_data;
if (rtc) {
rtc_unregister(rtc);
+ tasklet_kill(&rtc_tasklet);
t->private_data = NULL;
}
return 0;
@@ -105,12 +109,17 @@ rtctimer_stop(struct snd_timer *timer)
return 0;
}
+static void rtctimer_tasklet(unsigned long data)
+{
+ snd_timer_interrupt((struct snd_timer *)data, 1);
+}
+
/*
* interrupt
*/
static void rtctimer_interrupt(void *private_data)
{
- snd_timer_interrupt(private_data, 1);
+ tasklet_hi_schedule(private_data);
}
@@ -139,9 +148,11 @@ static int __init rtctimer_init(void)
timer->hw = rtc_hw;
timer->hw.resolution = NANO_SEC / rtctimer_freq;
+ tasklet_init(&rtc_tasklet, rtctimer_tasklet, (unsigned long)timer);
+
/* set up RTC callback */
rtc_task.func = rtctimer_interrupt;
- rtc_task.private_data = timer;
+ rtc_task.private_data = &rtc_tasklet;
err = snd_timer_global_register(timer);
if (err < 0) {
[-- Attachment #5: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #6: Type: text/plain, Size: 161 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC: ALSA patches for 2.6.16
2007-01-06 3:59 RFC: ALSA patches for 2.6.16 Adrian Bunk
@ 2007-01-08 10:53 ` Takashi Iwai
2007-01-08 22:14 ` Adrian Bunk
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2007-01-08 10:53 UTC (permalink / raw)
To: Adrian Bunk; +Cc: alsa-devel, Clemens Ladisch, perex, Arnaud Patard
At Sat, 6 Jan 2007 04:59:13 +0100,
Adrian Bunk wrote:
>
> The following patches that were added to the -stable 2.6.18 seem to make
> sense for 2.6.16:
>
> 2.6.18.1:
> ALSA: Fix initiailization of user-space controls
>
> 2.6.18.2:
> ALSA: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
> ALSA: snd_rtctimer: handle RTC interrupts with a tasklet
>
> For an easier review, I've attached the patches.
>
> Do these patches look OK for 2.6.16, or should I not apply some or all?
Yes, all these patches are fine. Please apply.
> Are there any critical patches I missed?
There are some fixes in SUSE SP1 kernel. I'll check whether they are
included in the latest 2.6.16.x tree.
thanks,
Takashi
>
> TIA
> Adrian
>
> --
>
> "Is there not promise of rain?" Ling Tan asked suddenly out
> of the darkness. There had been need of rain for many days.
> "Only a promise," Lao Er said.
> Pearl S. Buck - Dragon Seed
>
> [2 2.6.18.1-alsa-fix-initiailization-of-user-space-controls.patch <text/x-diff; us-ascii (7bit)>]
> >From stable-bounces@linux.kernel.org Mon Sep 25 03:51:05 2006
> Date: Mon, 25 Sep 2006 11:49:01 +0200
> Message-ID: <s5h7izs8eeq.wl%tiwai@suse.de>
> From: Takashi Iwai <tiwai@suse.de>
> To: stable@kernel.org
> Subject: ALSA: Fix initiailization of user-space controls
>
> From: Takashi Iwai <tiwai@suse.de>
>
> ALSA: Fix initiailization of user-space controls
>
> Fix an assertion when accessing a user-defined control due to lack of
> initialization (appears only when CONFIG_SND_DEBUg is enabled).
>
> ALSA sound/core/control.c:660: BUG? (info->access == 0)
>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
> sound/core/control.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- linux-2.6.18.orig/sound/core/control.c
> +++ linux-2.6.18/sound/core/control.c
> @@ -997,6 +997,7 @@ static int snd_ctl_elem_add(struct snd_c
> if (ue == NULL)
> return -ENOMEM;
> ue->info = *info;
> + ue->info.access = 0;
> ue->elem_data = (char *)ue + sizeof(*ue);
> ue->elem_data_size = private_size;
> kctl.private_free = snd_ctl_elem_user_free;
> [3 2.6.18.2-alsa-emu10k1-fix-outl-in-snd_emu10k1_resume_regs.patch <text/x-diff; us-ascii (7bit)>]
> >From stable-bounces@linux.kernel.org Mon Oct 16 05:37:02 2006
> Date: Mon, 16 Oct 2006 14:35:57 +0200
> Message-ID: <s5hr6x8a15e.wl%tiwai@suse.de>
> From: Arnaud Patard <arnaud.patard@rtp-net.org>
> To: stable@kernel.org
> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
> Subject: ALSA: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
> Content-Type: text/plain; charset="us-ascii"
>
> From: Arnaud Patard <arnaud.patard@rtp-net.org>
>
> [PATCH] ALSA: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
>
> The emu10k1 driver saves the A_IOCFG and HCFG register on suspend and restores
> it on resumes. Unfortunately, this doesn't work as the arguments to outl() are
> reversed.
>
> From: Arnaud Patard <arnaud.patard@rtp-net.org>
> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
>
> ---
> sound/pci/emu10k1/emu10k1_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- linux-2.6.18.1.orig/sound/pci/emu10k1/emu10k1_main.c
> +++ linux-2.6.18.1/sound/pci/emu10k1/emu10k1_main.c
> @@ -1460,8 +1460,8 @@ void snd_emu10k1_resume_regs(struct snd_
>
> /* resore for spdif */
> if (emu->audigy)
> - outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
> - outl(emu->port + HCFG, emu->saved_hcfg);
> + outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
> + outl(emu->saved_hcfg, emu->port + HCFG);
>
> val = emu->saved_ptr;
> for (reg = saved_regs; *reg != 0xff; reg++)
> [4 2.6.18.2-alsa-snd_rtctimer-handle-rtc-interrupts-with-a-tasklet.patch <text/x-diff; us-ascii (7bit)>]
> >From stable-bounces@linux.kernel.org Fri Oct 27 05:18:49 2006
> Message-Id: <1161951335.22005.274364635@webmail.messagingengine.com>
> From: "Clemens Ladisch" <clemens@ladisch.de>
> To: stable@kernel.org
> Content-Disposition: inline
> MIME-Version: 1.0
> Date: Fri, 27 Oct 2006 14:15:35 +0200
> Subject: ALSA: snd_rtctimer: handle RTC interrupts with a tasklet
> Content-Type: text/plain; charset="us-ascii"
>
> The calls to rtc_control() from inside the interrupt handler can
> deadlock the RTC code, so move our interrupt handling code to a tasklet.
>
> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
>
> ---
> sound/core/rtctimer.c | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> --- linux-2.6.18.1.orig/sound/core/rtctimer.c
> +++ linux-2.6.18.1/sound/core/rtctimer.c
> @@ -50,7 +50,9 @@ static int rtctimer_stop(struct snd_time
> * The hardware dependent description for this timer.
> */
> static struct snd_timer_hardware rtc_hw = {
> - .flags = SNDRV_TIMER_HW_FIRST|SNDRV_TIMER_HW_AUTO,
> + .flags = SNDRV_TIMER_HW_AUTO |
> + SNDRV_TIMER_HW_FIRST |
> + SNDRV_TIMER_HW_TASKLET,
> .ticks = 100000000L, /* FIXME: XXX */
> .open = rtctimer_open,
> .close = rtctimer_close,
> @@ -60,6 +62,7 @@ static struct snd_timer_hardware rtc_hw
>
> static int rtctimer_freq = RTC_FREQ; /* frequency */
> static struct snd_timer *rtctimer;
> +static struct tasklet_struct rtc_tasklet;
> static rtc_task_t rtc_task;
>
>
> @@ -81,6 +84,7 @@ rtctimer_close(struct snd_timer *t)
> rtc_task_t *rtc = t->private_data;
> if (rtc) {
> rtc_unregister(rtc);
> + tasklet_kill(&rtc_tasklet);
> t->private_data = NULL;
> }
> return 0;
> @@ -105,12 +109,17 @@ rtctimer_stop(struct snd_timer *timer)
> return 0;
> }
>
> +static void rtctimer_tasklet(unsigned long data)
> +{
> + snd_timer_interrupt((struct snd_timer *)data, 1);
> +}
> +
> /*
> * interrupt
> */
> static void rtctimer_interrupt(void *private_data)
> {
> - snd_timer_interrupt(private_data, 1);
> + tasklet_hi_schedule(private_data);
> }
>
>
> @@ -139,9 +148,11 @@ static int __init rtctimer_init(void)
> timer->hw = rtc_hw;
> timer->hw.resolution = NANO_SEC / rtctimer_freq;
>
> + tasklet_init(&rtc_tasklet, rtctimer_tasklet, (unsigned long)timer);
> +
> /* set up RTC callback */
> rtc_task.func = rtctimer_interrupt;
> - rtc_task.private_data = timer;
> + rtc_task.private_data = &rtc_tasklet;
>
> err = snd_timer_global_register(timer);
> if (err < 0) {
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC: ALSA patches for 2.6.16
2007-01-08 10:53 ` Takashi Iwai
@ 2007-01-08 22:14 ` Adrian Bunk
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2007-01-08 22:14 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Clemens Ladisch, perex, Arnaud Patard
On Mon, Jan 08, 2007 at 11:53:42AM +0100, Takashi Iwai wrote:
> At Sat, 6 Jan 2007 04:59:13 +0100,
> Adrian Bunk wrote:
> >
> > The following patches that were added to the -stable 2.6.18 seem to make
> > sense for 2.6.16:
> >
> > 2.6.18.1:
> > ALSA: Fix initiailization of user-space controls
> >
> > 2.6.18.2:
> > ALSA: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
> > ALSA: snd_rtctimer: handle RTC interrupts with a tasklet
> >
> > For an easier review, I've attached the patches.
> >
> > Do these patches look OK for 2.6.16, or should I not apply some or all?
>
> Yes, all these patches are fine. Please apply.
Thanks, I've applied them.
> > Are there any critical patches I missed?
>
> There are some fixes in SUSE SP1 kernel. I'll check whether they are
> included in the latest 2.6.16.x tree.
Thanks a lot!
> thanks,
>
> Takashi
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-08 22:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-06 3:59 RFC: ALSA patches for 2.6.16 Adrian Bunk
2007-01-08 10:53 ` Takashi Iwai
2007-01-08 22:14 ` Adrian Bunk
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.