All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Updated alsa-kernel asihpi sources so patches are no longer required.
@ 2010-07-01 23:24 linux
  2010-07-05  9:28 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: linux @ 2010-07-01 23:24 UTC (permalink / raw)
  To: patch; +Cc: tiwai, Eliot Blennerhassett, alsa-devel

From: Eliot Blennerhassett <eblennerhassett@audioscience.com>

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
---
 .gitignore                |    2 --
 pci/asihpi/Makefile       |    3 ---
 pci/asihpi/hpidspcd.c     |    2 ++
 pci/asihpi/hpidspcd.patch |   21 ---------------------
 pci/asihpi/hpios.c        |    2 ++
 pci/asihpi/hpios.patch    |   35 -----------------------------------
 6 files changed, 4 insertions(+), 61 deletions(-)
 create mode 100644 pci/asihpi/hpidspcd.c
 delete mode 100644 pci/asihpi/hpidspcd.patch
 create mode 100644 pci/asihpi/hpios.c
 delete mode 100644 pci/asihpi/hpios.patch

diff --git a/.gitignore b/.gitignore
index 204b952..db642b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,8 +75,6 @@ pci/ac97/ac97_bus.c
 pci/ac97/ac97_codec.c
 pci/ad1889.c
 pci/ali5451/ali5451.c
-pci/asihpi/hpidspcd.c
-pci/asihpi/hpios.c
 pci/atiixp.c
 pci/atiixp_modem.c
 pci/au88x0/au88x0.c
diff --git a/pci/asihpi/Makefile b/pci/asihpi/Makefile
index 95ee449..50ab325 100644
--- a/pci/asihpi/Makefile
+++ b/pci/asihpi/Makefile
@@ -5,7 +5,6 @@ endif
 include $(SND_TOPDIR)/toplevel.config
 include $(SND_TOPDIR)/Makefile.conf
 
-clean-files := hpidspcd.c hpios.c
 
 EXTRA_CFLAGS = -I$(SND_TOPDIR)/alsa-kernel/pci/asihpi
 
@@ -13,5 +12,3 @@ include $(SND_TOPDIR)/alsa-kernel/pci/asihpi/Makefile
 
 include $(SND_TOPDIR)/Rules.make
 
-hpidspcd.c: hpidspcd.patch $(SND_TOPDIR)/alsa-kernel/pci/asihpi/hpidspcd.c
-hpios.c: hpios.patch $(SND_TOPDIR)/alsa-kernel/pci/asihpi/hpios.c
diff --git a/pci/asihpi/hpidspcd.c b/pci/asihpi/hpidspcd.c
new file mode 100644
index 0000000..9b7d80a
--- /dev/null
+++ b/pci/asihpi/hpidspcd.c
@@ -0,0 +1,2 @@
+#include "adriver.h"
+#include "../../alsa-kernel/pci/asihpi/hpidspcd.c"
diff --git a/pci/asihpi/hpidspcd.patch b/pci/asihpi/hpidspcd.patch
deleted file mode 100644
index 7831639..0000000
--- a/pci/asihpi/hpidspcd.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- ../../alsa-kernel/pci/asihpi/hpidspcd.c	2010-04-21 18:36:16.613453111 +0200
-+++ hpidspcd.c	2010-04-21 18:41:26.104970371 +0200
-@@ -1,3 +1,4 @@
-+#include "adriver.h"
- /***********************************************************************/
- /*!
- 
-@@ -73,8 +74,13 @@
- 	sprintf(fw_name, "asihpi/dsp%04x.bin", adapter);
- 	HPI_DEBUG_LOG(INFO, "requesting firmware for %s\n", fw_name);
- 
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2 , 5 , 0))
-+	err = request_firmware(&ps_firmware, fw_name,
-+		ps_dsp_code->ps_dev->slot_name);
-+#else
- 	err = request_firmware(&ps_firmware, fw_name,
- 		&ps_dsp_code->ps_dev->dev);
-+#endif
- 	if (err != 0) {
- 		HPI_DEBUG_LOG(ERROR, "%d, request_firmware failed for  %s\n",
- 			err, fw_name);
diff --git a/pci/asihpi/hpios.c b/pci/asihpi/hpios.c
new file mode 100644
index 0000000..3f151a3
--- /dev/null
+++ b/pci/asihpi/hpios.c
@@ -0,0 +1,2 @@
+#include "adriver.h"
+#include "../../alsa-kernel/pci/asihpi/hpios.c"
diff --git a/pci/asihpi/hpios.patch b/pci/asihpi/hpios.patch
deleted file mode 100644
index 1af0f7f..0000000
--- a/pci/asihpi/hpios.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- ../../alsa-kernel/pci/asihpi/hpios.c	2010-04-21 18:36:16.617452068 +0200
-+++ hpios.c	2010-04-21 18:40:32.700700812 +0200
-@@ -1,3 +1,4 @@
-+#include "adriver.h"
- /******************************************************************************
- 
-     AudioScience HPI driver
-@@ -26,6 +27,7 @@
- #include <linux/delay.h>
- #include <linux/sched.h>
- 
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2 , 6 , 14)
- void hpios_delay_micro_seconds(u32 num_micro_sec)
- {
- 	if ((usecs_to_jiffies(num_micro_sec) > 1) && !in_interrupt()) {
-@@ -38,6 +40,19 @@
- 		mdelay(num_micro_sec / 1000);
- 
- }
-+#else
-+void hpios_delay_micro_seconds(u32 num_micro_sec)
-+{
-+	if ((num_micro_sec / 1000 >= 1000000 / HZ) && !in_interrupt()) {
-+		set_current_state(TASK_UNINTERRUPTIBLE);
-+		schedule_timeout((HZ * num_micro_sec + (HZ - 1)) / 1000000);
-+	} else if (num_micro_sec <= 2000)
-+		udelay(num_micro_sec);
-+	else
-+		mdelay(num_micro_sec / 1000);
-+
-+}
-+#endif
- 
- void hpios_locked_mem_init(void)
- {
-- 
1.7.0.4

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

* Re: [PATCH] Updated alsa-kernel asihpi sources so patches are no longer required.
  2010-07-01 23:24 [PATCH] Updated alsa-kernel asihpi sources so patches are no longer required linux
@ 2010-07-05  9:28 ` Takashi Iwai
  2010-07-05 20:14   ` Eliot Blennerhassett
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2010-07-05  9:28 UTC (permalink / raw)
  To: linux; +Cc: Eliot Blennerhassett, alsa-devel

At Fri, 02 Jul 2010 11:24:40 +1200,
linux@audioscience.com wrote:
> 
> From: Eliot Blennerhassett <eblennerhassett@audioscience.com>
> 
> Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>

Hrm, really these patches aren't needed?
The request_firmware() API is definitely incompatible between 2.4
and 2.6 kernels, so we'd need a fix anyway in alsa-driver build.


thanks,

Takashi


> ---
>  .gitignore                |    2 --
>  pci/asihpi/Makefile       |    3 ---
>  pci/asihpi/hpidspcd.c     |    2 ++
>  pci/asihpi/hpidspcd.patch |   21 ---------------------
>  pci/asihpi/hpios.c        |    2 ++
>  pci/asihpi/hpios.patch    |   35 -----------------------------------
>  6 files changed, 4 insertions(+), 61 deletions(-)
>  create mode 100644 pci/asihpi/hpidspcd.c
>  delete mode 100644 pci/asihpi/hpidspcd.patch
>  create mode 100644 pci/asihpi/hpios.c
>  delete mode 100644 pci/asihpi/hpios.patch
> 
> diff --git a/.gitignore b/.gitignore
> index 204b952..db642b2 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -75,8 +75,6 @@ pci/ac97/ac97_bus.c
>  pci/ac97/ac97_codec.c
>  pci/ad1889.c
>  pci/ali5451/ali5451.c
> -pci/asihpi/hpidspcd.c
> -pci/asihpi/hpios.c
>  pci/atiixp.c
>  pci/atiixp_modem.c
>  pci/au88x0/au88x0.c
> diff --git a/pci/asihpi/Makefile b/pci/asihpi/Makefile
> index 95ee449..50ab325 100644
> --- a/pci/asihpi/Makefile
> +++ b/pci/asihpi/Makefile
> @@ -5,7 +5,6 @@ endif
>  include $(SND_TOPDIR)/toplevel.config
>  include $(SND_TOPDIR)/Makefile.conf
>  
> -clean-files := hpidspcd.c hpios.c
>  
>  EXTRA_CFLAGS = -I$(SND_TOPDIR)/alsa-kernel/pci/asihpi
>  
> @@ -13,5 +12,3 @@ include $(SND_TOPDIR)/alsa-kernel/pci/asihpi/Makefile
>  
>  include $(SND_TOPDIR)/Rules.make
>  
> -hpidspcd.c: hpidspcd.patch $(SND_TOPDIR)/alsa-kernel/pci/asihpi/hpidspcd.c
> -hpios.c: hpios.patch $(SND_TOPDIR)/alsa-kernel/pci/asihpi/hpios.c
> diff --git a/pci/asihpi/hpidspcd.c b/pci/asihpi/hpidspcd.c
> new file mode 100644
> index 0000000..9b7d80a
> --- /dev/null
> +++ b/pci/asihpi/hpidspcd.c
> @@ -0,0 +1,2 @@
> +#include "adriver.h"
> +#include "../../alsa-kernel/pci/asihpi/hpidspcd.c"
> diff --git a/pci/asihpi/hpidspcd.patch b/pci/asihpi/hpidspcd.patch
> deleted file mode 100644
> index 7831639..0000000
> --- a/pci/asihpi/hpidspcd.patch
> +++ /dev/null
> @@ -1,21 +0,0 @@
> ---- ../../alsa-kernel/pci/asihpi/hpidspcd.c	2010-04-21 18:36:16.613453111 +0200
> -+++ hpidspcd.c	2010-04-21 18:41:26.104970371 +0200
> -@@ -1,3 +1,4 @@
> -+#include "adriver.h"
> - /***********************************************************************/
> - /*!
> - 
> -@@ -73,8 +74,13 @@
> - 	sprintf(fw_name, "asihpi/dsp%04x.bin", adapter);
> - 	HPI_DEBUG_LOG(INFO, "requesting firmware for %s\n", fw_name);
> - 
> -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2 , 5 , 0))
> -+	err = request_firmware(&ps_firmware, fw_name,
> -+		ps_dsp_code->ps_dev->slot_name);
> -+#else
> - 	err = request_firmware(&ps_firmware, fw_name,
> - 		&ps_dsp_code->ps_dev->dev);
> -+#endif
> - 	if (err != 0) {
> - 		HPI_DEBUG_LOG(ERROR, "%d, request_firmware failed for  %s\n",
> - 			err, fw_name);
> diff --git a/pci/asihpi/hpios.c b/pci/asihpi/hpios.c
> new file mode 100644
> index 0000000..3f151a3
> --- /dev/null
> +++ b/pci/asihpi/hpios.c
> @@ -0,0 +1,2 @@
> +#include "adriver.h"
> +#include "../../alsa-kernel/pci/asihpi/hpios.c"
> diff --git a/pci/asihpi/hpios.patch b/pci/asihpi/hpios.patch
> deleted file mode 100644
> index 1af0f7f..0000000
> --- a/pci/asihpi/hpios.patch
> +++ /dev/null
> @@ -1,35 +0,0 @@
> ---- ../../alsa-kernel/pci/asihpi/hpios.c	2010-04-21 18:36:16.617452068 +0200
> -+++ hpios.c	2010-04-21 18:40:32.700700812 +0200
> -@@ -1,3 +1,4 @@
> -+#include "adriver.h"
> - /******************************************************************************
> - 
> -     AudioScience HPI driver
> -@@ -26,6 +27,7 @@
> - #include <linux/delay.h>
> - #include <linux/sched.h>
> - 
> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2 , 6 , 14)
> - void hpios_delay_micro_seconds(u32 num_micro_sec)
> - {
> - 	if ((usecs_to_jiffies(num_micro_sec) > 1) && !in_interrupt()) {
> -@@ -38,6 +40,19 @@
> - 		mdelay(num_micro_sec / 1000);
> - 
> - }
> -+#else
> -+void hpios_delay_micro_seconds(u32 num_micro_sec)
> -+{
> -+	if ((num_micro_sec / 1000 >= 1000000 / HZ) && !in_interrupt()) {
> -+		set_current_state(TASK_UNINTERRUPTIBLE);
> -+		schedule_timeout((HZ * num_micro_sec + (HZ - 1)) / 1000000);
> -+	} else if (num_micro_sec <= 2000)
> -+		udelay(num_micro_sec);
> -+	else
> -+		mdelay(num_micro_sec / 1000);
> -+
> -+}
> -+#endif
> - 
> - void hpios_locked_mem_init(void)
> - {
> -- 
> 1.7.0.4
> 

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

* Re: [PATCH] Updated alsa-kernel asihpi sources so patches are no longer required.
  2010-07-05  9:28 ` Takashi Iwai
@ 2010-07-05 20:14   ` Eliot Blennerhassett
  2010-07-06  6:17     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Eliot Blennerhassett @ 2010-07-05 20:14 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Thanks Takashi,

On 05/07/10 21:28, Takashi Iwai wrote:
> At Fri, 02 Jul 2010 11:24:40 +1200,
> linux@audioscience.com wrote:
>>
>> From: Eliot Blennerhassett <eblennerhassett@audioscience.com>
>>
>> Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
> 
> Hrm, really these patches aren't needed?


You are right.  I confused myself:

We are dropping support for older kernels from our internal source, so
now I generate alsa-kernel code directly. (where previously our source
looked like patched alsa-driver version)

These patches should remain in alsa-driver to support older kernels.

> The request_firmware() API is definitely incompatible between 2.4
> and 2.6 kernels, so we'd need a fix anyway in alsa-driver build.

regards

Eliot
-- 
Eliot Blennerhassett
AudioScience Inc.

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

* Re: [PATCH] Updated alsa-kernel asihpi sources so patches are no longer required.
  2010-07-05 20:14   ` Eliot Blennerhassett
@ 2010-07-06  6:17     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2010-07-06  6:17 UTC (permalink / raw)
  To: Eliot Blennerhassett; +Cc: alsa-devel

At Tue, 06 Jul 2010 08:14:54 +1200,
Eliot Blennerhassett wrote:
> 
> Thanks Takashi,
> 
> On 05/07/10 21:28, Takashi Iwai wrote:
> > At Fri, 02 Jul 2010 11:24:40 +1200,
> > linux@audioscience.com wrote:
> >>
> >> From: Eliot Blennerhassett <eblennerhassett@audioscience.com>
> >>
> >> Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
> > 
> > Hrm, really these patches aren't needed?
> 
> 
> You are right.  I confused myself:
> 
> We are dropping support for older kernels from our internal source, so
> now I generate alsa-kernel code directly. (where previously our source
> looked like patched alsa-driver version)

Ah, I didn't know you dropped the support for older kernels.
If this could be a burden, we can restrict the supported version, too.

OTOH, I forgot that I've set the version limit in
alsa-driver/kconfig-vers.  Due to some build issues, this was set to
2.6.10.  So the patches aren't needed indeed :)

I'll drop patches later as you posted.


thanks,

Takashi

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

end of thread, other threads:[~2010-07-06  6:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-01 23:24 [PATCH] Updated alsa-kernel asihpi sources so patches are no longer required linux
2010-07-05  9:28 ` Takashi Iwai
2010-07-05 20:14   ` Eliot Blennerhassett
2010-07-06  6:17     ` Takashi Iwai

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.