From: Dan Carpenter <dan.carpenter@oracle.com>
To: michael.wei.hong.sit@intel.com
Cc: alsa-devel@alsa-project.org
Subject: [bug report] ASoC: Intel: KMB: Enable TDM audio capture
Date: Tue, 25 Aug 2020 16:21:02 +0300 [thread overview]
Message-ID: <20200825132102.GA306074@mwanda> (raw)
Hello Michael Sit Wei Hong,
The patch 9c3bab3c4f15: "ASoC: Intel: KMB: Enable TDM audio capture"
from Aug 11, 2020, leads to the following static checker warning:
sound/soc/intel/keembay/kmb_platform.c:518 kmb_dai_hw_params()
warn: potential ! vs ~ typo
sound/soc/intel/keembay/kmb_platform.c
502 }
503
504 config->chan_nr = params_channels(hw_params);
505
506 switch (config->chan_nr) {
507 case 8:
508 case 4:
509 /*
510 * Platform is not capable of providing clocks for
511 * multi channel audio
512 */
513 if (kmb_i2s->master)
514 return -EINVAL;
515
516 write_val = ((config->chan_nr / 2) << TDM_CHANNEL_CONFIG_BIT) |
517 (config->data_width << DATA_WIDTH_CONFIG_BIT) |
518 !MASTER_MODE | TDM_OPERATION;
^^^^^^^^^^^^
MASTER_MODE is BIT(13). It's unclear what this is supposed to be. My
best guess is that the ! should just be deleted.
519
520 writel(write_val, kmb_i2s->pss_base + I2S_GEN_CFG_0);
521 break;
522 case 2:
523 /*
524 * Platform is only capable of providing clocks need for
525 * 2 channel master mode
526 */
527 if (!(kmb_i2s->master))
528 return -EINVAL;
529
530 write_val = ((config->chan_nr / 2) << TDM_CHANNEL_CONFIG_BIT) |
531 (config->data_width << DATA_WIDTH_CONFIG_BIT) |
532 MASTER_MODE | I2S_OPERATION;
533
534 writel(write_val, kmb_i2s->pss_base + I2S_GEN_CFG_0);
535 break;
536 default:
537 dev_dbg(kmb_i2s->dev, "channel not supported\n");
538 return -EINVAL;
539 }
regards,
dan carpenter
next reply other threads:[~2020-08-25 13:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 13:21 Dan Carpenter [this message]
2020-08-25 13:49 ` [bug report] ASoC: Intel: KMB: Enable TDM audio capture Sit, Michael Wei Hong
2020-08-25 13:58 ` Dan Carpenter
2020-08-25 14:47 ` Sit, Michael Wei Hong
2020-08-25 15:58 ` Pierre-Louis Bossart
2020-08-25 17:22 ` Sit, Michael Wei Hong
2020-08-25 18:23 ` Pierre-Louis Bossart
2020-08-26 3:09 ` Sit, Michael Wei Hong
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=20200825132102.GA306074@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=michael.wei.hong.sit@intel.com \
/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.