<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/sound/soc/codecs/rt5670.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/rt5670.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/sound/soc/codecs/rt5670.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-06T22:37:55Z</updated>
<entry>
<title>ASoC: rt*: use simple i2c probe function</title>
<updated>2022-04-06T22:37:55Z</updated>
<author>
<name>Stephen Kitt</name>
<email>steve@sk2.org</email>
</author>
<published>2022-04-05T13:03:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=35b8885805002564906086cbd691e88850257294'/>
<id>urn:sha1:35b8885805002564906086cbd691e88850257294</id>
<content type='text'>
The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

Signed-off-by: Stephen Kitt &lt;steve@sk2.org&gt;
Link: https://lore.kernel.org/r/20220405130326.2107293-1-steve@sk2.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: codecs: Fix spelling mistake "Unsupport" -&gt; "Unsupported"</title>
<updated>2021-09-27T12:01:05Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2021-09-24T23:10:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a4db95b2824157bdf0394da429ea49280bfad6b9'/>
<id>urn:sha1:a4db95b2824157bdf0394da429ea49280bfad6b9</id>
<content type='text'>
There are spelling mistakes in dev_err error messages. Fix them.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Link: https://lore.kernel.org/r/20210924231003.144502-1-colin.king@canonical.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt5670: Add a rt5670_components() helper</title>
<updated>2021-04-02T15:13:23Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-04-02T14:07:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3d534537648bd7d7a82f2becc9ded99a4b228a6a'/>
<id>urn:sha1:3d534537648bd7d7a82f2becc9ded99a4b228a6a</id>
<content type='text'>
The rt5670 codec driver uses DMI quirks to configure the DMIC data-pins,
which means that it knows which DMIC interface is used on a specific
device.

ATM we duplicate this DMI matching inside the UCM profiles to select
the right DMIC interface. Add a rt5670_components() helper which the
machine-driver can use to set the components string of the card so
that UCM can get the info from the components string.

This way we only need to add new DMI quirks in one place.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210402140747.174716-6-hdegoede@redhat.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt5670: Add a quirk for the Dell Venue 10 Pro 5055</title>
<updated>2021-04-02T15:13:22Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-04-02T14:07:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=84cb0d5581b6a7bd5d96013f67e9f2eb0c7b4378'/>
<id>urn:sha1:84cb0d5581b6a7bd5d96013f67e9f2eb0c7b4378</id>
<content type='text'>
Add a quirk with the jack-detect and dmic settings necessary to make
jack-detect and the builtin mic work on Dell Venue 10 Pro 5055 tablets.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210402140747.174716-5-hdegoede@redhat.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt5670: clarify expression</title>
<updated>2021-03-10T13:10:10Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2021-03-02T21:25:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7ad9b8d28d3f2997b4af0a074e6f609ffb5d32a7'/>
<id>urn:sha1:7ad9b8d28d3f2997b4af0a074e6f609ffb5d32a7</id>
<content type='text'>
cppcheck warning:

sound/soc/codecs/rt5670.c:2519:61: style: Boolean result is used in
bitwise operation. Clarify expression with
parentheses. [clarifyCondition]
  (pll_code.m_bp ? 0 : pll_code.m_code) &lt;&lt; RT5670_PLL_M_SFT |
                                                            ^

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210302212527.55158-20-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt5670: Add emulated 'DAC1 Playback Switch' control</title>
<updated>2021-03-10T12:48:35Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-02-15T14:21:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=42121c2645d229d348399ad278b6c3fd224bd6a2'/>
<id>urn:sha1:42121c2645d229d348399ad278b6c3fd224bd6a2</id>
<content type='text'>
For reliable output-mute LED control we need a "DAC1 Playback Switch"
control. The "DAC Playback volume" control is the only control in the
path from the DAC1 data input to the speaker output, so the UCM profile
for the speaker output will have its PlaybackMixerElem set to "DAC1".

But userspace (pulseaudio) will set the "DAC1 Playback Volume" control to
its softest setting (which is not fully muted) while still showing the
speaker as being enabled at a low volume in the UI.

If we were to set the SNDRV_CTL_ELEM_ACCESS_SPK_LED on the "DAC1 Playback
Volume" control, this would mean then what pressing KEY_VOLUMEDOWN the
speaker-mute LED (embedded in the volume-mute toggle key) would light
while the UI is still showing the speaker as being enabled at a low
volume, meaning that the UI and the LED are out of sync.

Only after an _extra_ KEY_VOLUMEDOWN press would the UI show the
speaker as being muted.

The path from DAC1 data input to the speaker output does have
a digital mixer with DAC1's data as one of its inputs direclty after
the "DAC1 Playback Volume" control.

This commit adds an emulated "DAC1 Playback Switch" control by:

1. Declaring the enable flag for that mixers DAC1 input as well as the
"DAC1 Playback Switch" control both as SND_SOC_NOPM controls.

2. Storing the settings of both controls as driver-private data

3. Only clearing the mute flag for the DAC1 input of that mixer if the
stored values indicate both controls are enabled.

This is a preparation patch for adding "audio-mute" LED trigger support.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20210215142118.308516-5-hdegoede@redhat.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt5670: Remove ADC vol-ctrl mute bits poking from Sto1 ADC mixer settings</title>
<updated>2021-03-10T12:48:34Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-02-15T14:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=02aa946ef3762aa456d87cc55606667942b3f354'/>
<id>urn:sha1:02aa946ef3762aa456d87cc55606667942b3f354</id>
<content type='text'>
The SND_SOC_DAPM_MIXER declaration for "Sto1 ADC MIXL" and "Sto1 ADC MIXR"
was using the mute bits from the RT5670_STO1_ADC_DIG_VOL control as mixer
master mute bits.

But these bits are already exposed to userspace as controls as part of the
"ADC Capture Volume" / "ADC Capture Switch" control pair:

        SOC_DOUBLE("ADC Capture Switch", RT5670_STO1_ADC_DIG_VOL,
                RT5670_L_MUTE_SFT, RT5670_R_MUTE_SFT, 1, 1),
        SOC_DOUBLE_TLV("ADC Capture Volume", RT5670_STO1_ADC_DIG_VOL,
                        RT5670_L_VOL_SFT, RT5670_R_VOL_SFT,
                        127, 0, adc_vol_tlv),

Both the fact that the mute bits belong to the same reg as the vol-ctrl
and the "Digital Mixer Path" diagram in the datasheet clearly shows that
these mute bits are not part of the mixer and having 2 separate controls
poking at the same bits is a bad idea.

Remove the master-mute bits settings from the  "Sto1 ADC MIXL" and
"Sto1 ADC MIXR" DAPM widget declarations, avoiding these bits getting
poked from 2 different places.

This should not cause any issues for userspace. AFAICT the rt567x codecs
are only used on x86/ACPI devices and the UCM profiles used there already
set the "ADC Capture Switch" as needed.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20210215142118.308516-4-hdegoede@redhat.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt5670: Remove 'HP Playback Switch' control</title>
<updated>2021-03-10T12:48:32Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-02-15T14:21:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=caba8d764770b6824391c5bf3c3eba6e51b69330'/>
<id>urn:sha1:caba8d764770b6824391c5bf3c3eba6e51b69330</id>
<content type='text'>
The RT5670_L_MUTE_SFT and RT5670_R_MUTE_SFT bits (bits 15 and 7) of the
RT5670_HP_VOL register are set / unset by the headphones deplop code
run by rt5670_hp_event() on SND_SOC_DAPM_POST_PMU / SND_SOC_DAPM_PRE_PMD.

So we should not also export a control to userspace which toggles these
same bits.

This should not cause any issues for userspace. AFAICT the rt567x codecs
are only used on x86/ACPI devices and the UCM profiles used there do not
use the "HP Playback Switch" control.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20210215142118.308516-3-hdegoede@redhat.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt5670: Remove 'OUT Channel Switch' control</title>
<updated>2021-03-10T12:48:31Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-02-15T14:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d917b5dde660b11abd757bf99a29353c36880b2c'/>
<id>urn:sha1:d917b5dde660b11abd757bf99a29353c36880b2c</id>
<content type='text'>
The "OUT Channel Switch" control is a left over from code copied from
thr rt5640 codec driver.

With the rt5640 codec driver the output volume controls have 2 pairs of
mute bits:
bit 7, 15: Mute Control for Spk/Headphone/Line Output Port
bit 6, 14: Mute Control for Spk/Headphone/Line Volume Channel

Bits 7 and 15 are normal mute bits on the rt5670/5672 which are
controlled by 2 dapm widgets:
	SND_SOC_DAPM_SWITCH("LOUT L Playback", SND_SOC_NOPM, 0, 0,
			    &amp;lout_l_enable_control),
	SND_SOC_DAPM_SWITCH("LOUT R Playback", SND_SOC_NOPM, 0, 0,
			    &amp;lout_r_enable_control),

But on the 5670/5672 bit 6 is always reserved, where as bit 14 is
"LOUT Differential Mode" on the 5670 and also reserved on the 5672.

So the "OUT Channel Switch" control which is controlling bits 6+14
of the "LINE Output Control" register is bogus -&gt; remove it.

This should not cause any issues for userspace. AFAICT the rt567x codecs
are only used on x86/ACPI devices and the UCM profiles used there do not
use the "OUT Channel Switch" control.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20210215142118.308516-2-hdegoede@redhat.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt*: sync parameter naming (rate/sample_bits)</title>
<updated>2021-01-21T12:37:59Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2021-01-15T04:54:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bc03b3910ef6e228ef8b192e08030a1e177ad273'/>
<id>urn:sha1:bc03b3910ef6e228ef8b192e08030a1e177ad273</id>
<content type='text'>
This patch syncs naming rule.

 - xxx_rates;
 + xxx_rate;

 - xxx_samplebits;
 + xxx_sample_bits;

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