[PATCH 1/2] ALSA: usb-audio: Add DJM450 to Pioneer format quirk
Takashi Iwai
tiwai at suse.de
Tue Feb 2 12:41:04 CET 2021
On Tue, 02 Feb 2021 01:02:37 +0100,
Olivia Mackintosh wrote:
>
> Like the DJM-750, ensure that the format control message is passed to
> the device when opening a stream. It seems as though fmt->sync_ep is not
> always set when this function is called hence the passing of the value
> at the call site. If this can be fixed, fmt->sync_up should be used as
> the wvalue.
Could you give your Signed-off-by line?
> +static int pioneer_djm_set_format_quirk(struct snd_usb_substream *subs,
> + u16 windex)
> +{
> + unsigned int cur_rate = subs->data_endpoint->cur_rate;
> + u8 sr[3];
> + // Convert to little endian
> + sr[0] = cur_rate&0xff;
> + sr[1] = (cur_rate>>8)&0xff;
> + sr[2] = (cur_rate>>16)&0xff;
Better to have some appropriate spaces around operators.
Also, instead of open-code, you can use cpu_to_le32() and pass its
pointer, too.
thanks,
Takashi
More information about the Alsa-devel
mailing list