From: Dan Carpenter <dan.carpenter@oracle.com>
To: o-takashi@sakamocchi.jp
Cc: alsa-devel@alsa-project.org
Subject: [bug report] ALSA: firewire-motu: add support for MOTU 828mk3 (FireWire/Hybrid) as a model with protocol version 3
Date: Fri, 31 Mar 2017 15:50:18 +0300 [thread overview]
Message-ID: <20170331123859.GA30666@mwanda> (raw)
Hello Takashi Sakamoto,
The patch 5992e30034c4: "ALSA: firewire-motu: add support for MOTU
828mk3 (FireWire/Hybrid) as a model with protocol version 3" from Mar
22, 2017, leads to the following static checker warning:
sound/firewire/motu/motu-protocol-v3.c:104 v3_get_clock_source()
warn: mask and shift to zero
sound/firewire/motu/motu-protocol-v3.c
90 static int v3_get_clock_source(struct snd_motu *motu,
91 enum snd_motu_clock_source *src)
92 {
93 __be32 reg;
94 u32 data;
95 unsigned int val;
96 int err;
97
98 err = snd_motu_transaction_read(motu, V3_CLOCK_STATUS_OFFSET, ®,
99 sizeof(reg));
100 if (err < 0)
101 return err;
102 data = be32_to_cpu(reg);
103
104 val = (data & V3_CLOCK_SOURCE_MASK) >> V3_CLOCK_SOURCE_SHIFT;
0xff >> 8
val is always zero. These are the only places we use
V3_CLOCK_SOURCE_MASK and V3_CLOCK_SOURCE_SHIFT so I have no idea what
it should be.
105 if (val == 0x00) {
106 *src = SND_MOTU_CLOCK_SOURCE_INTERNAL;
107 } else if (val == 0x01) {
108 *src = SND_MOTU_CLOCK_SOURCE_WORD_ON_BNC;
109 } else if (val == 0x10) {
110 *src = SND_MOTU_CLOCK_SOURCE_SPDIF_ON_COAX;
111 } else if (val == 0x18 || val == 0x19) {
112 err = snd_motu_transaction_read(motu, V3_OPT_IFACE_MODE_OFFSET,
113 ®, sizeof(reg));
114 if (err < 0)
115 return err;
regards,
dan carpenter
next reply other threads:[~2017-03-31 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 12:50 Dan Carpenter [this message]
2017-03-31 13:29 ` [bug report] ALSA: firewire-motu: add support for MOTU 828mk3 (FireWire/Hybrid) as a model with protocol version 3 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=20170331123859.GA30666@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--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.