Skip to contentSkip to conversation

sound: dice: Firestudio Mobile

PATCH In review George Hilliard 2 participants 5 messages Oct 15, 2022 – Oct 16, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover sound: dice: Firestudio Mobile

This short series adds a configuration block for the Firestudio Mobile I just acquired. Very similar to the Firestudio, but a lower port count.

My understanding is that the Low, Medium, and High speeds refer to 48kHz, 96kHz, and 192kHz sample rates, of which only the first two are supported by this hardware line. Please correct me if this is not correct.

Thanks!

#1 lore raw

PATCH 1/2 sound: dice: Fix "Firestudio" typo

No functionality change, just a small cleanup before adding the Firestudio Mobile.

---
 sound/firewire/dice/dice-presonus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/firewire/dice/dice-presonus.c +2 -2
index 967cc3119a64..c85178e64667 100644
@@ -11,7 +11,7 @@ struct dice_presonus_spec {
 	bool has_midi;
 };
 
-static const struct dice_presonus_spec dice_presonus_firesutio = {
+static const struct dice_presonus_spec dice_presonus_firestudio = {
 	.tx_pcm_chs = {{16, 16, 0}, {10, 2, 0} },
 	.rx_pcm_chs = {{16, 16, 0}, {10, 2, 0} },
 	.has_midi = true,
@@ -23,7 +23,7 @@ int snd_dice_detect_presonus_formats(struct snd_dice *dice)
 		u32 model_id;
 		const struct dice_presonus_spec *spec;
 	} *entry, entries[] = {
-		{0x000008, &dice_presonus_firesutio},
+		{0x000008, &dice_presonus_firestudio},
 	};
 	struct fw_csr_iterator it;
 	int key, val, model_id;
Signature · 1 line
2.38.0
maintainer Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] sound: dice: Fix "Firestudio" typo

Quoted 7 lines · George Hilliard

No functionality change, just a small cleanup before adding the Firestudio Mobile.

---
 sound/firewire/dice/dice-presonus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 24 lines
sound/firewire/dice/dice-presonus.c +2 -2
index 967cc3119a64..c85178e64667 100644
@@ -11,7 +11,7 @@ struct dice_presonus_spec {
 	bool has_midi;
 };
 
-static const struct dice_presonus_spec dice_presonus_firesutio = {
+static const struct dice_presonus_spec dice_presonus_firestudio = {
 	.tx_pcm_chs = {{16, 16, 0}, {10, 2, 0} },
 	.rx_pcm_chs = {{16, 16, 0}, {10, 2, 0} },
 	.has_midi = true,
@@ -23,7 +23,7 @@ int snd_dice_detect_presonus_formats(struct snd_dice *dice)
 		u32 model_id;
 		const struct dice_presonus_spec *spec;
 	} *entry, entries[] = {
-		{0x000008, &dice_presonus_firesutio},
+		{0x000008, &dice_presonus_firestudio},
 	};
 	struct fw_csr_iterator it;
 	int key, val, model_id;
Signature · 1 line
2.38.0

Thanks

Takashi Sakamoto

#3 lore raw

PATCH 2/2 sound: dice: Add support for Firestudio Mobile

In reply to George Hilliard

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"
---
 sound/firewire/dice/dice-presonus.c | 7 +++++++
 sound/firewire/dice/dice.c          | 8 ++++++++
 2 files changed, 15 insertions(+)
sound/firewire/dice/dice-presonus.c +7 -0
index c85178e64667..8b62495846f1 100644
@@ -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;
sound/firewire/dice/dice.c +8 -0
index f75902bc8e74..f31ea2bb7766 100644
@@ -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 |
Signature · 1 line
2.38.0
maintainer
#4 lore raw
In reply to George Hilliard

Hi,

Quoted 9 lines · George Hilliard

This short series adds a configuration block for the Firestudio Mobile I just acquired. Very similar to the Firestudio, but a lower port count.

My understanding is that the Low, Medium, and High speeds refer to 48kHz, 96kHz, and 192kHz sample rates, of which only the first two are supported by this hardware line. Please correct me if this is not correct.

Thanks!

Thanks for the patches, while the device, FireStudio Mobile, is already supported by ALSA dice driver since it has an entry of moddevice table which matches your device:

```
	{
		.match_flags = IEEE1394_MATCH_VERSION,
		.version     = DICE_INTERFACE,
	},
```

I think you have the other troubles except for device detection.

In general protocol defined by TC Applied Technologies (the company which designed DICE ASICs and firmwares), two fields of content of configuration ROM have pre-defined values.

One of the fields is version field of unit directory. The value is 0x000001 (=DICE_INTERFACE). In your case, the content of unit directory is below. We can see the value of version field is 0x000001.

```
               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
```

Another is EUI-64 field in bus information block. the part of field is used for 8 bit category ID and the value is 0. In your case, the value is below. The way to parese the field, please refer to check_dice_category function in sound/firewire/dice/dice.c[1].

```
               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
```

For the content of configuration ROM itself, documentation by 1394 Trading Association (vendor association back in several years ago) will be a great help[2].

As a supplement, TCAT general protocol has no way to share available stream formats at all of supported sampling transfer frequencies. It allows software just to read available stream formats at current sampling transfer frequency, while TCAT protocol extension has the function. ALSA dice driver is programmed to try the extension to detect, then works at limitation mode at failure. The pre-defined table you coded is for the case that the extension is not supported by device, but your device supports the extension.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/tree/sound/firewire/dice/dice.c#n33
[2] https://web.archive.org/web/20210216003042/http://1394ta.org/wp-content/uploads/2015/07/1999027.pdf

Thanks

Takashi Sakamoto