<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/sound/soc/codecs/max98090.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/sound/soc/codecs/max98090.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/sound/soc/codecs/max98090.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-05-20T12:43:10Z</updated>
<entry>
<title>ASoC: max98090: Move check for invalid values before casting in max98090_put_enab_tlv()</title>
<updated>2022-05-20T12:43:10Z</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2022-05-19T22:31:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f7a344468105ef8c54086dfdc800e6f5a8417d3e'/>
<id>urn:sha1:f7a344468105ef8c54086dfdc800e6f5a8417d3e</id>
<content type='text'>
Validation of signed input should be done before casting to unsigned int.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Suggested-by: Mark Brown &lt;broonie@kernel.org&gt;
Fixes: 2fbe467bcbfc ("ASoC: max98090: Reject invalid values in custom control put()")
Link: https://lore.kernel.org/r/1652999486-29653-1-git-send-email-khoroshilov@ispras.ru
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: Pull in fixes</title>
<updated>2022-05-04T14:30:32Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2022-05-04T14:30:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c0b38be14f1d843c29edc763d3df3cc741a2bf10'/>
<id>urn:sha1:c0b38be14f1d843c29edc763d3df3cc741a2bf10</id>
<content type='text'>
Cleanups for the dmaengine code build on top of current fixes.
</content>
</entry>
<entry>
<title>ASoC: max98090: Fix event generation for custom controls</title>
<updated>2022-05-03T12:42:25Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2022-04-28T11:32:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a0746cbd0b8224c4c0e4ae59968075cb7c14762a'/>
<id>urn:sha1:a0746cbd0b8224c4c0e4ae59968075cb7c14762a</id>
<content type='text'>
The previous fix for event generation for custom controls compared the
value already in the register with the value being written, missing the
logic that only applies the value to the register when the control is
already enabled. Fix this, compare the value cached in the driver data
rather than the register.

This should really be an autodisable control rather than open coded.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20220428113221.15326-1-broonie@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: max980*: use i2c_match_id and simple i2c probe</title>
<updated>2022-04-25T12:58:53Z</updated>
<author>
<name>Stephen Kitt</name>
<email>steve@sk2.org</email>
</author>
<published>2022-04-15T16:06:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4ac8ebb6cc28cbd99e10d7a4772be1c4da5af130'/>
<id>urn:sha1:4ac8ebb6cc28cbd99e10d7a4772be1c4da5af130</id>
<content type='text'>
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.

In the context of an i2c probe, i2c_match_id with the module id table
and the probed client never returns null, so removing the null check
on the i2c_device_id pointer is safe.

The i2c id tables are moved up before the probe function, as
suggested by Wolfram Sang.

Signed-off-by: Stephen Kitt &lt;steve@sk2.org&gt;
Link: https://lore.kernel.org/r/20220415160613.148882-4-steve@sk2.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: max98090: Generate notifications on changes for custom control</title>
<updated>2022-04-25T12:58:16Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2022-04-20T19:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=13fcf676d9e102594effc686d98521ff5c90b925'/>
<id>urn:sha1:13fcf676d9e102594effc686d98521ff5c90b925</id>
<content type='text'>
The max98090 driver has some custom controls which share a put() function
which returns 0 unconditionally, meaning that events are not generated
when the value changes. Fix that.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20220420193454.2647908-2-broonie@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: max98090: Reject invalid values in custom control put()</title>
<updated>2022-04-25T12:58:15Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2022-04-20T19:34:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2fbe467bcbfc760a08f08475eea6bbd4c2874319'/>
<id>urn:sha1:2fbe467bcbfc760a08f08475eea6bbd4c2874319</id>
<content type='text'>
The max98090 driver has a custom put function for some controls which can
only be updated in certain circumstances which makes no effort to validate
that input is suitable for the control, allowing out of spec values to be
written to the hardware and presented to userspace. Fix this by returning
an error when invalid values are written.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20220420193454.2647908-1-broonie@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: max98090: remove duplicate status reads and useless assignmment</title>
<updated>2021-08-05T14:38:53Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2021-08-04T19:24:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=221034aca4fdcf8a6552267d2d3aa6825fae29b1'/>
<id>urn:sha1:221034aca4fdcf8a6552267d2d3aa6825fae29b1</id>
<content type='text'>
The logic for the jack detection has not changed since the first
commit for this driver. Remove a duplicate read and remove useless
assignment

sound/soc/codecs/max98090.c:2170:6: style: Variable 'reg' is
reassigned a value before the old one has been
used. [redundantAssignment]
 reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
     ^

sound/soc/codecs/max98090.c:2161:7: note: reg is assigned
  reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
      ^

sound/soc/codecs/max98090.c:2170:6: note: reg is overwritten
 reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
     ^

sound/soc/codecs/max98090.c:2170:6: style: Variable 'reg' is
reassigned a value before the old one has been
used. [redundantAssignment]
 reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
     ^

sound/soc/codecs/max98090.c:2167:7: note: reg is assigned
  reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
      ^

sound/soc/codecs/max98090.c:2170:6: note: reg is overwritten
 reg = snd_soc_component_read(component, M98090_REG_JACK_STATUS);
     ^

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210804192456.278702-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: max98090: remove useless assignment</title>
<updated>2021-03-18T13:50:44Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2021-03-12T18:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=226a783f3dcf7f565c173627d565135424ee0be9'/>
<id>urn:sha1:226a783f3dcf7f565c173627d565135424ee0be9</id>
<content type='text'>
cppcheck warning:

sound/soc/codecs/max98090.c:1835:16: style: Variable 'test_diff' is
assigned a value that is never used. [unreadVariable]
 int test_diff = INT_MAX;
               ^

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210312182246.5153-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: max98090: skip of_device_id table when !CONFIG_OF</title>
<updated>2020-11-26T13:07:16Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2020-11-25T16:44:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ac792c0ab3db9392bbbc7023fefb41bc9d467bfc'/>
<id>urn:sha1:ac792c0ab3db9392bbbc7023fefb41bc9d467bfc</id>
<content type='text'>
The driver can match by multiple methods.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  sound/soc/codecs/max98090.c:2671:34: warning: ‘max98090_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Link: https://lore.kernel.org/r/20201125164452.89239-22-krzk@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: codecs: max*: merge .digital_mute() into .mute_stream()</title>
<updated>2020-07-16T22:06:14Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2020-07-09T01:56:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=18e028e22ebfe362656f534c540d7b3c6c094bd0'/>
<id>urn:sha1:18e028e22ebfe362656f534c540d7b3c6c094bd0</id>
<content type='text'>
snd_soc_dai_digital_mute() is internally using both
mute_stream() (1) or digital_mute() (2), but the difference between
these 2 are only handling direction.
We can merge digital_mute() into mute_stream

	int snd_soc_dai_digital_mute(xxx, int direction)
	{
		...
		else if (dai-&gt;driver-&gt;ops-&gt;mute_stream)
(1)			return dai-&gt;driver-&gt;ops-&gt;mute_stream(xxx, direction);
		else if (direction == SNDRV_PCM_STREAM_PLAYBACK &amp;&amp;
			 dai-&gt;driver-&gt;ops-&gt;digital_mute)
(2)			return dai-&gt;driver-&gt;ops-&gt;digital_mute(xxx);
		...
	}

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Reviewed-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Link: https://lore.kernel.org/r/87y2ntwix0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
