regmap: Add support for 24 bit wide register addresses
Subsystems (5)
Lars-Peter Clausen
maintainerPATCH 1/8 regmap: Add support for 24 bit wide register addresses
Since regmap already has support for formatting 24 bit wide values, so adding support for 24 bit wide registers is pretty much straight forward.
--- drivers/base/regmap/regmap.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/base/regmap/regmap.c +6 -0
@@ -500,6 +500,12 @@ struct regmap *regmap_init(struct device *dev, }break ; +case 24 : +if (reg_endian !=REGMAP_ENDIAN_BIG ) + goto err_map; + map->format.format_reg = regmap_format_24; +break ; +case 32 :switch (reg_endian) {case REGMAP_ENDIAN_BIG :
Signature · 1 line
1.8.0
Lars-Peter Clausen
maintainerPATCH 2/8 ASoC: Add support for virtual switch controls
Virtual switches are similar to virtual MUX controls. It does not have a representation in the actual hardware but allows to control the DAPM routing by enabling or disabling a input path into the mixer. This is useful if we want to present a way to the user to for example mute a path despite the absence of a separate mute control in hardware.
More specific this will be used by the ADAU1361 driver where the hardware has a mute control for each of the DAC output paths, but we have to make sure that the path is muted whenever the DAC is disabled. So the mute switches needs to be controlled by DAPM so it can disable them before disabling the DAC. On the other hand we still want to be to mute individual paths. This will be accomplished by using virtual switch controls.
--- include/sound/soc-dapm.h | 10 +++++++ sound/soc/soc-dapm.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 87 insertions(+), 1 deletion(-)
include/sound/soc-dapm.h +10 -0
@@ -257,6 +257,12 @@ struct device; .info = snd_soc_info_volsw, \ .get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \ .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } +#define SOC_DAPM_SINGLE_VIRT (xname, shift, max) \ +{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ + .info = snd_soc_info_volsw, \ + .get = snd_soc_dapm_get_volsw_virt, \ + .put = snd_soc_dapm_put_volsw_virt, \ + .private_value = SOC_SINGLE_VALUE(SND_SOC_NOPM, shift, max, 0) }#define SOC_DAPM_SINGLE_TLV (xname, reg, shift, max, invert, tlv_array) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ .info = snd_soc_info_volsw, \
@@ -344,6 +350,10 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);int snd_soc_dapm_get_volsw (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol); +int snd_soc_dapm_put_volsw_virt (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol); +int snd_soc_dapm_get_volsw_virt (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol);int snd_soc_dapm_get_enum_double (struct snd_kcontrol *kcontrol,struct snd_ctl_elem_value *ucontrol); int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
sound/soc/soc-dapm.c +77 -1
90 lines not on this page · raw message
Signature · 1 line
1.8.0
A message that is not in the archive (sent off-list or not yet received): 1357833977-3682-2-git-send-email-lars-Qo5EllUWu/[email protected]
Re: [PATCH 2/8] ASoC: Add support for virtual switch controls
Quoted 6 lines · Lars-Peter Clausen
More specific this will be used by the ADAU1361 driver where the hardware has a mute control for each of the DAC output paths, but we have to make sure that the path is muted whenever the DAC is disabled. So the mute switches needs to be controlled by DAPM so it can disable them before disabling the DAC. On the other hand we still want to be to mute individual paths. This will be accomplished by using virtual switch controls.
This doesn't sound like it does quite what you want - it means you don't actually end up with a mute control, only a power control (which is also going to affect everything else in the path). I'd expect to see something like this implemented by having a control that has a specified value forced in the register while the control is enabled (kind of the opposite of a supply). This is a fairly common need for older parts though it's unusual to see it on a new device.
_______________________________________________
Uclinux-dist-devel mailing list Uclinux-dist-devel-ZG0+EudsQA8dtHy/[email protected]
https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel
Lars-Peter Clausen
maintainerRe: [PATCH 2/8] ASoC: Add support for virtual switch controls
Quoted 9 lines · Mark Brown
Quoted 6 lines · Lars-Peter Clausen
More specific this will be used by the ADAU1361 driver where the hardware has a mute control for each of the DAC output paths, but we have to make sure that the path is muted whenever the DAC is disabled. So the mute switches needs to be controlled by DAPM so it can disable them before disabling the DAC. On the other hand we still want to be to mute individual paths. This will be accomplished by using virtual switch controls.
Quoted 7 lines
This doesn't sound like it does quite what you want - it means you don't actually end up with a mute control, only a power control (which is also going to affect everything else in the path). I'd expect to see something like this implemented by having a control that has a specified value forced in the register while the control is enabled (kind of the opposite of a supply). This is a fairly common need for older parts though it's unusual to see it on a new device.
I think I want the opposite of what you just described. I want to be able to overwrite the control setting based on the power state.
The hardware setup looks a bit like this.
+------------+
/---- [Mute] ---- | Left Mixer | ....
+----------+ / +------------+
| Left DAC | -<
+----------+ \ +-------------+
\---- [Mute] ---- | Right Mixer | ...
+-------------+Same for the Right DAC. The DAC output goes to GND when the DAC is disabled. If the mute control is enabled its output goes to midscale otherwise. So whenever the DAC is disabled we need to make sure that all mute controls after the DAC output are also enabled to avoid pop noises.
Still we want to be able to enable a mute control even if the DAC is enabled. For example to route only the left DAC to the left mixer and the right DAC to the right mixer.
In ASoC I modeled this by letting DAPM take care of mute controls. E.g. the mute control gets disabled if there is an active path from the DAC through the mixer to one of the outputs and gets disabled otherwise. This makes sure that when the DAC is powered down (when there is no active path from the DAC to any of the outputs) each mute control is also enabled. The virtual switches now allow disable a path from the DAC to the mixer, which in turn will cause DAPM to enable the mute control. This is similar to how the virtual enums already work.
- Lars
Re: [PATCH 2/8] ASoC: Add support for virtual switch controls
Quoted 10 lines · Lars-Peter Clausen
Quoted 5 lines · Mark Brown
going to affect everything else in the path). I'd expect to see something like this implemented by having a control that has a specified value forced in the register while the control is enabled (kind of the opposite of a supply). This is a fairly common need for older parts though it's unusual to see it on a new device.
I think I want the opposite of what you just described. I want to be able to overwrite the control setting based on the power state.
Right, just a thinko though - you see the point though.
Quoted 8 lines
In ASoC I modeled this by letting DAPM take care of mute controls. E.g. the mute control gets disabled if there is an active path from the DAC through the mixer to one of the outputs and gets disabled otherwise. This makes sure that when the DAC is powered down (when there is no active path from the DAC to any of the outputs) each mute control is also enabled. The virtual switches now allow disable a path from the DAC to the mixer, which in turn will cause DAPM to enable the mute control. This is similar to how the virtual enums already work.
Virtual enums do actually end up routing, that's not what a mute control usually does. You can do the above in the manner I suggested, just have the register forced to a particular value when the DAC is disabled.
A message that is not in the archive (sent off-list or not yet received): 20130111124535.GZ20956-yzvPICuk2AATkU/[email protected]
Re: [PATCH 2/8] ASoC: Add support for virtual switch controls
Quoted 23 lines · Mark Brown
Quoted 10 lines · Lars-Peter Clausen
Quoted 5 lines · Mark Brown
going to affect everything else in the path). I'd expect to see something like this implemented by having a control that has a specified value forced in the register while the control is enabled (kind of the opposite of a supply). This is a fairly common need for older parts though it's unusual to see it on a new device.
I think I want the opposite of what you just described. I want to be able to overwrite the control setting based on the power state.
Right, just a thinko though - you see the point though.
Quoted 8 lines
In ASoC I modeled this by letting DAPM take care of mute controls. E.g. the mute control gets disabled if there is an active path from the DAC through the mixer to one of the outputs and gets disabled otherwise. This makes sure that when the DAC is powered down (when there is no active path from the DAC to any of the outputs) each mute control is also enabled. The virtual switches now allow disable a path from the DAC to the mixer, which in turn will cause DAPM to enable the mute control. This is similar to how the virtual enums already work.
Quoted 3 lines
Virtual enums do actually end up routing, that's not what a mute control usually does. You can do the above in the manner I suggested, just have the register forced to a particular value when the DAC is disabled.
Well, that's what the code does. The alternative is to implement more or less in the driver. Have custom put/get callbacks for the controls, which write to a shadow register, only if the DAC is enabled the shadow value gets written to the real register. And listen to the DAC powerdown/powerup events, when it is powered down enable all hw mutes, when it is enabled restore the shadow register value. The virtual control more or less implements it in a generic manner so it does not have to be implemented by each driver which needs this on its own.
- Lars
Re: [PATCH 2/8] ASoC: Add support for virtual switch controls
Quoted 7 lines · Lars-Peter Clausen
Quoted 3 lines · Mark Brown
Virtual enums do actually end up routing, that's not what a mute control usually does. You can do the above in the manner I suggested, just have the register forced to a particular value when the DAC is disabled.
Well, that's what the code does. The alternative is to implement more or
No, it's not (at least not according to the changelog). It implements a totally separate virtual control.
Quoted 4 lines
less in the driver. Have custom put/get callbacks for the controls, which write to a shadow register, only if the DAC is enabled the shadow value gets written to the real register. And listen to the DAC powerdown/powerup events, when it is powered down enable all hw mutes, when it is enabled
What makes you say that this must be open coded in the driver? We can modify the framework code...
Quoted 3 lines
restore the shadow register value. The virtual control more or less implements it in a generic manner so it does not have to be implemented by each driver which needs this on its own.
I'm having a really hard time seeing the equivalence here.
Lars-Peter Clausen
maintainerRe: [PATCH 2/8] ASoC: Add support for virtual switch controls
Quoted 11 lines · Mark Brown
Quoted 7 lines · Lars-Peter Clausen
Quoted 3 lines · Mark Brown
Virtual enums do actually end up routing, that's not what a mute control usually does. You can do the above in the manner I suggested, just have the register forced to a particular value when the DAC is disabled.
Well, that's what the code does. The alternative is to implement more or
No, it's not (at least not according to the changelog). It implements a totally separate virtual control.
What do you mean by 'separate'? Maybe this is was causes the confusion. Do you mean a separate DAPM control, like DAPM_SWITCH? That's not what the patch does it creates a virtual kcontrol, which can be used to control a mixers input. It's the pendant to SOC_DAPM_ENUM_VIRT not to SND_SOC_DAPM_VIRT_MUX. I realize that the commit message may have been a bit ambiguous in that regard.
- Lars
A message that is not in the archive (sent off-list or not yet received): 50F02A51.3010108-Qo5EllUWu/[email protected]
Re: [alsa-devel] [PATCH 2/8] ASoC: Add support for virtual switch controls
Quoted 10 lines · Lars-Peter Clausen
Quoted 9 lines · Mark Brown
Quoted 7 lines · Lars-Peter Clausen
Quoted 3 lines · Mark Brown
Virtual enums do actually end up routing, that's not what a mute control usually does. You can do the above in the manner I suggested, just have the register forced to a particular value when the DAC is disabled.
Well, that's what the code does. The alternative is to implement more or
Quoted 7 lines
Quoted 2 lines
No, it's not (at least not according to the changelog). It implements a totally separate virtual control.
What do you mean by 'separate'? Maybe this is was causes the confusion. Do you mean a separate DAPM control, like
DAPM_SWITCH? That's not what the patch does it creates a virtual kcontrol, which can be used to control a mixers input. It's the pendant toSOC_DAPM_ENUM_VIRTnot to
s/pendant/counterpart/ apparently this is a false friend
Quoted 8 lines
SND_SOC_DAPM_VIRT_MUX. I realize that the commit message may have been a bit ambiguous in that regard.- Lars
_______________________________________________
Alsa-devel mailing list Alsa-devel-K7yf7f+aM1XWsZ/[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: [PATCH 2/8] ASoC: Add support for virtual switch controls
In reply to a message not in the archiveQuoted 4 lines · Lars-Peter Clausen
What do you mean by 'separate'? Maybe this is was causes the confusion. Do you mean a separate DAPM control, like
DAPM_SWITCH? That's not what the patch does it creates a virtual kcontrol, which can be used to control a mixers input. It's the pendant toSOC_DAPM_ENUM_VIRTnot to
The issue I'm seeing is that it sounds like this isn't joined up with the mute control (as it's a virtual control).
Quoted 2 lines
SND_SOC_DAPM_VIRT_MUX. I realize that the commit message may have been a bit ambiguous in that regard.
It's the virtual bit that's concerning me here so I don't think that's really it.
_______________________________________________
Uclinux-dist-devel mailing list Uclinux-dist-devel-ZG0+EudsQA8dtHy/[email protected]
https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel
Re: [PATCH 2/8] ASoC: Add support for virtual switch controls
In reply to a message not in the archiveQuoted 5 lines · Lars-Peter Clausen
Virtual switches are similar to virtual MUX controls. It does not have a representation in the actual hardware but allows to control the DAPM routing by enabling or disabling a input path into the mixer. This is useful if we want to present a way to the user to for example mute a path despite the absence of a separate mute control in hardware.
So, following IRC discussion it seems like the main issue here is that the changelog is the main issue here - this is actually for moving the writes done when controlling a DAPM mixer input rather than adding new widgets to control power on/off of paths.
_______________________________________________
Uclinux-dist-devel mailing list Uclinux-dist-devel-ZG0+EudsQA8dtHy/[email protected]
https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel
A message that is not in the archive (sent off-list or not yet received): 1357833977-3682-1-git-send-email-lars-Qo5EllUWu/[email protected]
PATCH 3/8 ASoC: Add ADAU1X61 and ADAU1X81 CODECs common code
The ADAU1X61 and ADAU1X81 are very similar in the digital domain of the CODECs, but are quite different in the analog domain. This patch adds support for the common parts of the ADAU161 and ADAU181 CODECs.
--- include/linux/platform_data/adau17x1.h | 23 + sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/adau17x1.c | 895 +++++++++++++++++++++++++++++++++ sound/soc/codecs/adau17x1.h | 149 ++++++ 5 files changed, 1073 insertions(+) create mode 100644 include/linux/platform_data/adau17x1.h create mode 100644 sound/soc/codecs/adau17x1.c create mode 100644 sound/soc/codecs/adau17x1.h
include/linux/platform_data/adau17x1.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* Driver for ADAU1761/ADAU1461/ADAU1761/ADAU1961/ADAU1781/ADAU1781 codecs +* +* Copyright 2011-2013 Analog Devices Inc. +* Author: Lars-Peter Clausen <lars-Qo5EllUWu/[email protected]> +* +* Licensed under the GPL-2 or later. +*/ + +#ifndef __LINUX_PLATFORM_DATA_ADAU17X1_H__ +#define __LINUX_PLATFORM_DATA_ADAU17X1_H__ + +/** +* enum adau17x1_micbias_voltage - Microphone bias voltage +* @ADAU17X1_MICBIAS_0_90_AVDD: 0.9 * AVDD +* @ADAU17X1_MICBIAS_0_65_AVDD: 0.65 * AVDD +*/ +enum adau17x1_micbias_voltage { +ADAU17X1_MICBIAS_0_90_AVDD =0 , +ADAU17X1_MICBIAS_0_65_AVDD =1 , +}; + +#endif
sound/soc/codecs/Kconfig +4 -0
@@ -181,6 +181,10 @@ config SND_SOC_ADAU1701 config SND_SOC_ADAU1373 tristate +config SND_SOC_ADAU17X1 + select SND_SOC_SIGMADSP + tristate + config SND_SOC_ADAV80X tristate
sound/soc/codecs/Makefile +2 -0
@@ -7,6 +7,7 @@ snd-soc-ad1980-objs := ad1980.o snd-soc-ad73311-objs := ad73311.o snd-soc-adau1701-objs := adau1701.o snd-soc-adau1373-objs := adau1373.o +snd-soc-adau17x1-objs := adau17x1.o snd-soc-adav80x-objs := adav80x.o snd-soc-ads117x-objs := ads117x.o snd-soc-ak4104-objs := ak4104.o
@@ -129,6 +130,7 @@ obj-$(CONFIG_SND_SOC_AD1980) += snd-soc-ad1980.o obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o obj-$(CONFIG_SND_SOC_ADAU1373) += snd-soc-adau1373.o obj-$(CONFIG_SND_SOC_ADAU1701) += snd-soc-adau1701.o +obj-$(CONFIG_SND_SOC_ADAU17X1) += snd-soc-adau17x1.o obj-$(CONFIG_SND_SOC_ADAV80X) += snd-soc-adav80x.o obj-$(CONFIG_SND_SOC_ADS117X) += snd-soc-ads117x.o obj-$(CONFIG_SND_SOC_AK4104) += snd-soc-ak4104.o
sound/soc/codecs/adau17x1.c new file +895 -0
895 lines not on this page · raw message
sound/soc/codecs/adau17x1.h new file +149 -0
149 lines not on this page · raw message
Signature · 1 line
1.8.0
PATCH 4/8 ASoC: Add ADAU1361/ADAU1761 CODEC support
In reply to a message not in the archiveThis patch adds support for the Analog Devices ADAU1361 and ADAU1761 CODECs.
--- include/linux/platform_data/adau17x1.h | 67 +++ sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/adau1761.c | 1000 ++++++++++++++++++++++++++++++++ 4 files changed, 1074 insertions(+) create mode 100644 sound/soc/codecs/adau1761.c
include/linux/platform_data/adau17x1.h +67 -0
@@ -20,4 +20,71 @@ enum adau17x1_micbias_voltage { ADAU17X1_MICBIAS_0_65_AVDD = 1, }; +/** +* enum adau1761_digmic_jackdet_pin_mode - Configuration of the JACKDET/MICIN pin +* @ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE: Disable the pin +* @ADAU1761_DIGMIC_JACKDET_PIN_MODE_DIGMIC: Configure the pin for usage as +* digital microphone input. +* @ADAU1761_DIGMIC_JACKDET_PIN_MODE_JACKDETECT: Configure the pin for jack +* insertion detection. +*/ +enum adau1761_digmic_jackdet_pin_mode { +ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE , +ADAU1761_DIGMIC_JACKDET_PIN_MODE_DIGMIC , +ADAU1761_DIGMIC_JACKDET_PIN_MODE_JACKDETECT , +}; + +/** +* adau1761_jackdetect_debounce_time - Jack insertion detection debounce time +* @ADAU1761_JACKDETECT_DEBOUNCE_5MS: 5 milliseconds +* @ADAU1761_JACKDETECT_DEBOUNCE_10MS: 10 milliseconds +* @ADAU1761_JACKDETECT_DEBOUNCE_20MS: 20 milliseconds +* @ADAU1761_JACKDETECT_DEBOUNCE_40MS: 40 milliseconds +*/ +enum adau1761_jackdetect_debounce_time { +ADAU1761_JACKDETECT_DEBOUNCE_5MS =0 , +ADAU1761_JACKDETECT_DEBOUNCE_10MS =1 , +ADAU1761_JACKDETECT_DEBOUNCE_20MS =2 , +ADAU1761_JACKDETECT_DEBOUNCE_40MS =3 , +}; + +/** +* enum adau1761_output_mode - Output mode configuration +* @ADAU1761_OUTPUT_MODE_HEADPHONE: Headphone output +* @ADAU1761_OUTPUT_MODE_HEADPHONE_CAPLESS: Capless headphone output +* @ADAU1761_OUTPUT_MODE_LINE: Line output +*/ +enum adau1761_output_mode { +ADAU1761_OUTPUT_MODE_HEADPHONE , +ADAU1761_OUTPUT_MODE_HEADPHONE_CAPLESS , +ADAU1761_OUTPUT_MODE_LINE , +}; + +/** +* struct adau1761_platform_data - ADAU1761 Codec driver platform data +* @input_differential: If true the input pins will be configured in +* differential mode. +* @lineout_mode: Output mode for the LOUT/ROUT pins +* @headphone_mode: Output mode for the LHP/RHP pins +* @digmic_jackdetect_pin_mode: JACKDET/MICIN pin configuration +* @jackdetect_debounce_time: Jack insertion detection debounce time. +* Note: This value will only be used, if the JACKDET/MICIN pin is +* configured for jack insertion detection. +* @jackdetect_active_low: If true the jack insertion detection is active +* low. Othwise it will be active high. +* @micbias_voltage: Microphone voltage bias +*/ +struct adau1761_platform_data { +bool input_differential; +enum adau1761_output_mode lineout_mode; +enum adau1761_output_mode headphone_mode; + +enum adau1761_digmic_jackdet_pin_mode digmic_jackdetect_pin_mode; + +enum adau1761_jackdetect_debounce_time jackdetect_debounce_time; +bool jackdetect_active_low; + +enum adau17x1_micbias_voltage micbias_voltage; +}; +#endif
sound/soc/codecs/Kconfig +5 -0
@@ -19,6 +19,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_AD1980 if SND_SOC_AC97_BUS select SND_SOC_AD73311 select SND_SOC_ADAU1373 if I2C + select SND_SOC_ADAU1761 if SND_SOC_I2C_AND_SPI select SND_SOC_ADAV80X select SND_SOC_ADS117X select SND_SOC_AK4104 if SPI_MASTER
@@ -185,6 +186,10 @@ config SND_SOC_ADAU17X1 select SND_SOC_SIGMADSP tristate +config SND_SOC_ADAU1761 + select SND_SOC_ADAU17X1 + tristate + config SND_SOC_ADAV80X tristate
sound/soc/codecs/Makefile +2 -0
@@ -8,6 +8,7 @@ snd-soc-ad73311-objs := ad73311.o snd-soc-adau1701-objs := adau1701.o snd-soc-adau1373-objs := adau1373.o snd-soc-adau17x1-objs := adau17x1.o +snd-soc-adau1761-objs := adau1761.o snd-soc-adav80x-objs := adav80x.o snd-soc-ads117x-objs := ads117x.o snd-soc-ak4104-objs := ak4104.o
@@ -131,6 +132,7 @@ obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o obj-$(CONFIG_SND_SOC_ADAU1373) += snd-soc-adau1373.o obj-$(CONFIG_SND_SOC_ADAU1701) += snd-soc-adau1701.o obj-$(CONFIG_SND_SOC_ADAU17X1) += snd-soc-adau17x1.o +obj-$(CONFIG_SND_SOC_ADAU1761) += snd-soc-adau1761.o obj-$(CONFIG_SND_SOC_ADAV80X) += snd-soc-adav80x.o obj-$(CONFIG_SND_SOC_ADS117X) += snd-soc-ads117x.o obj-$(CONFIG_SND_SOC_AK4104) += snd-soc-ak4104.o
sound/soc/codecs/adau1761.c new file +1000 -0
1,000 lines not on this page · raw message
Signature · 1 line
1.8.0
PATCH 5/8 ASoC: Add ADAU1381/ADAU1781 CODEC support
In reply to a message not in the archiveThis patch adds support for the Analog Devices ADAU1381 and ADAU1781 audio CODECs.
--- include/linux/platform_data/adau17x1.h | 19 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/adau1781.c | 673 +++++++++++++++++++++++++++++++++ 4 files changed, 699 insertions(+) create mode 100644 sound/soc/codecs/adau1781.c
include/linux/platform_data/adau17x1.h +19 -0
@@ -87,4 +87,23 @@ struct adau1761_platform_data { enum adau17x1_micbias_voltage micbias_voltage; }; +/** +* struct adau1781_platform_data - ADAU1781 Codec driver platform data +* @left_input_differential: If true configure the left input as +differential input. +* @right_input_differential: If true configure the right input as +* differntial input. +* @use_dmic: If true configure the MIC pins as digital +* microphone pins instead of analog microphone pins. +* @micbias_voltage: Microphone voltage bias +*/ +struct adau1781_platform_data { +bool left_input_differential; +bool right_input_differential; + +bool use_dmic; + +enum adau17x1_micbias_voltage micbias_voltage; +}; +#endif
sound/soc/codecs/Kconfig +5 -0
@@ -20,6 +20,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_AD73311 select SND_SOC_ADAU1373 if I2C select SND_SOC_ADAU1761 if SND_SOC_I2C_AND_SPI + select SND_SOC_ADAU1781 if SND_SOC_I2C_AND_SPI select SND_SOC_ADAV80X select SND_SOC_ADS117X select SND_SOC_AK4104 if SPI_MASTER
@@ -190,6 +191,10 @@ config SND_SOC_ADAU1761 select SND_SOC_ADAU17X1 tristate +config SND_SOC_ADAU1781 + select SND_SOC_ADAU17X1 + tristate + config SND_SOC_ADAV80X tristate
sound/soc/codecs/Makefile +2 -0
@@ -9,6 +9,7 @@ snd-soc-adau1701-objs := adau1701.o snd-soc-adau1373-objs := adau1373.o snd-soc-adau17x1-objs := adau17x1.o snd-soc-adau1761-objs := adau1761.o +snd-soc-adau1781-objs := adau1781.o snd-soc-adav80x-objs := adav80x.o snd-soc-ads117x-objs := ads117x.o snd-soc-ak4104-objs := ak4104.o
@@ -133,6 +134,7 @@ obj-$(CONFIG_SND_SOC_ADAU1373) += snd-soc-adau1373.o obj-$(CONFIG_SND_SOC_ADAU1701) += snd-soc-adau1701.o obj-$(CONFIG_SND_SOC_ADAU17X1) += snd-soc-adau17x1.o obj-$(CONFIG_SND_SOC_ADAU1761) += snd-soc-adau1761.o +obj-$(CONFIG_SND_SOC_ADAU1781) += snd-soc-adau1781.o obj-$(CONFIG_SND_SOC_ADAV80X) += snd-soc-adav80x.o obj-$(CONFIG_SND_SOC_ADS117X) += snd-soc-ads117x.o obj-$(CONFIG_SND_SOC_AK4104) += snd-soc-ak4104.o
sound/soc/codecs/adau1781.c new file +673 -0
673 lines not on this page · raw message
Signature · 1 line
1.8.0
PATCH 6/8 ASoC: Constify ops and compr_ops fields of snd_soc_dai_link
In reply to a message not in the archiveThe core does not modify these fields, so they can be made const. This allows drivers to declare their op tables as const.
--- include/sound/soc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/sound/soc.h +2 -2
@@ -906,8 +906,8 @@ struct snd_soc_dai_link { struct snd_pcm_hw_params *params);/* machine stream operations */ -struct snd_soc_ops *ops; -struct snd_soc_compr_ops *compr_ops; +const struct snd_soc_ops *ops; +const struct snd_soc_compr_ops *compr_ops; };struct snd_soc_codec_conf {
Signature · 1 line
1.8.0
Mark Brown
AppliedRe: [PATCH 6/8] ASoC: Constify ops and compr_ops fields of snd_soc_dai_link
Quoted 2 lines · Lars-Peter Clausen
The core does not modify these fields, so they can be made const. This allows drivers to declare their op tables as const.
Applied, thanks.
PATCH 7/8 ASoC: Blackfin: ADAU1X61 eval board support
In reply to a message not in the archiveAdd a machine driver to support the EVAL-ADAU1X61 board connected to a Analog Devices BF5XX evaluation board.
--- sound/soc/blackfin/Kconfig | 13 +++ sound/soc/blackfin/Makefile | 2 + sound/soc/blackfin/bfin-eval-adau1x61.c | 151 ++++++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 sound/soc/blackfin/bfin-eval-adau1x61.c
sound/soc/blackfin/Kconfig +13 -0
@@ -43,6 +43,19 @@ config SND_SOC_BFIN_EVAL_ADAU1373 Note: This driver assumes that first ADAU1373 DAI is connected to the first SPORT port on the BF5XX board. +config SND_SOC_BFIN_EVAL_ADAU1X61 + tristate "Support for the EVAL-ADAU1X61 board on Blackfin eval boards" + depends on SND_BF5XX_I2S && I2C + select SND_BF5XX_SOC_I2S + select SND_SOC_ADAU1761 + help + Say Y if you want to add support for the Analog Devices EVAL-ADAU1X61 + board connected to one of the Blackfin evaluation boards like the + BF5XX-STAMP or BF5XX-EZKIT. + + Note: This driver assumes that the ADAU1X61 is connected to the + first SPORT port on the BF5XX board. + config SND_SOC_BFIN_EVAL_ADAV80X tristate "Support for the EVAL-ADAV80X boards on Blackfin eval boards" depends on SND_BF5XX_I2S && (SPI_MASTER || I2C)
sound/soc/blackfin/Makefile +2 -0
@@ -26,6 +26,7 @@ snd-ssm2602-objs := bf5xx-ssm2602.o snd-ad73311-objs := bf5xx-ad73311.o snd-ad193x-objs := bf5xx-ad193x.o snd-soc-bfin-eval-adau1373-objs := bfin-eval-adau1373.o +snd-soc-bfin-eval-adau1x61-objs := bfin-eval-adau1x61.o snd-soc-bfin-eval-adau1701-objs := bfin-eval-adau1701.o snd-soc-bfin-eval-adav80x-objs := bfin-eval-adav80x.o
@@ -35,5 +36,6 @@ obj-$(CONFIG_SND_BF5XX_SOC_SSM2602) += snd-ssm2602.o obj-$(CONFIG_SND_BF5XX_SOC_AD73311) += snd-ad73311.o obj-$(CONFIG_SND_BF5XX_SOC_AD193X) += snd-ad193x.o obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) += snd-soc-bfin-eval-adau1373.o +obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) += snd-soc-bfin-eval-adau1x61.o obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) += snd-soc-bfin-eval-adau1701.o obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) += snd-soc-bfin-eval-adav80x.o
sound/soc/blackfin/bfin-eval-adau1x61.c new file +151 -0
151 lines not on this page · raw message
Signature · 1 line
1.8.0
PATCH 8/8 ASoC: Blackfin: ADAU1X81 eval board support
In reply to a message not in the archiveAdd a machine driver to support the EVAL-ADAU1X81 board connected to a Analog Devices BF5XX evaluation board.
--- sound/soc/blackfin/Kconfig | 13 +++ sound/soc/blackfin/Makefile | 2 + sound/soc/blackfin/bfin-eval-adau1x81.c | 139 ++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+) create mode 100644 sound/soc/blackfin/bfin-eval-adau1x81.c
sound/soc/blackfin/Kconfig +13 -0
@@ -56,6 +56,19 @@ config SND_SOC_BFIN_EVAL_ADAU1X61 Note: This driver assumes that the ADAU1X61 is connected to the first SPORT port on the BF5XX board. +config SND_SOC_BFIN_EVAL_ADAU1X81 + tristate "Support for the EVAL-ADAU1X81 boards on Blackfin eval boards" + depends on SND_BF5XX_I2S && I2C + select SND_BF5XX_SOC_I2S + select SND_SOC_ADAU1781 + help + Say Y if you want to add support for the Analog Devices EVAL-ADAU1X81 + board connected to one of the Blackfin evaluation boards like the + BF5XX-STAMP or BF5XX-EZKIT. + + Note: This driver assumes that the ADAU1X81 is connected to the + first SPORT port on the BF5XX board. + config SND_SOC_BFIN_EVAL_ADAV80X tristate "Support for the EVAL-ADAV80X boards on Blackfin eval boards" depends on SND_BF5XX_I2S && (SPI_MASTER || I2C)
sound/soc/blackfin/Makefile +2 -0
@@ -27,6 +27,7 @@ snd-ad73311-objs := bf5xx-ad73311.o snd-ad193x-objs := bf5xx-ad193x.o snd-soc-bfin-eval-adau1373-objs := bfin-eval-adau1373.o snd-soc-bfin-eval-adau1x61-objs := bfin-eval-adau1x61.o +snd-soc-bfin-eval-adau1x81-objs := bfin-eval-adau1x81.o snd-soc-bfin-eval-adau1701-objs := bfin-eval-adau1701.o snd-soc-bfin-eval-adav80x-objs := bfin-eval-adav80x.o
@@ -37,5 +38,6 @@ obj-$(CONFIG_SND_BF5XX_SOC_AD73311) += snd-ad73311.o obj-$(CONFIG_SND_BF5XX_SOC_AD193X) += snd-ad193x.o obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) += snd-soc-bfin-eval-adau1373.o obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) += snd-soc-bfin-eval-adau1x61.o +obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X81) += snd-soc-bfin-eval-adau1x81.o obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) += snd-soc-bfin-eval-adau1701.o obj-$(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) += snd-soc-bfin-eval-adav80x.o
sound/soc/blackfin/bfin-eval-adau1x81.c new file +139 -0
139 lines not on this page · raw message
Signature · 1 line
1.8.0