Add M2Tech hiFace USB-SPDIF driver
PATCH 1/1 Add M2Tech hiFace USB-SPDIF driver
Add driver for M2Tech hiFace USB-SPDIF interface and compatible devices.
The supported products are:
* M2Tech Young
* M2Tech hiFace
* M2Tech North Star
* M2Tech W4S Young
* M2Tech Corrson
* M2Tech AUDIA
* M2Tech SL Audio
* M2Tech Empirical
* M2Tech Rockna
* M2Tech Pathos
* M2Tech Metronome
* M2Tech CAD
* M2Tech Audio Esclusive
* M2Tech Rotel
* M2Tech Eeaudio
* The Chord Company CHORD
* AVA Group A/S Vitus
---
Hi,
this is my first ALSA driver I still have some doubts and I marked them in the comments below with a XXX prefix, could someone please take a look at them?
I plan on submitting a version 2 of the driver after I get some feedback, especially on those doubts.
I also noticed that many drivers under sound/usb/ have text in the Kconfig entry stating "Say Y here to include support for ..." but I only see "[N/m/?]" as options when I run "make oldconfig" maybe because of some dependency, I am not sure, should such text be removed in order to avoid confusion?
Thanks,
Antonio
sound/usb/Kconfig | 33 +++ sound/usb/Makefile | 2 +- sound/usb/hiface/Makefile | 2 + sound/usb/hiface/chip.c | 331 ++++++++++++++++++++++ sound/usb/hiface/chip.h | 34 +++ sound/usb/hiface/pcm.c | 666 +++++++++++++++++++++++++++++++++++++++++++++ sound/usb/hiface/pcm.h | 24 ++ 7 files changed, 1091 insertions(+), 1 deletion(-) create mode 100644 sound/usb/hiface/Makefile create mode 100644 sound/usb/hiface/chip.c create mode 100644 sound/usb/hiface/chip.h create mode 100644 sound/usb/hiface/pcm.c create mode 100644 sound/usb/hiface/pcm.h
sound/usb/Kconfig +33 -0
@@ -115,5 +115,38 @@ config SND_USB_6FIRE and further help can be found at http://sixfireusb.sourceforge.net +config SND_USB_HIFACE + tristate "M2Tech hiFace USB-SPDIF driver" + select SND_PCM + help + Say Y here to include support for M2Tech hiFace USB-SPDIF interface. + + M2Tech hiFace and compatible devices offer a Hi-End S/PDIF Output + Interface, see http://www.m2tech.biz/hiface.html + + This driver supports the original M2Tech hiFace and some other + compatible devices. The supported products are: + + * M2Tech Young + * M2Tech hiFace + * M2Tech North Star + * M2Tech W4S Young + * M2Tech Corrson + * M2Tech AUDIA + * M2Tech SL Audio + * M2Tech Empirical + * M2Tech Rockna + * M2Tech Pathos + * M2Tech Metronome + * M2Tech CAD + * M2Tech Audio Esclusive + * M2Tech Rotel + * M2Tech Eeaudio + * The Chord Company CHORD + * AVA Group A/S Vitus + + To compile this driver as a module, choose M here: the module + will be called snd-usb-hiface. + endif # SND_USB
sound/usb/Makefile +1 -1
@@ -23,4 +23,4 @@ obj-$(CONFIG_SND_USB_UA101) += snd-usbmidi-lib.o obj-$(CONFIG_SND_USB_USX2Y) += snd-usbmidi-lib.o obj-$(CONFIG_SND_USB_US122L) += snd-usbmidi-lib.o -obj-$(CONFIG_SND) += misc/ usx2y/ caiaq/ 6fire/ +obj-$(CONFIG_SND) += misc/ usx2y/ caiaq/ 6fire/ hiface/
sound/usb/hiface/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +snd-usb-hiface-objs := chip.o pcm.o +obj-$(CONFIG_SND_USB_HIFACE) += snd-usb-hiface.o
sound/usb/hiface/chip.c new file +331 -0
331 lines not on this page · raw message
sound/usb/hiface/chip.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Linux driver for M2Tech HiFace compatible devices +* +* Copyright 2012-2013 (C) M2TECH S.r.l and Amarula Solutions B.V. +* +* Authors: Michael Trimarchi <[email protected]> +* Antonio Ospite <[email protected]> +* +* The driver is based on the work done in TerraTec DMX 6Fire USB +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +*/ + +#ifndef HIFACE_CHIP_H +#define HIFACE_CHIP_H + +#include <linux/usb.h> +#include <sound/core.h> + +struct pcm_runtime ; + +struct hiface_chip { +struct usb_device *dev; +struct snd_card *card; +int intf_count;/* number of registered interfaces */ +int index;/* index in module parameter arrays */ +bool shutdown; + +struct pcm_runtime *pcm; +}; +#endif /* HIFACE_CHIP_H */
sound/usb/hiface/pcm.c new file +666 -0
666 lines not on this page · raw message
sound/usb/hiface/pcm.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* Linux driver for M2Tech HiFace compatible devices +* +* Copyright 2012-2013 (C) M2TECH S.r.l and Amarula Solutions B.V. +* +* Authors: Michael Trimarchi <[email protected]> +* Antonio Ospite <[email protected]> +* +* The driver is based on the work done in TerraTec DMX 6Fire USB +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +*/ + +#ifndef HIFACE_PCM_H +#define HIFACE_PCM_H + +struct hiface_chip ; + +int hiface_pcm_init (struct hiface_chip *chip,u8 extra_freq); +void hiface_pcm_abort (struct hiface_chip *chip); +#endif /* HIFACE_PCM_H */
Signature · 1 line
1.7.10.4