From: Takashi Iwai <tiwai@suse.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de
Subject: Re: [PATCH v2 07/10] ALSA: oxfw: code refactoring for jumbo-payload quirk in OXFW970
Date: Mon, 17 May 2021 11:11:07 +0200 [thread overview]
Message-ID: <s5hsg2l67ys.wl-tiwai@suse.de> (raw)
In-Reply-To: <20210515071112.101535-8-o-takashi@sakamocchi.jp>
On Sat, 15 May 2021 09:11:09 +0200,
Takashi Sakamoto wrote:
> --- a/sound/firewire/oxfw/oxfw.h
> +++ b/sound/firewire/oxfw/oxfw.h
> @@ -32,6 +32,12 @@
> #include "../amdtp-am824.h"
> #include "../cmp.h"
>
> +enum snd_oxfw_quirk {
> + // Postpone transferring packets during handling asynchronous transaction. As a result,
> + // next isochronous packet includes more events than one packet can include.
> + SND_OXFW_QUIRK_JUMBO_PAYLOAD = 0x01,
> +};
> +
> /* This is an arbitrary number for convinience. */
> #define SND_OXFW_STREAM_FORMAT_ENTRIES 10
> struct snd_oxfw {
> @@ -43,6 +49,7 @@ struct snd_oxfw {
> bool registered;
> struct delayed_work dwork;
>
> + enum snd_oxfw_quirk quirks;
Declaring the field as this enum type for bit flags isn't really
right, IMO. Usually an enum *type* is used for storing only the
enumerated values as-is, but the actual code (in a later patch) stores
the combination of the defined values as bits.
That is, if a field is defined with an enum type, readers and
compilers may believe that only the defined values are stored there,
while the code doesn't follow that, which is a confusing situation.
I see that a similar pattern is used already in the firewire code, but
I don't think this justifies to introduce it to yet another place.
thanks,
Takashi
next prev parent reply other threads:[~2021-05-17 9:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-15 7:11 [PATCH v2 00/10] ALSA: oxfw: code refactoring for quirks specific to ASICs Takashi Sakamoto
2021-05-15 7:11 ` [PATCH v2 01/10] Revert "ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro" Takashi Sakamoto
2021-05-15 7:11 ` Takashi Sakamoto
2021-05-15 7:11 ` [PATCH v2 02/10] ALSA: oxfw: code refactoring for existent device entry with specifier_id and version Takashi Sakamoto
2021-05-15 7:11 ` [PATCH v2 03/10] ALSA: oxfw: code refactoring to detect mackie models Takashi Sakamoto
2021-05-15 7:11 ` [PATCH v2 04/10] ALSA: oxfw: add explicit device entry for Loud Technologies Tapco Link.FireWire 4x6 Takashi Sakamoto
2021-05-15 7:11 ` [PATCH v2 05/10] ALSA: oxfw: add explicit device entry for Loud Technologies Mackie Onyx Sattelite Takashi Sakamoto
2021-05-15 7:11 ` [PATCH v2 06/10] ALSA: oxfw: add comment for the type of ASICs Takashi Sakamoto
2021-05-15 7:11 ` [PATCH v2 07/10] ALSA: oxfw: code refactoring for jumbo-payload quirk in OXFW970 Takashi Sakamoto
2021-05-17 9:11 ` Takashi Iwai [this message]
2021-05-18 1:45 ` Takashi Sakamoto
2021-05-15 7:11 ` [PATCH v2 08/10] ALSA: firewire-lib: code refactoring for jumbo payload quirk Takashi Sakamoto
2021-05-15 7:11 ` [PATCH v2 09/10] ALSA: oxfw; code refactoring for wrong_dbs quirk Takashi Sakamoto
2021-05-17 9:11 ` Takashi Iwai
2021-05-15 7:11 ` [PATCH v2 10/10] ALSA: oxfw: add quirk flag for blocking transmission method Takashi Sakamoto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hsg2l67ys.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=o-takashi@sakamocchi.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.