* [PATCH 0/4] ASoC: mediatek: mt8183: some cleanups
@ 2019-08-30 7:42 Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
` (4 more replies)
0 siblings, 5 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2019-08-30 7:42 UTC (permalink / raw)
To: broonie; +Cc: tzungbi, alsa-devel, dgreid, cychiang
The series contains some cleanup refactors and should not change any
behavior.
Tzung-Bi Shih (4):
ASoC: mediatek: mt8183: move private structure
ASoC: mediatek: mt8183: move headset jack to card-specific storage
ASoC: mediatek: mt8183: remove forward declaration of headset_init
ASoC: mediatek: mt8183: fix space issues
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 55 +++++++++----------
1 file changed, 26 insertions(+), 29 deletions(-)
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 0/4] ASoC: mediatek: mt8183: some cleanups
2019-08-30 7:42 [PATCH 0/4] ASoC: mediatek: mt8183: some cleanups Tzung-Bi Shih
@ 2019-08-30 7:42 ` Tzung-Bi Shih
2019-08-30 7:42 ` [PATCH 1/4] ASoC: mediatek: mt8183: move private structure Tzung-Bi Shih
` (3 subsequent siblings)
4 siblings, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2019-08-30 7:42 UTC (permalink / raw)
To: broonie; +Cc: tzungbi, alsa-devel, dgreid, cychiang
The series contains some cleanup refactors and should not change any
behavior.
Tzung-Bi Shih (4):
ASoC: mediatek: mt8183: move private structure
ASoC: mediatek: mt8183: move headset jack to card-specific storage
ASoC: mediatek: mt8183: remove forward declaration of headset_init
ASoC: mediatek: mt8183: fix space issues
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 55 +++++++++----------
1 file changed, 26 insertions(+), 29 deletions(-)
--
2.23.0.187.g17f5b7556c-goog
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/4] ASoC: mediatek: mt8183: move private structure
2019-08-30 7:42 [PATCH 0/4] ASoC: mediatek: mt8183: some cleanups Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
@ 2019-08-30 7:42 ` Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: move private structure" to the asoc tree Mark Brown
2019-08-30 7:42 ` [PATCH 2/4] ASoC: mediatek: mt8183: move headset jack to card-specific storage Tzung-Bi Shih
` (2 subsequent siblings)
4 siblings, 2 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2019-08-30 7:42 UTC (permalink / raw)
To: broonie; +Cc: tzungbi, alsa-devel, dgreid, cychiang
Move private structure to the beginning of file to declare earlier
so that most functions can see it.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 32 +++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 560fcc5923a4..1d4a1600f768 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -17,6 +17,22 @@
static struct snd_soc_jack headset_jack;
+enum PINCTRL_PIN_STATE {
+ PIN_STATE_DEFAULT = 0,
+ PIN_TDM_OUT_ON,
+ PIN_TDM_OUT_OFF,
+ PIN_STATE_MAX
+};
+
+static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
+ "default", "aud_tdm_out_on", "aud_tdm_out_off",
+};
+
+struct mt8183_mt6358_ts3a227_max98357_priv {
+ struct pinctrl *pinctrl;
+ struct pinctrl_state *pin_states[PIN_STATE_MAX];
+};
+
static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
@@ -46,22 +62,6 @@ static int mt8183_i2s_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
return 0;
}
-enum PINCTRL_PIN_STATE {
- PIN_STATE_DEFAULT = 0,
- PIN_TDM_OUT_ON,
- PIN_TDM_OUT_OFF,
- PIN_STATE_MAX
-};
-
-static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
- "default", "aud_tdm_out_on", "aud_tdm_out_off",
-};
-
-struct mt8183_mt6358_ts3a227_max98357_priv {
- struct pinctrl *pinctrl;
- struct pinctrl_state *pin_states[PIN_STATE_MAX];
-};
-
static int
mt8183_mt6358_ts3a227_max98357_bt_sco_startup(
struct snd_pcm_substream *substream)
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 1/4] ASoC: mediatek: mt8183: move private structure
2019-08-30 7:42 ` [PATCH 1/4] ASoC: mediatek: mt8183: move private structure Tzung-Bi Shih
@ 2019-08-30 7:42 ` Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: move private structure" to the asoc tree Mark Brown
1 sibling, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2019-08-30 7:42 UTC (permalink / raw)
To: broonie; +Cc: tzungbi, alsa-devel, dgreid, cychiang
Move private structure to the beginning of file to declare earlier
so that most functions can see it.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 32 +++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 560fcc5923a4..1d4a1600f768 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -17,6 +17,22 @@
static struct snd_soc_jack headset_jack;
+enum PINCTRL_PIN_STATE {
+ PIN_STATE_DEFAULT = 0,
+ PIN_TDM_OUT_ON,
+ PIN_TDM_OUT_OFF,
+ PIN_STATE_MAX
+};
+
+static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
+ "default", "aud_tdm_out_on", "aud_tdm_out_off",
+};
+
+struct mt8183_mt6358_ts3a227_max98357_priv {
+ struct pinctrl *pinctrl;
+ struct pinctrl_state *pin_states[PIN_STATE_MAX];
+};
+
static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
@@ -46,22 +62,6 @@ static int mt8183_i2s_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
return 0;
}
-enum PINCTRL_PIN_STATE {
- PIN_STATE_DEFAULT = 0,
- PIN_TDM_OUT_ON,
- PIN_TDM_OUT_OFF,
- PIN_STATE_MAX
-};
-
-static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
- "default", "aud_tdm_out_on", "aud_tdm_out_off",
-};
-
-struct mt8183_mt6358_ts3a227_max98357_priv {
- struct pinctrl *pinctrl;
- struct pinctrl_state *pin_states[PIN_STATE_MAX];
-};
-
static int
mt8183_mt6358_ts3a227_max98357_bt_sco_startup(
struct snd_pcm_substream *substream)
--
2.23.0.187.g17f5b7556c-goog
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/4] ASoC: mediatek: mt8183: move headset jack to card-specific storage
2019-08-30 7:42 [PATCH 0/4] ASoC: mediatek: mt8183: some cleanups Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
2019-08-30 7:42 ` [PATCH 1/4] ASoC: mediatek: mt8183: move private structure Tzung-Bi Shih
@ 2019-08-30 7:42 ` Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: move headset jack to card-specific storage" to the asoc tree Mark Brown
2019-08-30 7:42 ` [PATCH 3/4] ASoC: mediatek: mt8183: remove forward declaration of headset_init Tzung-Bi Shih
2019-08-30 7:42 ` [PATCH 4/4] ASoC: mediatek: mt8183: fix space issues Tzung-Bi Shih
4 siblings, 2 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2019-08-30 7:42 UTC (permalink / raw)
To: broonie; +Cc: tzungbi, alsa-devel, dgreid, cychiang
Move headset jack descriptor from module global scope to card-specific
storage to make its ownership more explicit.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
.../soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 1d4a1600f768..a7ad41b6e885 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -15,8 +15,6 @@
#include "mt8183-afe-common.h"
#include "../../codecs/ts3a227e.h"
-static struct snd_soc_jack headset_jack;
-
enum PINCTRL_PIN_STATE {
PIN_STATE_DEFAULT = 0,
PIN_TDM_OUT_ON,
@@ -31,6 +29,7 @@ static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
struct mt8183_mt6358_ts3a227_max98357_priv {
struct pinctrl *pinctrl;
struct pinctrl_state *pin_states[PIN_STATE_MAX];
+ struct snd_soc_jack headset_jack;
};
static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream,
@@ -410,6 +409,8 @@ static int
mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
{
int ret;
+ struct mt8183_mt6358_ts3a227_max98357_priv *priv =
+ snd_soc_card_get_drvdata(component->card);
/* Enable Headset and 4 Buttons Jack detection */
ret = snd_soc_card_jack_new(&mt8183_mt6358_ts3a227_max98357_card,
@@ -417,12 +418,12 @@ mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
SND_JACK_HEADSET |
SND_JACK_BTN_0 | SND_JACK_BTN_1 |
SND_JACK_BTN_2 | SND_JACK_BTN_3,
- &headset_jack,
+ &priv->headset_jack,
NULL, 0);
if (ret)
return ret;
- ret = ts3a227e_enable_jack_detect(component, &headset_jack);
+ ret = ts3a227e_enable_jack_detect(component, &priv->headset_jack);
return ret;
}
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 2/4] ASoC: mediatek: mt8183: move headset jack to card-specific storage
2019-08-30 7:42 ` [PATCH 2/4] ASoC: mediatek: mt8183: move headset jack to card-specific storage Tzung-Bi Shih
@ 2019-08-30 7:42 ` Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: move headset jack to card-specific storage" to the asoc tree Mark Brown
1 sibling, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2019-08-30 7:42 UTC (permalink / raw)
To: broonie; +Cc: tzungbi, alsa-devel, dgreid, cychiang
Move headset jack descriptor from module global scope to card-specific
storage to make its ownership more explicit.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
.../soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 1d4a1600f768..a7ad41b6e885 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -15,8 +15,6 @@
#include "mt8183-afe-common.h"
#include "../../codecs/ts3a227e.h"
-static struct snd_soc_jack headset_jack;
-
enum PINCTRL_PIN_STATE {
PIN_STATE_DEFAULT = 0,
PIN_TDM_OUT_ON,
@@ -31,6 +29,7 @@ static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
struct mt8183_mt6358_ts3a227_max98357_priv {
struct pinctrl *pinctrl;
struct pinctrl_state *pin_states[PIN_STATE_MAX];
+ struct snd_soc_jack headset_jack;
};
static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream,
@@ -410,6 +409,8 @@ static int
mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
{
int ret;
+ struct mt8183_mt6358_ts3a227_max98357_priv *priv =
+ snd_soc_card_get_drvdata(component->card);
/* Enable Headset and 4 Buttons Jack detection */
ret = snd_soc_card_jack_new(&mt8183_mt6358_ts3a227_max98357_card,
@@ -417,12 +418,12 @@ mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
SND_JACK_HEADSET |
SND_JACK_BTN_0 | SND_JACK_BTN_1 |
SND_JACK_BTN_2 | SND_JACK_BTN_3,
- &headset_jack,
+ &priv->headset_jack,
NULL, 0);
if (ret)
return ret;
- ret = ts3a227e_enable_jack_detect(component, &headset_jack);
+ ret = ts3a227e_enable_jack_detect(component, &priv->headset_jack);
return ret;
}
--
2.23.0.187.g17f5b7556c-goog
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/4] ASoC: mediatek: mt8183: remove forward declaration of headset_init
2019-08-30 7:42 [PATCH 0/4] ASoC: mediatek: mt8183: some cleanups Tzung-Bi Shih
` (2 preceding siblings ...)
2019-08-30 7:42 ` [PATCH 2/4] ASoC: mediatek: mt8183: move headset jack to card-specific storage Tzung-Bi Shih
@ 2019-08-30 7:42 ` Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: remove forward declaration of headset_init" to the asoc tree Mark Brown
2019-08-30 7:42 ` [PATCH 4/4] ASoC: mediatek: mt8183: fix space issues Tzung-Bi Shih
4 siblings, 2 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2019-08-30 7:42 UTC (permalink / raw)
To: broonie; +Cc: tzungbi, alsa-devel, dgreid, cychiang
The forward declaration of mt8183_mt6358_ts3a227_max98357_headset_init
is for cyclic dependency between card, headset_dev, and headset_init.
It used to be:
- card depends on headset_dev
- headset_dev depends on headset_init
- headset_init depends on card
Commit a962a809e5e4 ("ASoC: mediatek: mt8183: make headset codec
optional") removed the cyclic dependency.
Thus, it is safe to remove the forward declaration.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index a7ad41b6e885..30a7735c4af3 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -390,14 +390,6 @@ mt8183_mt6358_ts3a227_max98357_dai_links[] = {
},
};
-static int
-mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *cpnt);
-
-static struct snd_soc_aux_dev mt8183_mt6358_ts3a227_max98357_headset_dev = {
- .dlc = COMP_EMPTY(),
- .init = mt8183_mt6358_ts3a227_max98357_headset_init,
-};
-
static struct snd_soc_card mt8183_mt6358_ts3a227_max98357_card = {
.name = "mt8183_mt6358_ts3a227_max98357",
.owner = THIS_MODULE,
@@ -428,6 +420,11 @@ mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
return ret;
}
+static struct snd_soc_aux_dev mt8183_mt6358_ts3a227_max98357_headset_dev = {
+ .dlc = COMP_EMPTY(),
+ .init = mt8183_mt6358_ts3a227_max98357_headset_init,
+};
+
static int
mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
{
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 3/4] ASoC: mediatek: mt8183: remove forward declaration of headset_init
2019-08-30 7:42 ` [PATCH 3/4] ASoC: mediatek: mt8183: remove forward declaration of headset_init Tzung-Bi Shih
@ 2019-08-30 7:42 ` Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: remove forward declaration of headset_init" to the asoc tree Mark Brown
1 sibling, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2019-08-30 7:42 UTC (permalink / raw)
To: broonie; +Cc: tzungbi, alsa-devel, dgreid, cychiang
The forward declaration of mt8183_mt6358_ts3a227_max98357_headset_init
is for cyclic dependency between card, headset_dev, and headset_init.
It used to be:
- card depends on headset_dev
- headset_dev depends on headset_init
- headset_init depends on card
Commit a962a809e5e4 ("ASoC: mediatek: mt8183: make headset codec
optional") removed the cyclic dependency.
Thus, it is safe to remove the forward declaration.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index a7ad41b6e885..30a7735c4af3 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -390,14 +390,6 @@ mt8183_mt6358_ts3a227_max98357_dai_links[] = {
},
};
-static int
-mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *cpnt);
-
-static struct snd_soc_aux_dev mt8183_mt6358_ts3a227_max98357_headset_dev = {
- .dlc = COMP_EMPTY(),
- .init = mt8183_mt6358_ts3a227_max98357_headset_init,
-};
-
static struct snd_soc_card mt8183_mt6358_ts3a227_max98357_card = {
.name = "mt8183_mt6358_ts3a227_max98357",
.owner = THIS_MODULE,
@@ -428,6 +420,11 @@ mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
return ret;
}
+static struct snd_soc_aux_dev mt8183_mt6358_ts3a227_max98357_headset_dev = {
+ .dlc = COMP_EMPTY(),
+ .init = mt8183_mt6358_ts3a227_max98357_headset_init,
+};
+
static int
mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
{
--
2.23.0.187.g17f5b7556c-goog
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/4] ASoC: mediatek: mt8183: fix space issues
2019-08-30 7:42 [PATCH 0/4] ASoC: mediatek: mt8183: some cleanups Tzung-Bi Shih
` (3 preceding siblings ...)
2019-08-30 7:42 ` [PATCH 3/4] ASoC: mediatek: mt8183: remove forward declaration of headset_init Tzung-Bi Shih
@ 2019-08-30 7:42 ` Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: fix space issues" to the asoc tree Mark Brown
4 siblings, 2 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2019-08-30 7:42 UTC (permalink / raw)
To: broonie; +Cc: tzungbi, alsa-devel, dgreid, cychiang
Fix space issues:
- No space before ';'.
- No trailing blank line.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 30a7735c4af3..bb9cdc0d6552 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -471,7 +471,7 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
return PTR_ERR(priv->pinctrl);
}
- for (i = 0 ; i < PIN_STATE_MAX ; i++) {
+ for (i = 0; i < PIN_STATE_MAX; i++) {
priv->pin_states[i] = pinctrl_lookup_state(priv->pinctrl,
mt8183_pin_str[i]);
if (IS_ERR(priv->pin_states[i])) {
@@ -526,4 +526,3 @@ MODULE_DESCRIPTION("MT8183-MT6358-TS3A227-MAX98357 ALSA SoC machine driver");
MODULE_AUTHOR("Shunli Wang <shunli.wang@mediatek.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("mt8183_mt6358_ts3a227_max98357 soc card");
-
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] [PATCH 4/4] ASoC: mediatek: mt8183: fix space issues
2019-08-30 7:42 ` [PATCH 4/4] ASoC: mediatek: mt8183: fix space issues Tzung-Bi Shih
@ 2019-08-30 7:42 ` Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: fix space issues" to the asoc tree Mark Brown
1 sibling, 0 replies; 18+ messages in thread
From: Tzung-Bi Shih @ 2019-08-30 7:42 UTC (permalink / raw)
To: broonie; +Cc: tzungbi, alsa-devel, dgreid, cychiang
Fix space issues:
- No space before ';'.
- No trailing blank line.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 30a7735c4af3..bb9cdc0d6552 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -471,7 +471,7 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
return PTR_ERR(priv->pinctrl);
}
- for (i = 0 ; i < PIN_STATE_MAX ; i++) {
+ for (i = 0; i < PIN_STATE_MAX; i++) {
priv->pin_states[i] = pinctrl_lookup_state(priv->pinctrl,
mt8183_pin_str[i]);
if (IS_ERR(priv->pin_states[i])) {
@@ -526,4 +526,3 @@ MODULE_DESCRIPTION("MT8183-MT6358-TS3A227-MAX98357 ALSA SoC machine driver");
MODULE_AUTHOR("Shunli Wang <shunli.wang@mediatek.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("mt8183_mt6358_ts3a227_max98357 soc card");
-
--
2.23.0.187.g17f5b7556c-goog
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Applied "ASoC: mediatek: mt8183: remove forward declaration of headset_init" to the asoc tree
2019-08-30 7:42 ` [PATCH 3/4] ASoC: mediatek: mt8183: remove forward declaration of headset_init Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
@ 2019-08-30 16:06 ` Mark Brown
2019-08-30 16:06 ` [alsa-devel] " Mark Brown
1 sibling, 1 reply; 18+ messages in thread
From: Mark Brown @ 2019-08-30 16:06 UTC (permalink / raw)
Cc: tzungbi, alsa-devel, Mark Brown, dgreid, cychiang
The patch
ASoC: mediatek: mt8183: remove forward declaration of headset_init
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From fc347483b87f029c1bc18a8492623ca21dcd7607 Mon Sep 17 00:00:00 2001
From: Tzung-Bi Shih <tzungbi@google.com>
Date: Fri, 30 Aug 2019 15:42:39 +0800
Subject: [PATCH] ASoC: mediatek: mt8183: remove forward declaration of
headset_init
The forward declaration of mt8183_mt6358_ts3a227_max98357_headset_init
is for cyclic dependency between card, headset_dev, and headset_init.
It used to be:
- card depends on headset_dev
- headset_dev depends on headset_init
- headset_init depends on card
Commit a962a809e5e4 ("ASoC: mediatek: mt8183: make headset codec
optional") removed the cyclic dependency.
Thus, it is safe to remove the forward declaration.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190830074240.195166-4-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index a7ad41b6e885..30a7735c4af3 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -390,14 +390,6 @@ mt8183_mt6358_ts3a227_max98357_dai_links[] = {
},
};
-static int
-mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *cpnt);
-
-static struct snd_soc_aux_dev mt8183_mt6358_ts3a227_max98357_headset_dev = {
- .dlc = COMP_EMPTY(),
- .init = mt8183_mt6358_ts3a227_max98357_headset_init,
-};
-
static struct snd_soc_card mt8183_mt6358_ts3a227_max98357_card = {
.name = "mt8183_mt6358_ts3a227_max98357",
.owner = THIS_MODULE,
@@ -428,6 +420,11 @@ mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
return ret;
}
+static struct snd_soc_aux_dev mt8183_mt6358_ts3a227_max98357_headset_dev = {
+ .dlc = COMP_EMPTY(),
+ .init = mt8183_mt6358_ts3a227_max98357_headset_init,
+};
+
static int
mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
{
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Applied "ASoC: mediatek: mt8183: fix space issues" to the asoc tree
2019-08-30 7:42 ` [PATCH 4/4] ASoC: mediatek: mt8183: fix space issues Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
@ 2019-08-30 16:06 ` Mark Brown
2019-08-30 16:06 ` [alsa-devel] " Mark Brown
1 sibling, 1 reply; 18+ messages in thread
From: Mark Brown @ 2019-08-30 16:06 UTC (permalink / raw)
Cc: tzungbi, alsa-devel, Mark Brown, dgreid, cychiang
The patch
ASoC: mediatek: mt8183: fix space issues
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From e5b3ae3e8c4772106713698075a87bff1e86e710 Mon Sep 17 00:00:00 2001
From: Tzung-Bi Shih <tzungbi@google.com>
Date: Fri, 30 Aug 2019 15:42:40 +0800
Subject: [PATCH] ASoC: mediatek: mt8183: fix space issues
Fix space issues:
- No space before ';'.
- No trailing blank line.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190830074240.195166-5-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 30a7735c4af3..bb9cdc0d6552 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -471,7 +471,7 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
return PTR_ERR(priv->pinctrl);
}
- for (i = 0 ; i < PIN_STATE_MAX ; i++) {
+ for (i = 0; i < PIN_STATE_MAX; i++) {
priv->pin_states[i] = pinctrl_lookup_state(priv->pinctrl,
mt8183_pin_str[i]);
if (IS_ERR(priv->pin_states[i])) {
@@ -526,4 +526,3 @@ MODULE_DESCRIPTION("MT8183-MT6358-TS3A227-MAX98357 ALSA SoC machine driver");
MODULE_AUTHOR("Shunli Wang <shunli.wang@mediatek.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("mt8183_mt6358_ts3a227_max98357 soc card");
-
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Applied "ASoC: mediatek: mt8183: move headset jack to card-specific storage" to the asoc tree
2019-08-30 7:42 ` [PATCH 2/4] ASoC: mediatek: mt8183: move headset jack to card-specific storage Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
@ 2019-08-30 16:06 ` Mark Brown
2019-08-30 16:06 ` [alsa-devel] " Mark Brown
1 sibling, 1 reply; 18+ messages in thread
From: Mark Brown @ 2019-08-30 16:06 UTC (permalink / raw)
Cc: tzungbi, alsa-devel, Mark Brown, dgreid, cychiang
The patch
ASoC: mediatek: mt8183: move headset jack to card-specific storage
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 95d779b4b8e7a62d53c7afeba45207089dcee4c8 Mon Sep 17 00:00:00 2001
From: Tzung-Bi Shih <tzungbi@google.com>
Date: Fri, 30 Aug 2019 15:42:38 +0800
Subject: [PATCH] ASoC: mediatek: mt8183: move headset jack to card-specific
storage
Move headset jack descriptor from module global scope to card-specific
storage to make its ownership more explicit.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190830074240.195166-3-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
.../soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 1d4a1600f768..a7ad41b6e885 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -15,8 +15,6 @@
#include "mt8183-afe-common.h"
#include "../../codecs/ts3a227e.h"
-static struct snd_soc_jack headset_jack;
-
enum PINCTRL_PIN_STATE {
PIN_STATE_DEFAULT = 0,
PIN_TDM_OUT_ON,
@@ -31,6 +29,7 @@ static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
struct mt8183_mt6358_ts3a227_max98357_priv {
struct pinctrl *pinctrl;
struct pinctrl_state *pin_states[PIN_STATE_MAX];
+ struct snd_soc_jack headset_jack;
};
static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream,
@@ -410,6 +409,8 @@ static int
mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
{
int ret;
+ struct mt8183_mt6358_ts3a227_max98357_priv *priv =
+ snd_soc_card_get_drvdata(component->card);
/* Enable Headset and 4 Buttons Jack detection */
ret = snd_soc_card_jack_new(&mt8183_mt6358_ts3a227_max98357_card,
@@ -417,12 +418,12 @@ mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
SND_JACK_HEADSET |
SND_JACK_BTN_0 | SND_JACK_BTN_1 |
SND_JACK_BTN_2 | SND_JACK_BTN_3,
- &headset_jack,
+ &priv->headset_jack,
NULL, 0);
if (ret)
return ret;
- ret = ts3a227e_enable_jack_detect(component, &headset_jack);
+ ret = ts3a227e_enable_jack_detect(component, &priv->headset_jack);
return ret;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Applied "ASoC: mediatek: mt8183: move private structure" to the asoc tree
2019-08-30 7:42 ` [PATCH 1/4] ASoC: mediatek: mt8183: move private structure Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
@ 2019-08-30 16:06 ` Mark Brown
2019-08-30 16:06 ` [alsa-devel] " Mark Brown
1 sibling, 1 reply; 18+ messages in thread
From: Mark Brown @ 2019-08-30 16:06 UTC (permalink / raw)
Cc: tzungbi, alsa-devel, Mark Brown, dgreid, cychiang
The patch
ASoC: mediatek: mt8183: move private structure
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 96ed76983307a8a24400495e4e6453607e765fcf Mon Sep 17 00:00:00 2001
From: Tzung-Bi Shih <tzungbi@google.com>
Date: Fri, 30 Aug 2019 15:42:37 +0800
Subject: [PATCH] ASoC: mediatek: mt8183: move private structure
Move private structure to the beginning of file to declare earlier
so that most functions can see it.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190830074240.195166-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 32 +++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 560fcc5923a4..1d4a1600f768 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -17,6 +17,22 @@
static struct snd_soc_jack headset_jack;
+enum PINCTRL_PIN_STATE {
+ PIN_STATE_DEFAULT = 0,
+ PIN_TDM_OUT_ON,
+ PIN_TDM_OUT_OFF,
+ PIN_STATE_MAX
+};
+
+static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
+ "default", "aud_tdm_out_on", "aud_tdm_out_off",
+};
+
+struct mt8183_mt6358_ts3a227_max98357_priv {
+ struct pinctrl *pinctrl;
+ struct pinctrl_state *pin_states[PIN_STATE_MAX];
+};
+
static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
@@ -46,22 +62,6 @@ static int mt8183_i2s_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
return 0;
}
-enum PINCTRL_PIN_STATE {
- PIN_STATE_DEFAULT = 0,
- PIN_TDM_OUT_ON,
- PIN_TDM_OUT_OFF,
- PIN_STATE_MAX
-};
-
-static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
- "default", "aud_tdm_out_on", "aud_tdm_out_off",
-};
-
-struct mt8183_mt6358_ts3a227_max98357_priv {
- struct pinctrl *pinctrl;
- struct pinctrl_state *pin_states[PIN_STATE_MAX];
-};
-
static int
mt8183_mt6358_ts3a227_max98357_bt_sco_startup(
struct snd_pcm_substream *substream)
--
2.20.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] Applied "ASoC: mediatek: mt8183: remove forward declaration of headset_init" to the asoc tree
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: remove forward declaration of headset_init" to the asoc tree Mark Brown
@ 2019-08-30 16:06 ` Mark Brown
0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2019-08-30 16:06 UTC (permalink / raw)
To: Tzung-Bi Shih; +Cc: tzungbi, alsa-devel, Mark Brown, dgreid, cychiang
The patch
ASoC: mediatek: mt8183: remove forward declaration of headset_init
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From fc347483b87f029c1bc18a8492623ca21dcd7607 Mon Sep 17 00:00:00 2001
From: Tzung-Bi Shih <tzungbi@google.com>
Date: Fri, 30 Aug 2019 15:42:39 +0800
Subject: [PATCH] ASoC: mediatek: mt8183: remove forward declaration of
headset_init
The forward declaration of mt8183_mt6358_ts3a227_max98357_headset_init
is for cyclic dependency between card, headset_dev, and headset_init.
It used to be:
- card depends on headset_dev
- headset_dev depends on headset_init
- headset_init depends on card
Commit a962a809e5e4 ("ASoC: mediatek: mt8183: make headset codec
optional") removed the cyclic dependency.
Thus, it is safe to remove the forward declaration.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190830074240.195166-4-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index a7ad41b6e885..30a7735c4af3 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -390,14 +390,6 @@ mt8183_mt6358_ts3a227_max98357_dai_links[] = {
},
};
-static int
-mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *cpnt);
-
-static struct snd_soc_aux_dev mt8183_mt6358_ts3a227_max98357_headset_dev = {
- .dlc = COMP_EMPTY(),
- .init = mt8183_mt6358_ts3a227_max98357_headset_init,
-};
-
static struct snd_soc_card mt8183_mt6358_ts3a227_max98357_card = {
.name = "mt8183_mt6358_ts3a227_max98357",
.owner = THIS_MODULE,
@@ -428,6 +420,11 @@ mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
return ret;
}
+static struct snd_soc_aux_dev mt8183_mt6358_ts3a227_max98357_headset_dev = {
+ .dlc = COMP_EMPTY(),
+ .init = mt8183_mt6358_ts3a227_max98357_headset_init,
+};
+
static int
mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
{
--
2.20.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] Applied "ASoC: mediatek: mt8183: fix space issues" to the asoc tree
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: fix space issues" to the asoc tree Mark Brown
@ 2019-08-30 16:06 ` Mark Brown
0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2019-08-30 16:06 UTC (permalink / raw)
To: Tzung-Bi Shih; +Cc: tzungbi, alsa-devel, Mark Brown, dgreid, cychiang
The patch
ASoC: mediatek: mt8183: fix space issues
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From e5b3ae3e8c4772106713698075a87bff1e86e710 Mon Sep 17 00:00:00 2001
From: Tzung-Bi Shih <tzungbi@google.com>
Date: Fri, 30 Aug 2019 15:42:40 +0800
Subject: [PATCH] ASoC: mediatek: mt8183: fix space issues
Fix space issues:
- No space before ';'.
- No trailing blank line.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190830074240.195166-5-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 30a7735c4af3..bb9cdc0d6552 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -471,7 +471,7 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
return PTR_ERR(priv->pinctrl);
}
- for (i = 0 ; i < PIN_STATE_MAX ; i++) {
+ for (i = 0; i < PIN_STATE_MAX; i++) {
priv->pin_states[i] = pinctrl_lookup_state(priv->pinctrl,
mt8183_pin_str[i]);
if (IS_ERR(priv->pin_states[i])) {
@@ -526,4 +526,3 @@ MODULE_DESCRIPTION("MT8183-MT6358-TS3A227-MAX98357 ALSA SoC machine driver");
MODULE_AUTHOR("Shunli Wang <shunli.wang@mediatek.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("mt8183_mt6358_ts3a227_max98357 soc card");
-
--
2.20.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] Applied "ASoC: mediatek: mt8183: move headset jack to card-specific storage" to the asoc tree
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: move headset jack to card-specific storage" to the asoc tree Mark Brown
@ 2019-08-30 16:06 ` Mark Brown
0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2019-08-30 16:06 UTC (permalink / raw)
To: Tzung-Bi Shih; +Cc: tzungbi, alsa-devel, Mark Brown, dgreid, cychiang
The patch
ASoC: mediatek: mt8183: move headset jack to card-specific storage
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From 95d779b4b8e7a62d53c7afeba45207089dcee4c8 Mon Sep 17 00:00:00 2001
From: Tzung-Bi Shih <tzungbi@google.com>
Date: Fri, 30 Aug 2019 15:42:38 +0800
Subject: [PATCH] ASoC: mediatek: mt8183: move headset jack to card-specific
storage
Move headset jack descriptor from module global scope to card-specific
storage to make its ownership more explicit.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190830074240.195166-3-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
.../soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 1d4a1600f768..a7ad41b6e885 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -15,8 +15,6 @@
#include "mt8183-afe-common.h"
#include "../../codecs/ts3a227e.h"
-static struct snd_soc_jack headset_jack;
-
enum PINCTRL_PIN_STATE {
PIN_STATE_DEFAULT = 0,
PIN_TDM_OUT_ON,
@@ -31,6 +29,7 @@ static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
struct mt8183_mt6358_ts3a227_max98357_priv {
struct pinctrl *pinctrl;
struct pinctrl_state *pin_states[PIN_STATE_MAX];
+ struct snd_soc_jack headset_jack;
};
static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream,
@@ -410,6 +409,8 @@ static int
mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
{
int ret;
+ struct mt8183_mt6358_ts3a227_max98357_priv *priv =
+ snd_soc_card_get_drvdata(component->card);
/* Enable Headset and 4 Buttons Jack detection */
ret = snd_soc_card_jack_new(&mt8183_mt6358_ts3a227_max98357_card,
@@ -417,12 +418,12 @@ mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component)
SND_JACK_HEADSET |
SND_JACK_BTN_0 | SND_JACK_BTN_1 |
SND_JACK_BTN_2 | SND_JACK_BTN_3,
- &headset_jack,
+ &priv->headset_jack,
NULL, 0);
if (ret)
return ret;
- ret = ts3a227e_enable_jack_detect(component, &headset_jack);
+ ret = ts3a227e_enable_jack_detect(component, &priv->headset_jack);
return ret;
}
--
2.20.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [alsa-devel] Applied "ASoC: mediatek: mt8183: move private structure" to the asoc tree
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: move private structure" to the asoc tree Mark Brown
@ 2019-08-30 16:06 ` Mark Brown
0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2019-08-30 16:06 UTC (permalink / raw)
To: Tzung-Bi Shih; +Cc: tzungbi, alsa-devel, Mark Brown, dgreid, cychiang
The patch
ASoC: mediatek: mt8183: move private structure
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From 96ed76983307a8a24400495e4e6453607e765fcf Mon Sep 17 00:00:00 2001
From: Tzung-Bi Shih <tzungbi@google.com>
Date: Fri, 30 Aug 2019 15:42:37 +0800
Subject: [PATCH] ASoC: mediatek: mt8183: move private structure
Move private structure to the beginning of file to declare earlier
so that most functions can see it.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190830074240.195166-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 32 +++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
index 560fcc5923a4..1d4a1600f768 100644
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
@@ -17,6 +17,22 @@
static struct snd_soc_jack headset_jack;
+enum PINCTRL_PIN_STATE {
+ PIN_STATE_DEFAULT = 0,
+ PIN_TDM_OUT_ON,
+ PIN_TDM_OUT_OFF,
+ PIN_STATE_MAX
+};
+
+static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
+ "default", "aud_tdm_out_on", "aud_tdm_out_off",
+};
+
+struct mt8183_mt6358_ts3a227_max98357_priv {
+ struct pinctrl *pinctrl;
+ struct pinctrl_state *pin_states[PIN_STATE_MAX];
+};
+
static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
@@ -46,22 +62,6 @@ static int mt8183_i2s_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
return 0;
}
-enum PINCTRL_PIN_STATE {
- PIN_STATE_DEFAULT = 0,
- PIN_TDM_OUT_ON,
- PIN_TDM_OUT_OFF,
- PIN_STATE_MAX
-};
-
-static const char * const mt8183_pin_str[PIN_STATE_MAX] = {
- "default", "aud_tdm_out_on", "aud_tdm_out_off",
-};
-
-struct mt8183_mt6358_ts3a227_max98357_priv {
- struct pinctrl *pinctrl;
- struct pinctrl_state *pin_states[PIN_STATE_MAX];
-};
-
static int
mt8183_mt6358_ts3a227_max98357_bt_sco_startup(
struct snd_pcm_substream *substream)
--
2.20.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
end of thread, other threads:[~2019-08-30 16:09 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30 7:42 [PATCH 0/4] ASoC: mediatek: mt8183: some cleanups Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
2019-08-30 7:42 ` [PATCH 1/4] ASoC: mediatek: mt8183: move private structure Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: move private structure" to the asoc tree Mark Brown
2019-08-30 16:06 ` [alsa-devel] " Mark Brown
2019-08-30 7:42 ` [PATCH 2/4] ASoC: mediatek: mt8183: move headset jack to card-specific storage Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: move headset jack to card-specific storage" to the asoc tree Mark Brown
2019-08-30 16:06 ` [alsa-devel] " Mark Brown
2019-08-30 7:42 ` [PATCH 3/4] ASoC: mediatek: mt8183: remove forward declaration of headset_init Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: remove forward declaration of headset_init" to the asoc tree Mark Brown
2019-08-30 16:06 ` [alsa-devel] " Mark Brown
2019-08-30 7:42 ` [PATCH 4/4] ASoC: mediatek: mt8183: fix space issues Tzung-Bi Shih
2019-08-30 7:42 ` [alsa-devel] " Tzung-Bi Shih
2019-08-30 16:06 ` Applied "ASoC: mediatek: mt8183: fix space issues" to the asoc tree Mark Brown
2019-08-30 16:06 ` [alsa-devel] " 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).