public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: George Hilliard <thirtythreeforty@gmail.com>
To: Clemens Ladisch <clemens@ladisch.de>,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	George Hilliard <thirtythreeforty@gmail.com>
Subject: [PATCH 2/2] sound: dice: Add support for Firestudio Mobile
Date: Sat, 15 Oct 2022 18:33:30 -0500	[thread overview]
Message-ID: <20221015233330.8679-3-thirtythreeforty@gmail.com> (raw)
In-Reply-To: <20221015233330.8679-1-thirtythreeforty@gmail.com>

This device is of the same vintage as the already-supported FireStudio,
but with a reduced input (10) and output (6) count.  Add a configuration
block for it.

	$ crpp < /sys/bus/firewire/devices/fw1/config_rom
	               ROM header and bus information block
	               ---------------------------------------------------
	400  0404bc6a  bus_info_length 4, crc_length 4, crc 48234
	404  31333934  bus_name "1394"
	408  e0008102  irmc 1, cmc 1, isc 1, bmc 0, cyc_clk_acc 0, max_rec 8 (512)
	40c  000a9204  company_id 000a92     | Presonus Corporation
	410  047da647  device_id 04047da647  | EUI-64 000a9204047da647

	               root directory
	               ---------------------------------------------------
	414  0006147f  directory_length 6, crc 5247
	418  03000a92  vendor: Presonus Corporation
	41c  8100000a  --> descriptor leaf at 444
	420  17000011  model
	424  8100000e  --> descriptor leaf at 45c
	428  0c0087c0  node capabilities per IEEE 1394
	42c  d1000001  --> unit directory at 430

	               unit directory at 430
	               ---------------------------------------------------
	430  00048030  directory_length 4, crc 32816
	434  12000a92  specifier id: Presonus Corporation
	438  13000001  version
	43c  17000011  model
	440  8100000f  --> descriptor leaf at 47c

	               descriptor leaf at 444
	               ---------------------------------------------------
	444  00057914  leaf_length 5, crc 30996
	448  00000000  textual descriptor
	44c  00000000  minimal ASCII
	450  50726553  "PreS"
	454  6f6e7573  "onus"
	458  00000000

	               descriptor leaf at 45c
	               ---------------------------------------------------
	45c  000792a9  leaf_length 7, crc 37545
	460  00000000  textual descriptor
	464  00000000  minimal ASCII
	468  46495245  "FIRE"
	46c  53545544  "STUD"
	470  494f5f4d  "IO_M"
	474  4f42494c  "OBIL"
	478  45000000  "E"

	               descriptor leaf at 47c
	               ---------------------------------------------------
	47c  000792a9  leaf_length 7, crc 37545
	480  00000000  textual descriptor
	484  00000000  minimal ASCII
	488  46495245  "FIRE"
	48c  53545544  "STUD"
	490  494f5f4d  "IO_M"
	494  4f42494c  "OBIL"
	498  45000000  "E"

Tested-by: George Hilliard <thirtythreeforty@gmail.com>
Signed-off-by: George Hilliard <thirtythreeforty@gmail.com>
---
 sound/firewire/dice/dice-presonus.c | 7 +++++++
 sound/firewire/dice/dice.c          | 8 ++++++++
 2 files changed, 15 insertions(+)

diff --git a/sound/firewire/dice/dice-presonus.c b/sound/firewire/dice/dice-presonus.c
index c85178e64667..8b62495846f1 100644
--- a/sound/firewire/dice/dice-presonus.c
+++ b/sound/firewire/dice/dice-presonus.c
@@ -17,6 +17,12 @@ static const struct dice_presonus_spec dice_presonus_firestudio = {
 	.has_midi = true,
 };
 
+static const struct dice_presonus_spec dice_presonus_firestudio_mobile = {
+	.tx_pcm_chs = {{10, 10, 0}, {0, 0, 0} },
+	.rx_pcm_chs = {{ 6,  6, 0}, {0, 0, 0} },
+	.has_midi = true,
+};
+
 int snd_dice_detect_presonus_formats(struct snd_dice *dice)
 {
 	static const struct {
@@ -24,6 +30,7 @@ int snd_dice_detect_presonus_formats(struct snd_dice *dice)
 		const struct dice_presonus_spec *spec;
 	} *entry, entries[] = {
 		{0x000008, &dice_presonus_firestudio},
+		{0x000011, &dice_presonus_firestudio_mobile},
 	};
 	struct fw_csr_iterator it;
 	int key, val, model_id;
diff --git a/sound/firewire/dice/dice.c b/sound/firewire/dice/dice.c
index f75902bc8e74..f31ea2bb7766 100644
--- a/sound/firewire/dice/dice.c
+++ b/sound/firewire/dice/dice.c
@@ -374,6 +374,14 @@ static const struct ieee1394_device_id dice_id_table[] = {
 		.model_id	= 0x000008,
 		.driver_data	= (kernel_ulong_t)snd_dice_detect_presonus_formats,
 	},
+	// Presonus FireStudio Mobile.
+	{
+		.match_flags	= IEEE1394_MATCH_VENDOR_ID |
+				  IEEE1394_MATCH_MODEL_ID,
+		.vendor_id	= OUI_PRESONUS,
+		.model_id	= 0x000011,
+		.driver_data	= (kernel_ulong_t)snd_dice_detect_presonus_formats,
+	},
 	// Lexicon I-ONYX FW810S.
 	{
 		.match_flags	= IEEE1394_MATCH_VENDOR_ID |
-- 
2.38.0


  parent reply	other threads:[~2022-10-15 23:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-15 23:33 [PATCH 0/2] sound: dice: Firestudio Mobile George Hilliard
2022-10-15 23:33 ` [PATCH 1/2] sound: dice: Fix "Firestudio" typo George Hilliard
2022-10-16  1:37   ` Takashi Sakamoto
2022-10-15 23:33 ` George Hilliard [this message]
2022-10-16  1:37 ` [PATCH 0/2] sound: dice: Firestudio Mobile Takashi Sakamoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221015233330.8679-3-thirtythreeforty@gmail.com \
    --to=thirtythreeforty@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=o-takashi@sakamocchi.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox