Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: "Martin Povišer" <povik+lin@cutebit.org>
Cc: linux-sound@vger.kernel.org
Subject: [bug report] ASoC: tas2764: Apply Apple quirks
Date: Wed, 16 Apr 2025 14:12:02 +0300	[thread overview]
Message-ID: <Z_-QghDPBnqE3Y6X@stanley.mountain> (raw)

Hello Martin Povišer,

Commit f33b01e0947d ("ASoC: tas2764: Apply Apple quirks") from Apr 6,
2025 (linux-next), leads to the following Smatch static checker
warning:

	sound/soc/codecs/tas2764.c:128 tas2764_update_pwr_ctrl()
	warn: odd binop '0x3f & 0x80'

sound/soc/codecs/tas2764.c
    116 static int tas2764_update_pwr_ctrl(struct tas2764_priv *tas2764)
    117 {
    118         struct snd_soc_component *component = tas2764->component;
    119         unsigned int val;
    120         int ret;
    121 
    122         if (tas2764->dac_powered)
    123                 val = tas2764->unmuted ?
    124                         TAS2764_PWR_CTRL_ACTIVE : TAS2764_PWR_CTRL_MUTE;
    125         else
    126                 val = TAS2764_PWR_CTRL_SHUTDOWN;
    127 
--> 128         if (ENABLED_APPLE_QUIRKS & TAS2764_SHUTDOWN_DANCE)

TAS2764_SHUTDOWN_DANCE isn't an ENABLED_APPLE_QUIRKS and there isn't
a way to enable it without editing the code.

    129                 return tas2764_do_quirky_pwr_ctrl_change(tas2764, val);
    130 
    131         ret = snd_soc_component_update_bits(component, TAS2764_PWR_CTRL,
    132                                             TAS2764_PWR_CTRL_MASK, val);
    133         if (ret < 0)
    134                 return ret;
    135 
    136         return 0;
    137 }

regards,
dan carpenter

                 reply	other threads:[~2025-04-16 11:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Z_-QghDPBnqE3Y6X@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=povik+lin@cutebit.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox