Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: [PATCH 5/5] ALSA: virtuoso: add Xonar Essence STX II daughterboard	support
Date: Sun, 07 Sep 2014 21:47:33 +0200	[thread overview]
Message-ID: <540CB655.7020103@ladisch.de> (raw)
In-Reply-To: <540CB520.50909@ladisch.de>

Detect and handle the H6 daughterboard; it works the same as with the
ST, except that there is no conflict with the CS2000 chip.

Tested-by: Andreas Allacher <andreas.allacher@gmx.at>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
 sound/pci/oxygen/xonar_pcm179x.c |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/sound/pci/oxygen/xonar_pcm179x.c b/sound/pci/oxygen/xonar_pcm179x.c
index 3c0a679..0d6a805 100644
--- a/sound/pci/oxygen/xonar_pcm179x.c
+++ b/sound/pci/oxygen/xonar_pcm179x.c
@@ -419,6 +419,7 @@ static void xonar_st_init_common(struct oxygen *chip)

 	data->generic.output_enable_bit = GPIO_ST_OUTPUT_ENABLE;
 	data->dacs = chip->model.dac_channels_mixer / 2;
+	data->h6 = chip->model.dac_channels_mixer > 2;
 	data->hp_gain_offset = 2*-18;

 	pcm1796_init(chip);
@@ -1142,8 +1143,18 @@ int get_xonar_pcm179x_model(struct oxygen *chip,
 		break;
 	case 0x85f4:
 		chip->model = model_xonar_st;
-		/* TODO: daughterboard support */
-		chip->model.shortname = "Xonar STX II";
+		oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_DB_MASK);
+		switch (oxygen_read16(chip, OXYGEN_GPIO_DATA) & GPIO_DB_MASK) {
+		default:
+			chip->model.shortname = "Xonar STX II";
+			break;
+		case GPIO_DB_H6:
+			chip->model.shortname = "Xonar STX II+H6";
+			chip->model.dac_channels_pcm = 8;
+			chip->model.dac_channels_mixer = 8;
+			chip->model.dac_mclks = OXYGEN_MCLKS(256, 128, 128);
+			break;
+		}
 		chip->model.init = xonar_stx_init;
 		chip->model.resume = xonar_stx_resume;
 		chip->model.set_dac_params = set_pcm1796_params;

  parent reply	other threads:[~2014-09-07 19:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 19:42 [PATCH 0/5] miscellaneous patches for 3.18 Clemens Ladisch
2014-09-07 19:43 ` [PATCH 1/5] ALSA: pcm: snd_interval_step: drop the min parameter Clemens Ladisch
2014-09-07 19:43 ` [PATCH 0/5] ALSA: pcm: snd_interval_step: fix changes of open intervals Clemens Ladisch
2014-09-07 19:44 ` [PATCH 3/5] ALSA: usb-audio: add MIDI port names for the Yamaha MOTIF XF Clemens Ladisch
2014-09-07 19:45 ` [PATCH 4/5] ALSA: virtuoso: add one more headphone impedance setting Clemens Ladisch
2014-09-07 19:47 ` Clemens Ladisch [this message]
2014-09-08  9:00 ` [PATCH 0/5] miscellaneous patches for 3.18 Takashi Iwai

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=540CB655.7020103@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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