summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt298.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5514', ↵Mark Brown2018-03-281-3/+4
|\ \ | | | | | | | | | 'asoc/topic/rt5616', 'asoc/topic/rt5631' and 'asoc/topic/rt5640' into asoc-next
| * | ASoC: rt298: don't turn off HV and VREF if headset is detectedBard Liao2018-03-201-3/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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 <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: hdac_hdmi/nau8825/rt286/rt298/rt5663/da7219: replace codec to componentKuninori Morimoto2018-02-121-106/+104
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we can replace Codec to Component. Let's do it. Because intal/rockchip boards are using multi-codecs in 1 driver, we need to update these all related drivers in same time. Otherwise compile error/warning happen Note: hdac_hdmi xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 nau8825 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt286 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt298 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 rt5663 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 da7219 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codecs: add const to snd_soc_codec_driver structuresBhumika Goyal2017-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt298: Add DMI match for Geminilake reference platformVinod Koul2017-02-161-0/+7
| | | | | | | | | | 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 <vinod.koul@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/rl6231', 'asoc/topic/rl6347a', ↵Mark Brown2016-12-121-2/+22
|\ \ | | | | | | | | | 'asoc/topic/rockchip', 'asoc/topic/rt286' and 'asoc/topic/rt298' into asoc-next
| | * ASoC: rt298: disable IRQ when jack is NULLBard Liao2016-11-291-2/+22
| |/ | | | | | | | | | | | | | | | | Disable IRQ when jack is NULL in rt298_mic_detect. So machine driver can use it in suspend/resume. Signed-off-by: Bard Liao <bardliao@realtek.com> Reviewed-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: rt298: fix jack type detect errorBard Liao2016-10-241-0/+5
|/ | | | | | | | | 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 <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codec duplicated callback function goes to component on rt298Kuninori Morimoto2016-08-081-6/+8
| | | | | | | | | | 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 <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge remote-tracking branch 'asoc/topic/rt298' into asoc-nextMark Brown2016-05-271-28/+23
|\
| * ASoC: rt298: fix capture doesn't work at some casesBard Liao2016-04-261-28/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: rt298: reset AD dilter is there is no MCLKBard Liao2016-04-261-0/+20
| | | | | | | | | | | | | | rt298 need to reset AD filter and the ADC settings will take effort. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt298: Add DMI match for Broxton-P reference platformVinod Koul2016-05-121-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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 <ramesh.babu@intel.com> Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt298: fix null deref on acpi driver dataVinod Koul2016-05-121-1/+1
|/ | | | | | | | | | ACPI driver data can be NULL so we need to check that before dereference the driver data. Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt298: Don't enable IRQ in i2c_probeBard Liao2016-02-241-1/+0
| | | | | | | | 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 <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt298: enable IRQ for jack detectionBard Liao2016-02-241-0/+6
| | | | | | | | There are some registers needed for enabling rt298 IRQ missed on current driver. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt298: fix remove unnedded clk settingBard Liao2015-11-161-2/+0
| | | | | | | The bit is no longer present. So remove it. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5640', ↵Mark Brown2015-10-261-3/+7
|\ \ | | | | | | | | | 'asoc/topic/samsung' and 'asoc/topic/sh' into asoc-next
| * \ Merge branch 'fix/rt298' of ↵Mark Brown2015-10-161-12/+12
| |\ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt298
| * | | ASoC: rt298: Make rt298_index_def constAxel Lin2015-10-161-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: rt298: set register non-volatile by defaultBard Liao2015-10-121-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | It is not necessary to set registers volatile. So, return false for default case of rt298_volatile_register. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/rl6347a', ↵Mark Brown2015-10-261-1/+0
|\ \ \ \ | | |/ / | |/| | | | | | 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next
| | * | ASoC: rl6347a: Clean up unneeded inclusion of header filesAxel Lin2015-09-241-1/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | Also move the include of sound/hda_verbs.h to rl6347a.h because it is used in rl6347a.h. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | / ASoC: rt298: fix wrong setting of gpio2_enBard Liao2015-10-211-1/+1
| |/ |/| | | | | | | | | | | The register value to enable gpio2 was incorrect. So fix it. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt298: correct index default valueBard Liao2015-10-161-12/+12
|/ | | | | | | | Some of the default value on rt298_index_def are incorrect. Change them to the correct value. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5640', ↵Mark Brown2015-08-301-2/+0
|\ | | | | | | 'asoc/topic/rt5651' and 'asoc/topic/rt5670' into asoc-next
| * ASoC: rt298: remove meanless pr_infoBard Liao2015-07-161-2/+0
| | | | | | | | | | | | | | This line doesn't include any information. So, remove it. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-151-1/+0
|/ | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: add rt298 codec driverBard Liao2015-07-091-0/+1274
It is the initial version of ALC298 codec driver. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>