All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1 v2] usb-audio: Add support for Denon DN-X1600
@ 2021-06-10  8:35 Damien Zammit
  2021-06-10  8:35 ` [PATCH 1/1 " Damien Zammit
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Zammit @ 2021-06-10  8:35 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai

Hi Takashi,

You are correct, the patch still works without the hunk referring to
the PITCH control.

I have removed the hunk and was tested with this patch and it still
functioned as expected.

Regards,
Damien Z

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

* [PATCH 1/1 v2] usb-audio: Add support for Denon DN-X1600
  2021-06-10  8:35 [PATCH 0/1 v2] usb-audio: Add support for Denon DN-X1600 Damien Zammit
@ 2021-06-10  8:35 ` Damien Zammit
  2021-06-10  8:42   ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Zammit @ 2021-06-10  8:35 UTC (permalink / raw)
  To: alsa-devel; +Cc: Damien Zammit, tiwai

This provides support for Denon DN-X1600 hardware mixer.

The device itself supports 44100, 48000 and 96000 (Hz)
sample rates, but switching rates via software is currently not working.
Therefore, this patch hardcodes the sample rate to 48000Hz which
enables all 8 channels to function correctly when the correct
sample rate is selected on the hardware itself.

MIDI also tested and works.

Signed-off-by: Damien Zammit <damien@zamaudio.com>
Tested-by: xalmoxis@gmail.com
---
 sound/usb/clock.c        |  7 +++++
 sound/usb/quirks-table.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+)

diff --git a/sound/usb/clock.c b/sound/usb/clock.c
index 0afae839d..52de52288 100644
--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -534,6 +534,13 @@ static int set_sample_rate_v2v3(struct snd_usb_audio *chip,
 		 * rate.
 		 */
 		clock = snd_usb_clock_find_source(chip, fmt, false);
+
+		/* Denon DN-X1600 hardcoded
+		 * Sample rate seems to be set on the hardware itself
+		 */
+		if (chip->usb_id == USB_ID(0x154e, 0x500e))
+			return 0;
+
 		if (clock < 0)
 			return clock;
 	}
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index bdba37d0f..19bb499c1 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -3044,6 +3044,76 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
 	}
 },
 
+/* Denon DN-X1600 */
+{
+	USB_AUDIO_DEVICE(0x154e, 0x500e),
+	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+		.vendor_name = "Denon",
+		.product_name = "DN-X1600",
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = (const struct snd_usb_audio_quirk[]){
+			{
+				.ifnum = 0,
+				.type = QUIRK_IGNORE_INTERFACE,
+			},
+			{
+				.ifnum = 1,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = &(const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
+					.channels = 8,
+					.iface = 1,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.attributes = 0x0,
+					.endpoint = 0x01,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC |
+						USB_ENDPOINT_SYNC_ADAPTIVE,
+					.maxpacksize = 0x138,
+					.rates = SNDRV_PCM_RATE_48000,
+					.rate_min = 48000,
+					.rate_max = 48000,
+					.nr_rates = 1,
+					.rate_table = (unsigned int[]) {
+						48000
+					}
+				}
+			},
+			{
+				.ifnum = 2,
+				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
+				.data = &(const struct audioformat) {
+					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
+					.channels = 8,
+					.iface = 2,
+					.altsetting = 1,
+					.altset_idx = 1,
+					.attributes = 0x0,
+					.endpoint = 0x85,
+					.ep_attr = USB_ENDPOINT_XFER_ISOC |
+						USB_ENDPOINT_SYNC_ADAPTIVE,
+					.maxpacksize = 0x138,
+					.rates = SNDRV_PCM_RATE_48000,
+					.rate_min = 48000,
+					.rate_max = 48000,
+					.nr_rates = 1,
+					.rate_table = (unsigned int[]) {
+						48000
+					}
+				}
+			},
+			{
+				.ifnum = 4,
+				.type = QUIRK_MIDI_STANDARD_INTERFACE,
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
+
 /* Microsoft XboxLive Headset/Xbox Communicator */
 {
 	USB_DEVICE(0x045e, 0x0283),
-- 
2.13.1


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

* Re: [PATCH 1/1 v2] usb-audio: Add support for Denon DN-X1600
  2021-06-10  8:35 ` [PATCH 1/1 " Damien Zammit
@ 2021-06-10  8:42   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2021-06-10  8:42 UTC (permalink / raw)
  To: Damien Zammit; +Cc: alsa-devel, tiwai

On Thu, 10 Jun 2021 10:35:28 +0200,
Damien Zammit wrote:
> 
> This provides support for Denon DN-X1600 hardware mixer.
> 
> The device itself supports 44100, 48000 and 96000 (Hz)
> sample rates, but switching rates via software is currently not working.
> Therefore, this patch hardcodes the sample rate to 48000Hz which
> enables all 8 channels to function correctly when the correct
> sample rate is selected on the hardware itself.
> 
> MIDI also tested and works.
> 
> Signed-off-by: Damien Zammit <damien@zamaudio.com>
> Tested-by: xalmoxis@gmail.com

Thanks, applied now.


Takashi

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

end of thread, other threads:[~2021-06-10  8:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  8:35 [PATCH 0/1 v2] usb-audio: Add support for Denon DN-X1600 Damien Zammit
2021-06-10  8:35 ` [PATCH 1/1 " Damien Zammit
2021-06-10  8:42   ` 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.