alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Denis Washington <denisw@online.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH 2/2] Rename internal xonar_u1_* names to just xonar_u_*
Date: Tue, 11 Dec 2012 19:26:42 +0100	[thread overview]
Message-ID: <50C77AE2.8000001@online.de> (raw)


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

Now that the code applies both to the U1 and the U3,
xonar_u1 is not a good name anymore.

Signed-off-by: Denis Washington <denisw@online.de>
---
   sound/usb/mixer.h        |  2 +-
   sound/usb/mixer_quirks.c | 24 ++++++++++++------------
   2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index a7f3d45..9e7ec0e 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -22,7 +22,7 @@ struct usb_mixer_interface {
   	u8 rc_buffer[6];

   	u8 audigy2nx_leds[3];
-	u8 xonar_u1_status;
+	u8 xonar_u_status;
   };

   #define MAX_CHANNELS	16	/* max logical channels */
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 2223089..de6db70 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -416,23 +416,23 @@ static void snd_audigy2nx_proc_read(struct 
snd_info_entry *entry,
   	}
   }

-static int snd_xonar_u1_switch_get(struct snd_kcontrol *kcontrol,
+static int snd_xonar_u_switch_get(struct snd_kcontrol *kcontrol,
   				   struct snd_ctl_elem_value *ucontrol)
   {
   	struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);

-	ucontrol->value.integer.value[0] = !!(mixer->xonar_u1_status & 0x02);
+	ucontrol->value.integer.value[0] = !!(mixer->xonar_u_status & 0x02);
   	return 0;
   }

-static int snd_xonar_u1_switch_put(struct snd_kcontrol *kcontrol,
+static int snd_xonar_u_switch_put(struct snd_kcontrol *kcontrol,
   				   struct snd_ctl_elem_value *ucontrol)
   {
   	struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
   	u8 old_status, new_status;
   	int err, changed;

-	old_status = mixer->xonar_u1_status;
+	old_status = mixer->xonar_u_status;
   	if (ucontrol->value.integer.value[0])
   		new_status = old_status | 0x02;
   	else
@@ -449,27 +449,27 @@ static int snd_xonar_u1_switch_put(struct 
snd_kcontrol *kcontrol,
   	up_read(&mixer->chip->shutdown_rwsem);
   	if (err < 0)
   		return err;
-	mixer->xonar_u1_status = new_status;
+	mixer->xonar_u_status = new_status;
   	return changed;
   }

-static struct snd_kcontrol_new snd_xonar_u1_output_switch = {
+static struct snd_kcontrol_new snd_xonar_u_output_switch = {
   	.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
   	.name = "Digital Playback Switch",
   	.info = snd_ctl_boolean_mono_info,
-	.get = snd_xonar_u1_switch_get,
-	.put = snd_xonar_u1_switch_put,
+	.get = snd_xonar_u_switch_get,
+	.put = snd_xonar_u_switch_put,
   };

-static int snd_xonar_u1_controls_create(struct usb_mixer_interface *mixer)
+static int snd_xonar_u_controls_create(struct usb_mixer_interface *mixer)
   {
   	int err;

   	err = snd_ctl_add(mixer->chip->card,
-			  snd_ctl_new1(&snd_xonar_u1_output_switch, mixer));
+			  snd_ctl_new1(&snd_xonar_u_output_switch, mixer));
   	if (err < 0)
   		return err;
-	mixer->xonar_u1_status = 0x05;
+	mixer->xonar_u_status = 0x05;
   	return 0;
   }

@@ -1110,7 +1110,7 @@ int snd_usb_mixer_apply_create_quirk(struct 
usb_mixer_interface *mixer)
   	case USB_ID(0x0b05, 0x1739): /* ASUS Xonar U1 */
   	case USB_ID(0x0b05, 0x1743): /* ASUS Xonar U1 (2) */
   	case USB_ID(0x0b05, 0x17a0): /* ASUS Xonar U3 */
-		err = snd_xonar_u1_controls_create(mixer);
+		err = snd_xonar_u_controls_create(mixer);
   		break;

   	case USB_ID(0x17cc, 0x1011): /* Traktor Audio 6 */
-- 
1.8.0



[-- Attachment #1.2: S/MIME Kryptografische Unterschrift --]
[-- Type: application/pkcs7-signature, Size: 4453 bytes --]

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



             reply	other threads:[~2012-12-11 18:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-11 18:26 Denis Washington [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-12-11 10:39 [PATCH 2/2] Rename internal xonar_u1_* names to just xonar_u_* Denis Washington

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50C77AE2.8000001@online.de \
    --to=denisw@online.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).