summaryrefslogtreecommitdiff
path: root/sound/firewire/oxfw/oxfw-stream.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-02-18 10:41:28 +0300
committerTakashi Iwai <tiwai@suse.de>2024-02-19 11:24:35 +0300
commit52592932405cecaaa0f4b8cb41128d014b96858c (patch)
tree4e8cf2dfdb767f4f68656107b6d789bdd1654d4f /sound/firewire/oxfw/oxfw-stream.c
parent4a486439d2ca85752c46711f373b6ddc107bb35d (diff)
downloadlinux-52592932405cecaaa0f4b8cb41128d014b96858c.tar.xz
ALSA: oxfw: add support for Miglia Harmony Audio
Miglia Technology ships Harmony Audio 2004. It uses Oxford Semiconductor OXFW970 for communication function in IEEE 1394 bus. This commit adds support for the model. In my opinion, the firmware of ASIC is really the initial stage, since it has the following quirks. * It skips several isochronous cycles to transmit isochronous packets when receiving any asynchronous transaction. * The value of dbc field in the transmitted packet is the number of accumulated quadlets in CIP payload, instead of the accumulated data blocks. Furthermore, the value includes the quadlets of CIP payload in the packet. * It neither supports AV/C Stream Format Information command nor AV/C Extended Stream Format Information command. * The vendor and model information in root directory of configuration ROM includes some mistakes. Additionally, when operating at 96.0 kHz, it often skips much isochronous cycles to transmit the isochronous packets. The issue is detected as cycle discontinuity and ALSA PCM application receives -EIO at any operation for PCM substream. I have never found any workaround yet. $ config-rom-pretty-printer < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 1024 04249e04 bus_info_length 4, crc_length 36, crc 40452 1028 31333934 bus_name "1394" 1032 20ff5003 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 255, max_rec 5 (64) 1036 0030e002 company_id 0030e0 | 1040 00454647 device_id 8594474567 | EUI-64 13757098081207879 root directory ----------------------------------------------------------------- 1044 00062d69 directory_length 6, crc 11625 1048 030030e0 vendor 1052 8100000a --> descriptor leaf at 1092 1056 1700f970 model 1060 81000011 --> descriptor leaf at 1128 1064 0c0083c0 node capabilities: per IEEE 1394 1068 d1000001 --> unit directory at 1072 unit directory at 1072 ----------------------------------------------------------------- 1072 00046ff9 directory_length 4, crc 28665 (should be 43676) 1076 1200a02d specifier id 1080 13010001 version 1084 1700f970 model 1088 8100000f --> descriptor leaf at 1148 descriptor leaf at 1092 ----------------------------------------------------------------- 1092 00085f8a leaf_length 8, crc 24458 1096 00000000 textual descriptor 1100 00000000 minimal ASCII 1104 4d69676c "Migl" 1108 69612054 "ia T" 1112 6563686e "echn" 1116 6f6c6f67 "olog" 1120 79204c74 "y Lt" 1124 642e0000 "d." descriptor leaf at 1128 ----------------------------------------------------------------- 1128 00040514 leaf_length 4, crc 1300 1132 00000000 textual descriptor 1136 00000000 minimal ASCII 1140 4f584657 "OXFW" 1144 20393730 " 970" descriptor leaf at 1148 ----------------------------------------------------------------- 1148 0005a1dc leaf_length 5, crc 41436 1152 00000000 textual descriptor 1156 00000000 minimal ASCII 1160 4861726d "Harm" 1164 6f6e7941 "onyA" 1168 7564696f "udio" Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20240218074128.95210-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/oxfw/oxfw-stream.c')
-rw-r--r--sound/firewire/oxfw/oxfw-stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/firewire/oxfw/oxfw-stream.c b/sound/firewire/oxfw/oxfw-stream.c
index 40716bb989c7..00f7feb91f92 100644
--- a/sound/firewire/oxfw/oxfw-stream.c
+++ b/sound/firewire/oxfw/oxfw-stream.c
@@ -177,6 +177,8 @@ static int init_stream(struct snd_oxfw *oxfw, struct amdtp_stream *stream)
flags |= CIP_JUMBO_PAYLOAD;
if (oxfw->quirks & SND_OXFW_QUIRK_WRONG_DBS)
flags |= CIP_WRONG_DBS;
+ if (oxfw->quirks & SND_OXFW_QUIRK_DBC_IS_TOTAL_PAYLOAD_QUADLETS)
+ flags |= CIP_DBC_IS_END_EVENT | CIP_DBC_IS_PAYLOAD_QUADLETS;
} else {
conn = &oxfw->in_conn;
c_dir = CMP_INPUT;