Skip to contentSkip to conversation

Xonar DSX support

PATCH In review [email protected] 4 participants 5 messages Sep 8, 2012 – Oct 29, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Xonar DSX support

From: Sergiu Giurgiu <[email protected]>

mirror/sound/pci/oxygen/virtuoso.c +1 -0
index 3d71423..8104eab 100644
@@ -52,6 +52,7 @@ static DEFINE_PCI_DEVICE_TABLE(xonar_ids) = {
 	{ OXYGEN_PCI_SUBID(0x1043, 0x835d) },
 	{ OXYGEN_PCI_SUBID(0x1043, 0x835e) },
 	{ OXYGEN_PCI_SUBID(0x1043, 0x838e) },
+	{ OXYGEN_PCI_SUBID(0x1043, 0x8522) },
 	{ OXYGEN_PCI_SUBID_BROKEN_EEPROM },
 	{ }
 };
mirror/sound/pci/oxygen/xonar_wm87x6.c +37 -0
index 63cff90..af91016 100644
@@ -1321,6 +1321,40 @@ static const struct oxygen_model model_xonar_hdav_slim = {
 	.adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
 };
 
+static const struct oxygen_model model_xonar_dsx = {
+	.shortname = "Xonar DSX",
+	.longname = "Asus Virtuoso 66",
+	.chip = "AV200",
+	.init = xonar_ds_init,
+	.mixer_init = xonar_ds_mixer_init,
+	.cleanup = xonar_ds_cleanup,
+	.suspend = xonar_ds_suspend,
+	.resume = xonar_ds_resume,
+	.pcm_hardware_filter = wm8776_adc_hardware_filter,
+	.set_dac_params = set_wm87x6_dac_params,
+	.set_adc_params = set_wm8776_adc_params,
+	.update_dac_volume = update_wm87x6_volume,
+	.update_dac_mute = update_wm87x6_mute,
+	.update_center_lfe_mix = update_wm8766_center_lfe_mix,
+	.gpio_changed = xonar_ds_gpio_changed,
+	.dump_registers = dump_wm87x6_registers,
+	.dac_tlv = wm87x6_dac_db_scale,
+	.model_data_size = sizeof(struct xonar_wm87x6),
+	.device_config = PLAYBACK_0_TO_I2S |
+			 PLAYBACK_1_TO_SPDIF |
+			 CAPTURE_0_FROM_I2S_1 |
+			 CAPTURE_1_FROM_SPDIF,
+	.dac_channels_pcm = 8,
+	.dac_channels_mixer = 8,
+	.dac_volume_min = 255 - 2*60,
+	.dac_volume_max = 255,
+	.function_flags = OXYGEN_FUNCTION_SPI,
+	.dac_mclks = OXYGEN_MCLKS(256, 256, 128),
+	.adc_mclks = OXYGEN_MCLKS(256, 256, 128),
+	.dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
+	.adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
+};
+
 int __devinit get_xonar_wm87x6_model(struct oxygen *chip,
 				     const struct pci_device_id *id)
 {
@@ -1331,6 +1365,9 @@ int __devinit get_xonar_wm87x6_model(struct oxygen *chip,
 	case 0x835e:
 		chip->model = model_xonar_hdav_slim;
 		break;
+	case 0x8522:
+		chip->model = model_xonar_dsx;
+		break;
 	default:
 		return -EINVAL;
 	}
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 3 lines · [email protected] wrote:

From: Sergiu Giurgiu <[email protected]>

Many thanks for writing this patch!
However, please mention which features work, don't work, or aren't tested.

mirror/sound/pci/oxygen/xonar_wm87x6.c static const struct oxygen_model model_xonar_hdav_slim = {

Quoted 5 lines

+++ b/mirror/sound/pci/oxygen/xonar_wm87x6.c

mirror/sound/pci/oxygen/xonar_wm87x6.c +3 -0
+static const struct oxygen_model model_xonar_dsx = {
+	.shortname = "Xonar DSX",
+     ...

This structure is almost the same as model_xonar_ds; please merge them. (See xonar_cs43xx.c for an example.)

Regards,
Clemens

#2 lore raw
Quoted 6 lines · Clemens Ladisch
Quoted 3 lines · [email protected] wrote:

From: Sergiu Giurgiu <[email protected]>

Many thanks for writing this patch!
However, please mention which features work, don't work, or aren't tested.

I didn't see where (how) could i specify the mail body when using git send-email, I'll look/study further so that in the future I’ll have more context around the pieces of code written. Maybe the git commit comment??

What works/has been tested:
- play sound
- volume controls (mute also)

Since I only have 2 speakers, I cannot say anything about its 5.1 support.
What "should" work: everything that works for Xonar DS. As far as I can tell, DS and DSX are the same card the only difference being PCI vs PCIE. The fact that it was only required such a minor change to make it play sounds, makes it very likely. It has been running for the last 2 days on my PC.

Quoted 8 lines

mirror/sound/pci/oxygen/xonar_wm87x6.c static const struct oxygen_model model_xonar_hdav_slim = {

Quoted 6 lines

+++ b/mirror/sound/pci/oxygen/xonar_wm87x6.c

mirror/sound/pci/oxygen/xonar_wm87x6.c +3 -0
+static const struct oxygen_model model_xonar_dsx = {
+	.shortname = "Xonar DSX",
+     ...

This structure is almost the same as model_xonar_ds; please merge them. (See xonar_cs43xx.c for an example.)

The 2 structures are the same since we are talking about the same chip. I'll take a look in the file you've mentioned to see if there's a better way. I've started with the second struct since i had no idea what changes would be required, but yes, other than the name nothing is different.

Quoted 3 lines

Regards,
Clemens

All the best,
Sergiu.

#3 lore raw

thanks a lot Sergiu, Clemens.
7.1 works great!
tested on ubuntu studio 12.04 with kernel 3.2.0-23 lowlatency