alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] sound: soc: trivial stuff for tlv320aic3x
@ 2012-02-01  1:06 Felipe Contreras
  2012-02-01  1:06 ` [PATCH 1/2] sound: soc: add alias " Felipe Contreras
  2012-02-01  1:06 ` [PATCH 2/2] sound: soc: tlv320aic3x: remove unused code Felipe Contreras
  0 siblings, 2 replies; 7+ messages in thread
From: Felipe Contreras @ 2012-02-01  1:06 UTC (permalink / raw)
  To: alsa-devel; +Cc: Felipe Contreras, Jiri Kosina

Not important, but nice to have :)

Felipe Contreras (2):
  sound: soc: add alias for tlv320aic3x
  sound: soc: tlv320aic3x: remove unused code

 sound/soc/codecs/tlv320aic3x.c |   37 +------------------------------------
 sound/soc/codecs/tlv320aic3x.h |    9 ---------
 2 files changed, 1 insertions(+), 45 deletions(-)

-- 
1.7.9

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] sound: soc: add alias for tlv320aic3x
  2012-02-01  1:06 [PATCH 0/2] sound: soc: trivial stuff for tlv320aic3x Felipe Contreras
@ 2012-02-01  1:06 ` Felipe Contreras
  2012-02-01  1:56   ` Axel Lin
  2012-02-01  1:06 ` [PATCH 2/2] sound: soc: tlv320aic3x: remove unused code Felipe Contreras
  1 sibling, 1 reply; 7+ messages in thread
From: Felipe Contreras @ 2012-02-01  1:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: Mark Brown, Takashi Iwai, Felipe Contreras, Lars-Peter Clausen,
	Axel Lin, Liam Girdwood

According to the documentation, should help hotplugging.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 sound/soc/codecs/tlv320aic3x.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 492f22f..00eb29d 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1565,3 +1565,4 @@ module_exit(aic3x_exit);
 MODULE_DESCRIPTION("ASoC TLV320AIC3X codec driver");
 MODULE_AUTHOR("Vladimir Barinov");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("i2c:tlv320aic3x");
-- 
1.7.9

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] sound: soc: tlv320aic3x: remove unused code
  2012-02-01  1:06 [PATCH 0/2] sound: soc: trivial stuff for tlv320aic3x Felipe Contreras
  2012-02-01  1:06 ` [PATCH 1/2] sound: soc: add alias " Felipe Contreras
@ 2012-02-01  1:06 ` Felipe Contreras
  2012-02-06 16:44   ` Mark Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Felipe Contreras @ 2012-02-01  1:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: Mark Brown, Takashi Iwai, Felipe Contreras, Lars-Peter Clausen,
	Axel Lin, Liam Girdwood

Looks like nobody is or will be using this code.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 sound/soc/codecs/tlv320aic3x.c |   36 ------------------------------------
 sound/soc/codecs/tlv320aic3x.h |    9 ---------
 2 files changed, 0 insertions(+), 45 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 00eb29d..4dd10e2 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1185,25 +1185,6 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec,
 	return 0;
 }
 
-void aic3x_set_gpio(struct snd_soc_codec *codec, int gpio, int state)
-{
-	u8 reg = gpio ? AIC3X_GPIO2_REG : AIC3X_GPIO1_REG;
-	u8 bit = gpio ? 3: 0;
-	u8 val = snd_soc_read(codec, reg) & ~(1 << bit);
-	snd_soc_write(codec, reg, val | (!!state << bit));
-}
-EXPORT_SYMBOL_GPL(aic3x_set_gpio);
-
-int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio)
-{
-	u8 reg = gpio ? AIC3X_GPIO2_REG : AIC3X_GPIO1_REG;
-	u8 val = 0, bit = gpio ? 2 : 1;
-
-	aic3x_read(codec, reg, &val);
-	return (val >> bit) & 1;
-}
-EXPORT_SYMBOL_GPL(aic3x_get_gpio);
-
 void aic3x_set_headset_detection(struct snd_soc_codec *codec, int detect,
 				 int headset_debounce, int button_debounce)
 {
@@ -1221,23 +1202,6 @@ void aic3x_set_headset_detection(struct snd_soc_codec *codec, int detect,
 
 	snd_soc_write(codec, AIC3X_HEADSET_DETECT_CTRL_A, val);
 }
-EXPORT_SYMBOL_GPL(aic3x_set_headset_detection);
-
-int aic3x_headset_detected(struct snd_soc_codec *codec)
-{
-	u8 val = 0;
-	aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val);
-	return (val >> 4) & 1;
-}
-EXPORT_SYMBOL_GPL(aic3x_headset_detected);
-
-int aic3x_button_pressed(struct snd_soc_codec *codec)
-{
-	u8 val = 0;
-	aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val);
-	return (val >> 5) & 1;
-}
-EXPORT_SYMBOL_GPL(aic3x_button_pressed);
 
 #define AIC3X_RATES	SNDRV_PCM_RATE_8000_96000
 #define AIC3X_FORMATS	(SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
diff --git a/sound/soc/codecs/tlv320aic3x.h b/sound/soc/codecs/tlv320aic3x.h
index 06a1978..6f097fb 100644
--- a/sound/soc/codecs/tlv320aic3x.h
+++ b/sound/soc/codecs/tlv320aic3x.h
@@ -212,9 +212,6 @@
 /* Default input volume */
 #define DEFAULT_GAIN    0x20
 
-void aic3x_set_gpio(struct snd_soc_codec *codec, int gpio, int state);
-int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio);
-
 /* headset detection / button API */
 
 /* The AIC3x supports detection of stereo headsets (GND + left + right signal)
@@ -252,10 +249,4 @@ enum {
 #define AIC3X_BUTTON_DEBOUNCE_SHIFT 	0
 #define AIC3X_BUTTON_DEBOUNCE_MASK	3
 
-/* see the enums above for valid parameters to this function */
-void aic3x_set_headset_detection(struct snd_soc_codec *codec, int detect,
-				 int headset_debounce, int button_debounce);
-int aic3x_headset_detected(struct snd_soc_codec *codec);
-int aic3x_button_pressed(struct snd_soc_codec *codec);
-
 #endif /* _AIC3X_H */
-- 
1.7.9

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] sound: soc: add alias for tlv320aic3x
  2012-02-01  1:06 ` [PATCH 1/2] sound: soc: add alias " Felipe Contreras
@ 2012-02-01  1:56   ` Axel Lin
  2012-02-01 11:57     ` Felipe Contreras
  0 siblings, 1 reply; 7+ messages in thread
From: Axel Lin @ 2012-02-01  1:56 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: alsa-devel, Lars-Peter Clausen, Takashi Iwai, Mark Brown,
	Liam Girdwood

2012/2/1 Felipe Contreras <felipe.contreras@gmail.com>:
> According to the documentation, should help hotplugging.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  sound/soc/codecs/tlv320aic3x.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
> index 492f22f..00eb29d 100644
> --- a/sound/soc/codecs/tlv320aic3x.c
> +++ b/sound/soc/codecs/tlv320aic3x.c
> @@ -1565,3 +1565,4 @@ module_exit(aic3x_exit);
>  MODULE_DESCRIPTION("ASoC TLV320AIC3X codec driver");
>  MODULE_AUTHOR("Vladimir Barinov");
>  MODULE_LICENSE("GPL");
> +MODULE_ALIAS("i2c:tlv320aic3x");
This is not required because "tlv320aic3x" is already in the aic3x_i2c_id table.
MODULE_DEVICE_TABLE will automatically setup this modalias.

> --
> 1.7.9
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] sound: soc: add alias for tlv320aic3x
  2012-02-01  1:56   ` Axel Lin
@ 2012-02-01 11:57     ` Felipe Contreras
  2012-02-01 12:39       ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Felipe Contreras @ 2012-02-01 11:57 UTC (permalink / raw)
  To: axel.lin
  Cc: alsa-devel, Lars-Peter Clausen, Takashi Iwai, Mark Brown,
	Liam Girdwood

On Wed, Feb 1, 2012 at 3:56 AM, Axel Lin <axel.lin@gmail.com> wrote:
> 2012/2/1 Felipe Contreras <felipe.contreras@gmail.com>:
>> According to the documentation, should help hotplugging.
>>
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>> ---
>>  sound/soc/codecs/tlv320aic3x.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
>> index 492f22f..00eb29d 100644
>> --- a/sound/soc/codecs/tlv320aic3x.c
>> +++ b/sound/soc/codecs/tlv320aic3x.c
>> @@ -1565,3 +1565,4 @@ module_exit(aic3x_exit);
>>  MODULE_DESCRIPTION("ASoC TLV320AIC3X codec driver");
>>  MODULE_AUTHOR("Vladimir Barinov");
>>  MODULE_LICENSE("GPL");
>> +MODULE_ALIAS("i2c:tlv320aic3x");
> This is not required because "tlv320aic3x" is already in the aic3x_i2c_id table.
> MODULE_DEVICE_TABLE will automatically setup this modalias.

Since when? Last time I checked that was not the case. I will try
again with v3.2 final, but I think on some of the rc's the alias
wasn't there.

-- 
Felipe Contreras
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] sound: soc: add alias for tlv320aic3x
  2012-02-01 11:57     ` Felipe Contreras
@ 2012-02-01 12:39       ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2012-02-01 12:39 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: alsa-devel, Lars-Peter Clausen, Takashi Iwai, axel.lin,
	Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 649 bytes --]

On Wed, Feb 01, 2012 at 01:57:56PM +0200, Felipe Contreras wrote:
> On Wed, Feb 1, 2012 at 3:56 AM, Axel Lin <axel.lin@gmail.com> wrote:

> >> +MODULE_ALIAS("i2c:tlv320aic3x");
> > This is not required because "tlv320aic3x" is already in the aic3x_i2c_id table.
> > MODULE_DEVICE_TABLE will automatically setup this modalias.

> Since when? Last time I checked that was not the case. I will try
> again with v3.2 final, but I think on some of the rc's the alias
> wasn't there.

Since it was introduced, this is really nothing new (which is why you'll
not find I2C drivers with MODULE_ALIAS).  This is the whole point of having
MODULE_DEVICE_TABLE.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] sound: soc: tlv320aic3x: remove unused code
  2012-02-01  1:06 ` [PATCH 2/2] sound: soc: tlv320aic3x: remove unused code Felipe Contreras
@ 2012-02-06 16:44   ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2012-02-06 16:44 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: alsa-devel, Lars-Peter Clausen, Takashi Iwai, Axel Lin,
	Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 236 bytes --]

On Wed, Feb 01, 2012 at 03:06:20AM +0200, Felipe Contreras wrote:
> Looks like nobody is or will be using this code.

		      Applied but please make some effort to use subject
                      lines appropriate for the subsystem.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-02-06 16:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-01  1:06 [PATCH 0/2] sound: soc: trivial stuff for tlv320aic3x Felipe Contreras
2012-02-01  1:06 ` [PATCH 1/2] sound: soc: add alias " Felipe Contreras
2012-02-01  1:56   ` Axel Lin
2012-02-01 11:57     ` Felipe Contreras
2012-02-01 12:39       ` Mark Brown
2012-02-01  1:06 ` [PATCH 2/2] sound: soc: tlv320aic3x: remove unused code Felipe Contreras
2012-02-06 16:44   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).