On Tue, 2018-10-02 at 12:16 +0900, Takashi Sakamoto wrote: > Hi Scott, > ... > I have an idea to invervene them: > > 1. For control events, in kernel land, driver module detects > changes of set of bitflags for physical controls, then queue > events to tell the change to userspace applications > (e.g. poll(2)). The queued events include information about > changed bitflags (e.g. a shape of u32 data). Userspace > applications execute read(2) then get the bitflags, then parse > it and emit userspace event by ports in ALSA sequencer > subsystem. > The driver and userspace application should pay enough > attention to share the queue. The driver can drop the oldest > queued events if the queue is full. > > 2. For level meter, in kernel land, driver module caches the > recent value. Userspace applications execute ioctl(2) with > unique command (You can see this kind of commands in > 'include/uapi/sound/firwire.h'). > > However, as long as I note[2], the purpose of some quadlets in the > image are not still identified: > > "Quadlet 00-15 show control messages. Quadlet 16-23 show analog input > level. Quadlet 24-31 shows digital ADAT input level. Quadlet 32-33 > shows digital S/PDIF input level. Quadlet 34-35 is unknown. On my FW-1884 34/35 is analog level of output 1/2. The "Monitor" level pot (as well as the master fader if enabled) control the level so if they are set at 0, then you will not see any signal on the 34/35. > Quadlet > 36-43 shows analog output level. 36-41 = analog outputs 3-8 > The other quadlets are unknown." 52: shows the current sample rate setting 010101xx = 44.1k 020102xx = 48k 810181xx = 88.2k 820182xx = 96k 52: Byte 1 shows the current clock source 0x01 = Internal 0x02 = Word Clock 0x03 = Digital In 0x04 = ADAT 54-55 appears to be the level of the internal "Monitor Mix". 57-58 appears to be the level of the stereo mix of the analog inputs 59: Byte 1 indicates what is routed to the Monitor Mix 0x01 = PCM Stream from computer 0x02 = Analog Inputs 0x03 = Both > We need further investigation to clear the unknown fields as much as > possible to add more codes in ALSA kernel land. Above is as far as I have gotten with the unknown fields. On the asynchronous side, I have mapped out the LED codes to the LEDs on the FW-1884 and discovered the registers for controlling the faders. -Scott _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel