From: theflamefire89@gmail.com
To: cip-dev@lists.cip-project.org
Subject: Re: Reported 4.4.y-st issue from Flamefire #cip
Date: Wed, 22 Jun 2022 08:03:47 -0700 [thread overview]
Message-ID: <16290.1655910227166157122@lists.cip-project.org> (raw)
In-Reply-To: <20220622115233.GA7458@duo.ucw.cz>
[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]
>
> Upstream said this code is correct and affected drivers should be
> fixed, instead,
First this is a practical issue: There are proprietary drivers which likely will never get fixed.
And second I do not agree that this code is correct as it doesn't make sense to me:
- From snd_soc_put_volsw_sx:
if (mc->platform_max && val > mc->platform_max)
return -EINVAL;
if (val > max - min)
return -EINVAL;
And from snd_soc_info_volsw called by snd_soc_info_volsw_sx
mc->platform_max = mc->max; So if platform_max gets always set to max why would you compare `val` directly against platform_max but subtract min from max?
Or did upstream say that using a negative "min" is invalid? Example where this is used: https://github.com/sonyxperiadev/kernel/blob/5f3e8612a373f035fae72471dcbc37ec2110adde/sound/soc/codecs/wcd9335.c#L2255-L2256
I also find the following puzzling (in snd_soc_limit_volume): if (max <= mc->max) {
mc->platform_max = max;
i.e. a check against "max" setting "platform_max"?
Anyway I appreciate you taking care of this and hope the above input helps in guiding a decision.
Best Regards,
Alex
[-- Attachment #2: Type: text/html, Size: 1350 bytes --]
prev parent reply other threads:[~2022-06-22 15:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 14:53 Reported 4.4.y-st issue from Flamefire #cip Chris Paterson
2022-06-03 9:59 ` [cip-dev] " Pavel Machek
2022-06-13 15:16 ` theflamefire89
2022-06-22 11:52 ` [cip-dev] " Pavel Machek
2022-06-22 15:03 ` theflamefire89 [this message]
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=16290.1655910227166157122@lists.cip-project.org \
--to=theflamefire89@gmail.com \
--cc=cip-dev@lists.cip-project.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