Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 4122 file(s).
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Enrico Weigelt <[email protected]>
Reviewed-by: Kate Stewart <[email protected]>
Reviewed-by: Allison Randal <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Reported by Coccinelle:
sound/soc/codecs/rt298.c:992:6-8: WARNING: Comparison to bool
sound/soc/codecs/rt298.c:995:6-9: WARNING: Comparison to bool
sound/soc/codecs/rt298.c:317:5-7: WARNING: Comparison to bool
sound/soc/codecs/rt298.c:320:5-8: WARNING: Comparison to bool
sound/soc/codecs/rt298.c:348:5-7: WARNING: Comparison to bool
sound/soc/codecs/rt298.c:351:5-8: WARNING: Comparison to bool
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
"HV" and "VREF" will be powered up when jack type detection process is
started and will be powered off when jack type detection process is finished.
It will generate an unexpected interrupt signal when they are powered
up during the capture process. Codec driver will do the jack type detection
process and we can't capture properly before the jack detection process is
finished. This patch will not power off the "HV" and "VREF" widgets if
headset is detected and it will solve the unexpected interrupt issue. As a
result, it will also solve the silence data captured at the beginning in
headset mic recording issue.
Signed-off-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Declare snd_soc_codec_driver structures as const as they are only passed
as an argument to the function snd_soc_register_codec. This argument is
of type const, so declare the structures with this property as const.
In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in
a copy operation along with getting passed to snd_soc_register_codec.
So, it can be made const too.
Done using Coccinelle:
@match disable optional_qualifier@
identifier s;
position p;
@@
static struct snd_soc_codec_driver s@p={...};
@good1@
identifier match.s;
position p;
@@
snd_soc_register_codec(...,&s@p,...)
@bad@
identifier match.s;
position p!={match.p,good1.p};
@@
s@p
@depends on !bad disable optional_qualifier@
identifier match.s;
@@
static
+const
struct snd_soc_codec_driver s={...};
Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Geminilake reference platform also uses combo jack for audio connector
so we need to set codec pdata to use this based on DMI match for this
board.
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Subhransu S. Prusty <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Disable IRQ when jack is NULL in rt298_mic_detect. So machine driver
can use it in suspend/resume.
Signed-off-by: Bard Liao <[email protected]>
Reviewed-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
rt298_jack_detect may be called before card is instantiated. And
snd_soc_dapm_force_enable_pin will not work in that case. So, update
bit manually by regmap_update_bits.
Signed-off-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
codec driver and component driver has duplicated callback functions,
and codec side functions are just copied to component side when
register timing. This was quick-hack, but no longer needed.
This patch moves these functions from codec driver to component driver.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Broxton-P reference platform also uses combo jack for audio
connector so we need to set codec pdata to use this based on DMI
match for this board.
Signed-off-by: Ramesh Babu <[email protected]>
Signed-off-by: Senthilnathan Veppur <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
Acked-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
ACPI driver data can be NULL so we need to check that before
dereference the driver data.
Signed-off-by: Senthilnathan Veppur <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
Acked-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
RT298_CBJ_CTRL1(0x4f) bit 10 is needed for headset capture. It
will be turned off when "VREF" widget is on and be turned on when
bias level is ON. It is odd. And if "VREF" is turned on in bias
level is ON, RT298_CBJ_CTRL1(0x4f) bit 10 will be turned off.
This patch move the bit control from rt298_set_bias_level and
rt298_vref_event to rt298_jack_detect. So it will be turned on
once a jack is plugged in.
Signed-off-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
rt298 need to reset AD filter and the ADC settings will take effort.
Signed-off-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The IRQ function should not be enabled before irq handler is registered.
In fact, it is done in rt298_probe. So remove it from rt298_i2c_probe.
Signed-off-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
There are some registers needed for enabling rt298 IRQ missed on
current driver.
Signed-off-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The register value to enable gpio2 was incorrect. So fix it.
Signed-off-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The index_cache is per instance run time state but rt298_index_def is not.
Make rt298_index_def const and make a copy of memory for index_cache rather
than directly use the rt298_index_def.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Some of the default value on rt298_index_def are incorrect. Change
them to the correct value.
Signed-off-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
It is not necessary to set registers volatile. So, return false
for default case of rt298_volatile_register.
Signed-off-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Also move the include of sound/hda_verbs.h to rl6347a.h because it is used
in rl6347a.h.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Mark Brown <[email protected]>