[alsa-devel] [PATCH 07/15] ALSA: oxfw: Add support for AV/C stream format command to get/set supported stream formation
Takashi Sakamoto
o-takashi at sakamocchi.jp
Mon Dec 8 01:51:56 CET 2014
On Dec 6 2014 07:01, Clemens Ladisch wrote:
> Takashi Sakamoto wrote:
>> +++ b/sound/firewire/oxfw/oxfw-command.c
>> +int avc_stream_set_format(struct fw_unit *unit, enum avc_general_plug_dir dir,
>> + unsigned int pid, u8 *format, unsigned int len)
>> +{
>> + buf[0] = 0x00; /* CONTROL */
>> + buf[1] = 0xff; /* UNIT */
>> + buf[2] = 0xbf; /* EXTENDED STREAM FORMAT INFORMATION */
>> + buf[3] = 0xc0; /* SINGLE subfunction */
>> + buf[4] = dir; /* Plug Direction */
>> + buf[5] = 0x00; /* UNIT */
>> + buf[6] = 0x00; /* PCR (Isochronous Plug) */
>> + buf[7] = 0xff & pid; /* Plug ID */
>> + buf[8] = 0xff; /* Padding */
>> + buf[9] = 0xff; /* Support status in response */
>> + memcpy(buf + 10, format, len);
>> +
>> + /* do transaction and check buf[1-7] are the same against command */
>> + err = fcp_avc_transaction(unit, buf, len + 10, buf, len + 10,
>> + BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) |
>> + BIT(6) | BIT(7) | BIT(8));
>
> The comment says 1-7, the code says 1-8.
Oops, indeed.
I correct it in my next patchset with the other correction, in a few days.
Thanks
Takashi Sakamoto
o-takashi at sakamocchi.jp
More information about the Alsa-devel
mailing list