* [PATCH] ALSA: hda - Make full_reset boolean
@ 2014-04-09 9:28 Thierry Reding
2014-04-09 9:42 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2014-04-09 9:28 UTC (permalink / raw)
To: Takashi Iwai, Jaroslav Kysela; +Cc: alsa-devel
From: Thierry Reding <treding@nvidia.com>
The full_reset argument to azx_init_chip() carries boolean rather than
numerical information, so update the type to reflect that.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
sound/pci/hda/hda_controller.c | 8 ++++----
sound/pci/hda/hda_intel.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index 97993e17f46a..98d31d153703 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -1604,7 +1604,7 @@ static void azx_exit_link_reset(struct azx *chip)
}
/* reset codec link */
-static int azx_reset(struct azx *chip, int full_reset)
+static int azx_reset(struct azx *chip, bool full_reset)
{
if (!full_reset)
goto __skip;
@@ -1701,7 +1701,7 @@ static void azx_int_clear(struct azx *chip)
/*
* reset and start the controller registers
*/
-void azx_init_chip(struct azx *chip, int full_reset)
+void azx_init_chip(struct azx *chip, bool full_reset)
{
if (chip->initialized)
return;
@@ -1841,7 +1841,7 @@ static void azx_bus_reset(struct hda_bus *bus)
bus->in_reset = 1;
azx_stop_chip(chip);
- azx_init_chip(chip, 1);
+ azx_init_chip(chip, true);
#ifdef CONFIG_PM
if (chip->initialized) {
struct azx_pcm *p;
@@ -1948,7 +1948,7 @@ int azx_codec_create(struct azx *chip, const char *model,
* get back to the sanity state.
*/
azx_stop_chip(chip);
- azx_init_chip(chip, 1);
+ azx_init_chip(chip, true);
}
}
}
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 77ca894f8284..d6bca62ef387 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -636,7 +636,7 @@ static int azx_resume(struct device *dev)
return -EIO;
azx_init_pci(chip);
- azx_init_chip(chip, 1);
+ azx_init_chip(chip, true);
snd_hda_resume(chip->bus);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
@@ -689,7 +689,7 @@ static int azx_runtime_resume(struct device *dev)
status = azx_readw(chip, STATESTS);
azx_init_pci(chip);
- azx_init_chip(chip, 1);
+ azx_init_chip(chip, true);
bus = chip->bus;
if (status && bus) {
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] ALSA: hda - Make full_reset boolean
2014-04-09 9:28 [PATCH] ALSA: hda - Make full_reset boolean Thierry Reding
@ 2014-04-09 9:42 ` Takashi Iwai
2014-04-09 10:33 ` Thierry Reding
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2014-04-09 9:42 UTC (permalink / raw)
To: Thierry Reding; +Cc: alsa-devel
At Wed, 9 Apr 2014 11:28:26 +0200,
Thierry Reding wrote:
>
> From: Thierry Reding <treding@nvidia.com>
>
> The full_reset argument to azx_init_chip() carries boolean rather than
> numerical information, so update the type to reflect that.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> sound/pci/hda/hda_controller.c | 8 ++++----
> sound/pci/hda/hda_intel.c | 4 ++--
> 2 files changed, 6 insertions(+), 6 deletions(-)
Forgot to patch hda_controller.h?
thanks,
Takashi
>
> diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
> index 97993e17f46a..98d31d153703 100644
> --- a/sound/pci/hda/hda_controller.c
> +++ b/sound/pci/hda/hda_controller.c
> @@ -1604,7 +1604,7 @@ static void azx_exit_link_reset(struct azx *chip)
> }
>
> /* reset codec link */
> -static int azx_reset(struct azx *chip, int full_reset)
> +static int azx_reset(struct azx *chip, bool full_reset)
> {
> if (!full_reset)
> goto __skip;
> @@ -1701,7 +1701,7 @@ static void azx_int_clear(struct azx *chip)
> /*
> * reset and start the controller registers
> */
> -void azx_init_chip(struct azx *chip, int full_reset)
> +void azx_init_chip(struct azx *chip, bool full_reset)
> {
> if (chip->initialized)
> return;
> @@ -1841,7 +1841,7 @@ static void azx_bus_reset(struct hda_bus *bus)
>
> bus->in_reset = 1;
> azx_stop_chip(chip);
> - azx_init_chip(chip, 1);
> + azx_init_chip(chip, true);
> #ifdef CONFIG_PM
> if (chip->initialized) {
> struct azx_pcm *p;
> @@ -1948,7 +1948,7 @@ int azx_codec_create(struct azx *chip, const char *model,
> * get back to the sanity state.
> */
> azx_stop_chip(chip);
> - azx_init_chip(chip, 1);
> + azx_init_chip(chip, true);
> }
> }
> }
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index 77ca894f8284..d6bca62ef387 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -636,7 +636,7 @@ static int azx_resume(struct device *dev)
> return -EIO;
> azx_init_pci(chip);
>
> - azx_init_chip(chip, 1);
> + azx_init_chip(chip, true);
>
> snd_hda_resume(chip->bus);
> snd_power_change_state(card, SNDRV_CTL_POWER_D0);
> @@ -689,7 +689,7 @@ static int azx_runtime_resume(struct device *dev)
> status = azx_readw(chip, STATESTS);
>
> azx_init_pci(chip);
> - azx_init_chip(chip, 1);
> + azx_init_chip(chip, true);
>
> bus = chip->bus;
> if (status && bus) {
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] ALSA: hda - Make full_reset boolean
2014-04-09 9:42 ` Takashi Iwai
@ 2014-04-09 10:33 ` Thierry Reding
0 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2014-04-09 10:33 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 759 bytes --]
On Wed, Apr 09, 2014 at 11:42:30AM +0200, Takashi Iwai wrote:
> At Wed, 9 Apr 2014 11:28:26 +0200,
> Thierry Reding wrote:
> >
> > From: Thierry Reding <treding@nvidia.com>
> >
> > The full_reset argument to azx_init_chip() carries boolean rather than
> > numerical information, so update the type to reflect that.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > sound/pci/hda/hda_controller.c | 8 ++++----
> > sound/pci/hda/hda_intel.c | 4 ++--
> > 2 files changed, 6 insertions(+), 6 deletions(-)
>
> Forgot to patch hda_controller.h?
Indeed. Turns out this didn't cause build breakage for me because I had
turned off HDA for some other test again.
Sorry about that. New patch sent out.
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ALSA: hda - Make full_reset boolean
@ 2014-04-09 10:30 Thierry Reding
2014-04-09 12:49 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2014-04-09 10:30 UTC (permalink / raw)
To: Takashi Iwai, Jaroslav Kysela; +Cc: alsa-devel
From: Thierry Reding <treding@nvidia.com>
The full_reset argument to azx_init_chip() carries boolean rather than
numerical information, so update the type to reflect that.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v2:
- update prototype in hda_controller.h
sound/pci/hda/hda_controller.c | 8 ++++----
sound/pci/hda/hda_controller.h | 2 +-
sound/pci/hda/hda_intel.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index 97993e17f46a..98d31d153703 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -1604,7 +1604,7 @@ static void azx_exit_link_reset(struct azx *chip)
}
/* reset codec link */
-static int azx_reset(struct azx *chip, int full_reset)
+static int azx_reset(struct azx *chip, bool full_reset)
{
if (!full_reset)
goto __skip;
@@ -1701,7 +1701,7 @@ static void azx_int_clear(struct azx *chip)
/*
* reset and start the controller registers
*/
-void azx_init_chip(struct azx *chip, int full_reset)
+void azx_init_chip(struct azx *chip, bool full_reset)
{
if (chip->initialized)
return;
@@ -1841,7 +1841,7 @@ static void azx_bus_reset(struct hda_bus *bus)
bus->in_reset = 1;
azx_stop_chip(chip);
- azx_init_chip(chip, 1);
+ azx_init_chip(chip, true);
#ifdef CONFIG_PM
if (chip->initialized) {
struct azx_pcm *p;
@@ -1948,7 +1948,7 @@ int azx_codec_create(struct azx *chip, const char *model,
* get back to the sanity state.
*/
azx_stop_chip(chip);
- azx_init_chip(chip, 1);
+ azx_init_chip(chip, true);
}
}
}
diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index 1d2e3be2bae6..baf0e77330af 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -37,7 +37,7 @@ int azx_alloc_stream_pages(struct azx *chip);
void azx_free_stream_pages(struct azx *chip);
/* Low level azx interface */
-void azx_init_chip(struct azx *chip, int full_reset);
+void azx_init_chip(struct azx *chip, bool full_reset);
void azx_stop_chip(struct azx *chip);
void azx_enter_link_reset(struct azx *chip);
irqreturn_t azx_interrupt(int irq, void *dev_id);
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 77ca894f8284..d6bca62ef387 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -636,7 +636,7 @@ static int azx_resume(struct device *dev)
return -EIO;
azx_init_pci(chip);
- azx_init_chip(chip, 1);
+ azx_init_chip(chip, true);
snd_hda_resume(chip->bus);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
@@ -689,7 +689,7 @@ static int azx_runtime_resume(struct device *dev)
status = azx_readw(chip, STATESTS);
azx_init_pci(chip);
- azx_init_chip(chip, 1);
+ azx_init_chip(chip, true);
bus = chip->bus;
if (status && bus) {
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] ALSA: hda - Make full_reset boolean
2014-04-09 10:30 Thierry Reding
@ 2014-04-09 12:49 ` Takashi Iwai
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2014-04-09 12:49 UTC (permalink / raw)
To: Thierry Reding; +Cc: alsa-devel
At Wed, 9 Apr 2014 12:30:57 +0200,
Thierry Reding wrote:
>
> From: Thierry Reding <treding@nvidia.com>
>
> The full_reset argument to azx_init_chip() carries boolean rather than
> numerical information, so update the type to reflect that.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Changes in v2:
> - update prototype in hda_controller.h
Thanks, applied.
Takashi
>
> sound/pci/hda/hda_controller.c | 8 ++++----
> sound/pci/hda/hda_controller.h | 2 +-
> sound/pci/hda/hda_intel.c | 4 ++--
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
> index 97993e17f46a..98d31d153703 100644
> --- a/sound/pci/hda/hda_controller.c
> +++ b/sound/pci/hda/hda_controller.c
> @@ -1604,7 +1604,7 @@ static void azx_exit_link_reset(struct azx *chip)
> }
>
> /* reset codec link */
> -static int azx_reset(struct azx *chip, int full_reset)
> +static int azx_reset(struct azx *chip, bool full_reset)
> {
> if (!full_reset)
> goto __skip;
> @@ -1701,7 +1701,7 @@ static void azx_int_clear(struct azx *chip)
> /*
> * reset and start the controller registers
> */
> -void azx_init_chip(struct azx *chip, int full_reset)
> +void azx_init_chip(struct azx *chip, bool full_reset)
> {
> if (chip->initialized)
> return;
> @@ -1841,7 +1841,7 @@ static void azx_bus_reset(struct hda_bus *bus)
>
> bus->in_reset = 1;
> azx_stop_chip(chip);
> - azx_init_chip(chip, 1);
> + azx_init_chip(chip, true);
> #ifdef CONFIG_PM
> if (chip->initialized) {
> struct azx_pcm *p;
> @@ -1948,7 +1948,7 @@ int azx_codec_create(struct azx *chip, const char *model,
> * get back to the sanity state.
> */
> azx_stop_chip(chip);
> - azx_init_chip(chip, 1);
> + azx_init_chip(chip, true);
> }
> }
> }
> diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
> index 1d2e3be2bae6..baf0e77330af 100644
> --- a/sound/pci/hda/hda_controller.h
> +++ b/sound/pci/hda/hda_controller.h
> @@ -37,7 +37,7 @@ int azx_alloc_stream_pages(struct azx *chip);
> void azx_free_stream_pages(struct azx *chip);
>
> /* Low level azx interface */
> -void azx_init_chip(struct azx *chip, int full_reset);
> +void azx_init_chip(struct azx *chip, bool full_reset);
> void azx_stop_chip(struct azx *chip);
> void azx_enter_link_reset(struct azx *chip);
> irqreturn_t azx_interrupt(int irq, void *dev_id);
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index 77ca894f8284..d6bca62ef387 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -636,7 +636,7 @@ static int azx_resume(struct device *dev)
> return -EIO;
> azx_init_pci(chip);
>
> - azx_init_chip(chip, 1);
> + azx_init_chip(chip, true);
>
> snd_hda_resume(chip->bus);
> snd_power_change_state(card, SNDRV_CTL_POWER_D0);
> @@ -689,7 +689,7 @@ static int azx_runtime_resume(struct device *dev)
> status = azx_readw(chip, STATESTS);
>
> azx_init_pci(chip);
> - azx_init_chip(chip, 1);
> + azx_init_chip(chip, true);
>
> bus = chip->bus;
> if (status && bus) {
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-09 12:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09 9:28 [PATCH] ALSA: hda - Make full_reset boolean Thierry Reding
2014-04-09 9:42 ` Takashi Iwai
2014-04-09 10:33 ` Thierry Reding
-- strict thread matches above, loose matches on Subject: below --
2014-04-09 10:30 Thierry Reding
2014-04-09 12:49 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox