diff mbox

[1/2] ALSA: hda - Make a SND_HDA_PIN_QUIRK macro

Message ID 1403614014-15417-1-git-send-email-david.henningsson@canonical.com (mailing list archive)
State Accepted
Commit a2d2fa02b2ec87609295a5bf2391a52e6e7ae111
Headers show

Commit Message

David Henningsson June 24, 2014, 12:46 p.m. UTC
This is cosmetical - it makes the new pin quirk table look better.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 sound/pci/hda/hda_local.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Hi Takashi,

If I were you, I'd take these patches for 3.16 even though it's not strictly a
regression - as it would make maintenance easier not to have any release with
the quirk table in non-macro style.

Sorry for not making this macro earlier.

Comments

Takashi Iwai June 24, 2014, 12:49 p.m. UTC | #1
At Tue, 24 Jun 2014 14:46:53 +0200,
David Henningsson wrote:
> 
> This is cosmetical - it makes the new pin quirk table look better.
> 
> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
> ---
>  sound/pci/hda/hda_local.h | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> Hi Takashi,
> 
> If I were you, I'd take these patches for 3.16 even though it's not strictly a
> regression - as it would make maintenance easier not to have any release with
> the quirk table in non-macro style.
> 
> Sorry for not making this macro earlier.

OK, I took these to for-linus branch.


thanks,

Takashi

> 
> diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
> index ebd1fa6..4e2d486 100644
> --- a/sound/pci/hda/hda_local.h
> +++ b/sound/pci/hda/hda_local.h
> @@ -417,6 +417,27 @@ struct snd_hda_pin_quirk {
>  	int value;			/* quirk value */
>  };
>  
> +#ifdef CONFIG_SND_DEBUG_VERBOSE
> +
> +#define SND_HDA_PIN_QUIRK(_codec, _subvendor, _name, _value, _pins...) \
> +	{ .codec = _codec,\
> +	  .subvendor = _subvendor,\
> +	  .name = _name,\
> +	  .value = _value,\
> +	  .pins = (const struct hda_pintbl[]) { _pins } \
> +	}
> +#else
> +
> +#define SND_HDA_PIN_QUIRK(_codec, _subvendor, _name, _value, _pins...) \
> +	{ .codec = _codec,\
> +	  .subvendor = _subvendor,\
> +	  .value = _value,\
> +	  .pins = (const struct hda_pintbl[]) { _pins } \
> +	}
> +
> +#endif
> +
> +
>  /* fixup types */
>  enum {
>  	HDA_FIXUP_INVALID,
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index ebd1fa6..4e2d486 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -417,6 +417,27 @@  struct snd_hda_pin_quirk {
 	int value;			/* quirk value */
 };
 
+#ifdef CONFIG_SND_DEBUG_VERBOSE
+
+#define SND_HDA_PIN_QUIRK(_codec, _subvendor, _name, _value, _pins...) \
+	{ .codec = _codec,\
+	  .subvendor = _subvendor,\
+	  .name = _name,\
+	  .value = _value,\
+	  .pins = (const struct hda_pintbl[]) { _pins } \
+	}
+#else
+
+#define SND_HDA_PIN_QUIRK(_codec, _subvendor, _name, _value, _pins...) \
+	{ .codec = _codec,\
+	  .subvendor = _subvendor,\
+	  .value = _value,\
+	  .pins = (const struct hda_pintbl[]) { _pins } \
+	}
+
+#endif
+
+
 /* fixup types */
 enum {
 	HDA_FIXUP_INVALID,