All of lore.kernel.org
 help / color / mirror / Atom feed
* [hdspm: Add RME RayDAT/AIO 0/2] Reworked support for RayDAT/AIO
@ 2011-01-26 15:58 Adrian Knoth
  2011-01-26 15:58 ` [[PATCH] - hdspm 2/2] Add RayDAT and AIO strings to Kconfig Adrian Knoth
       [not found] ` <1296057510-10047-2-git-send-email-adi@drcomp.erfurt.thur.de>
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian Knoth @ 2011-01-26 15:58 UTC (permalink / raw)
  To: patch; +Cc: tiwai, Adrian Knoth, alsa-devel

Hi!

Finally, here's the patch that adds RME RayDAT and AIO support to hdpsm.
Code was taken from Florian Faber's

   http://wiki.linuxproaudio.org/index.php/Driver:hdspe

revision (2010-12-25) and heavily modified to (almost) comply with the
coding style.

I also enabled S/PDIF input and augmented the code to allow for
all period sizes between 64 and 4096 samples on RayDATs/AIOs.

As pointed out by Takashi earlier this month, this version now doesn't
use typedefs or enums in ioctl structs. I hope that I caught all
upstream changes that happened in the last three years. ;)

Obviously, the patch is extremely long, it adds MMAP access, support for
the additional TCO hardware module, more MIDI ports and probably a lot
more.

It's more like a new generation than an evolution, and if you think it's
too much, you could still call it hdspe and make it a new driver
instead, however, given that OSX and Win32 only have one hdsp driver for
all cards, it feels wrong to have three on Linux. In theory, all this
can be merged with the hdsp driver, but that's for some other time. ;)


Cheers

Adrian Knoth (2):
  Add support for RME RayDAT and AIO
  Add RayDAT and AIO strings to Kconfig

 include/hdspm.h     |  347 ++++-
 pci/Kconfig         |    6 +-
 pci/rme9652/hdspm.c | 4227 +++++++++++++++++++++++++++++++++++++--------------
 3 files changed, 3424 insertions(+), 1156 deletions(-)

-- 
1.7.2.3

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* [[PATCH] - hdspm 2/2] Add RayDAT and AIO strings to Kconfig
  2011-01-26 15:58 [hdspm: Add RME RayDAT/AIO 0/2] Reworked support for RayDAT/AIO Adrian Knoth
@ 2011-01-26 15:58 ` Adrian Knoth
       [not found] ` <1296057510-10047-2-git-send-email-adi@drcomp.erfurt.thur.de>
  1 sibling, 0 replies; 4+ messages in thread
From: Adrian Knoth @ 2011-01-26 15:58 UTC (permalink / raw)
  To: patch; +Cc: tiwai, Adrian Knoth, alsa-devel

Inform users about the newly added capabilities.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>

diff --git a/pci/Kconfig b/pci/Kconfig
index 7b2678a..5df9844 100644
--- a/pci/Kconfig
+++ b/pci/Kconfig
@@ -570,13 +570,13 @@ comment "Don't forget to add built-in firmwares for HDSP driver"
 	depends on SND_HDSP=y
 
 config SND_HDSPM
-	tristate "RME Hammerfall DSP MADI"
+	tristate "RME Hammerfall DSP MADI/RayDAT/AIO"
 	select SND_HWDEP
 	select SND_RAWMIDI
 	select SND_PCM
 	help
-	  Say Y here to include support for RME Hammerfall DSP MADI
-	  soundcards.
+	  Say Y here to include support for RME Hammerfall DSP MADI,
+	  RayDAT and AIO soundcards.
 
 	  To compile this driver as a module, choose M here: the module
 	  will be called snd-hdspm.
-- 
1.7.2.3

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

* Re: [[PATCH] - hdspm 1/2] Add support for RME RayDAT and AIO
       [not found] ` <1296057510-10047-2-git-send-email-adi@drcomp.erfurt.thur.de>
@ 2011-01-26 16:43   ` Takashi Iwai
  2011-01-26 18:35     ` Adrian Knoth
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2011-01-26 16:43 UTC (permalink / raw)
  To: Adrian Knoth; +Cc: alsa-devel

At Wed, 26 Jan 2011 16:58:29 +0100,
Adrian Knoth wrote:
> 
> diff --git a/include/hdspm.h b/include/hdspm.h
> index 81990b2..0caf472 100644
> --- a/include/hdspm.h
> +++ b/include/hdspm.h
...
>  struct hdspm_version {
> +	uint8_t card_type; /* enum hdspm_io_type */
> +	char cardname[20];
> +	unsigned int serial;
>  	unsigned short firmware_rev;
> +	int addons;
>  };
>  
>  #define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdspm_version)

Changing the existing ioctl isn't so pretty.
If any, I'd vote for changing the ioctl number.

> +/* These tables map the ALSA channels 1..N to the channels that we
> +   need to use in order to find the relevant channel buffer. RME
> +   refers to this kind of mapping as between "the ADAT channel and
> +   the DMA channel." We index it using the logical audio channel,
> +   and the value is the DMA channel (i.e. channel buffer number)
> +   where the data for that channel can be read/written from/to.
> +*/
> +
> +static char channel_map_unity_ss[HDSPM_MAX_CHANNELS] = {
> +	0, 1, 2, 3, 4, 5, 6, 7,
> +	8, 9, 10, 11, 12, 13, 14, 15,
> +	16, 17, 18, 19, 20, 21, 22, 23,
> +	24, 25, 26, 27, 28, 29, 30, 31,
> +	32, 33, 34, 35, 36, 37, 38, 39,
> +	40, 41, 42, 43, 44, 45, 46, 47,
> +	48, 49, 50, 51, 52, 53, 54, 55,
> +	56, 57, 58, 59, 60, 61, 62, 63
> +};

Please don't put static arrays in the public header files.

Otherwise it looks OK.  It's huge, and maybe there are something to be
fixed.  But We can fix things after merging.

However, the problem is that this patch isn't applicable cleanly to
the latest sound git tree: 
    git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git

I can change the patch path easily, but the contents get rejected at
this time, and I have no gut to fix manually.

Could you rebase your patch to the git tree above?
Or, you can use alsa-driver-snapshot tarball if you don't want to
use the whole kernel git tree.


thanks,

Takashi

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

* Re: [[PATCH] - hdspm 1/2] Add support for RME RayDAT and AIO
  2011-01-26 16:43   ` [[PATCH] - hdspm 1/2] Add support for RME RayDAT and AIO Takashi Iwai
@ 2011-01-26 18:35     ` Adrian Knoth
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Knoth @ 2011-01-26 18:35 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On Wed, Jan 26, 2011 at 05:43:06PM +0100, Takashi Iwai wrote:

> >  struct hdspm_version {
> > +	uint8_t card_type; /* enum hdspm_io_type */
> > +	char cardname[20];
> > +	unsigned int serial;
> >  	unsigned short firmware_rev;
> > +	int addons;
> >  };
> >  
> >  #define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdspm_version)
> 
> Changing the existing ioctl isn't so pretty.
> If any, I'd vote for changing the ioctl number.

I chose to change the ioctl number. Luckily, until now, there's no
userspace tool calling this ioctl, but of course, you never know.


> > +static char channel_map_unity_ss[HDSPM_MAX_CHANNELS] = {
> 
> Please don't put static arrays in the public header files.

Dropped the static now.


> Otherwise it looks OK.  It's huge, and maybe there are something to be
> fixed. But We can fix things after merging.

ACK.

>     git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
> Could you rebase your patch to the git tree above?

Done. Hope it applies cleanly now.


Ciao

-- 
mail: adi@thur.de  	http://adi.thur.de	PGP/GPG: key via keyserver

Don't try to be different. Just be good. To be good is different enough.
        --Arthur Freed

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

end of thread, other threads:[~2011-01-26 18:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26 15:58 [hdspm: Add RME RayDAT/AIO 0/2] Reworked support for RayDAT/AIO Adrian Knoth
2011-01-26 15:58 ` [[PATCH] - hdspm 2/2] Add RayDAT and AIO strings to Kconfig Adrian Knoth
     [not found] ` <1296057510-10047-2-git-send-email-adi@drcomp.erfurt.thur.de>
2011-01-26 16:43   ` [[PATCH] - hdspm 1/2] Add support for RME RayDAT and AIO Takashi Iwai
2011-01-26 18:35     ` Adrian Knoth

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.