alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
@ 2012-09-08 19:09 sgiurgiu11
  2012-09-09 10:03 ` Clemens Ladisch
  0 siblings, 1 reply; 11+ messages in thread
From: sgiurgiu11 @ 2012-09-08 19:09 UTC (permalink / raw)
  To: patch; +Cc: alsa-devel, Sergiu Giurgiu

From: Sergiu Giurgiu <sgiurgiu11@gmail.com>


Signed-off-by: Sergiu Giurgiu <sgiurgiu11@gmail.com>

diff --git a/mirror/sound/pci/oxygen/virtuoso.c b/mirror/sound/pci/oxygen/virtuoso.c
index 3d71423..8104eab 100644
--- a/mirror/sound/pci/oxygen/virtuoso.c
+++ b/mirror/sound/pci/oxygen/virtuoso.c
@@ -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 },
 	{ }
 };
diff --git a/mirror/sound/pci/oxygen/xonar_wm87x6.c b/mirror/sound/pci/oxygen/xonar_wm87x6.c
index 63cff90..af91016 100644
--- a/mirror/sound/pci/oxygen/xonar_wm87x6.c
+++ b/mirror/sound/pci/oxygen/xonar_wm87x6.c
@@ -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;
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
  2012-09-09 10:03 ` Clemens Ladisch
@ 2012-09-09  8:01   ` Sergiu Giurgiu
  2012-09-20 22:55     ` Adriano Angeletti
  2012-10-29  3:51     ` jack
  0 siblings, 2 replies; 11+ messages in thread
From: Sergiu Giurgiu @ 2012-09-09  8:01 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel, patch

On 09/09/2012 06:03 AM, Clemens Ladisch wrote:
> sgiurgiu11@gmail.com wrote:
>> From: Sergiu Giurgiu <sgiurgiu11@gmail.com>
>>
>> Signed-off-by: Sergiu Giurgiu <sgiurgiu11@gmail.com>
> 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.

>
>> +++ b/mirror/sound/pci/oxygen/xonar_wm87x6.c
>>
>> +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.
>
> Regards,
> Clemens
All the best,
Sergiu.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
@ 2012-09-09  9:14 sgiurgiu11
  2013-09-26 10:07 ` Ian Clarke
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: sgiurgiu11 @ 2012-09-09  9:14 UTC (permalink / raw)
  To: patch; +Cc: alsa-devel, Sergiu Giurgiu

From: Sergiu Giurgiu <sgiurgiu11@gmail.com>

This patch adds support for ASUS - Xonar DSX sound cards. Tested on openSUSE 12.2 with kernel:
Linux 3.4.6-2.10-desktop #1 SMP PREEMPT Thu Jul 26 09:36:26 UTC 2012 (641c197) x86_64 x86_64 x86_64 GNU/Linux
Works:
 - play sounds
 - adjust volume on master channel.
 - mute .

Since Xonar DS uses the same chip, everything that works for DS should work for DSX as well.

Thank you,
Sergiu Giurgiu.

Signed-off-by: Sergiu Giurgiu <sgiurgiu11@gmail.com>

diff --git a/mirror/sound/pci/oxygen/virtuoso.c b/mirror/sound/pci/oxygen/virtuoso.c
index 3d71423..8104eab 100644
--- a/mirror/sound/pci/oxygen/virtuoso.c
+++ b/mirror/sound/pci/oxygen/virtuoso.c
@@ -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 },
 	{ }
 };
diff --git a/mirror/sound/pci/oxygen/xonar_wm87x6.c b/mirror/sound/pci/oxygen/xonar_wm87x6.c
index 63cff90..b555b62 100644
--- a/mirror/sound/pci/oxygen/xonar_wm87x6.c
+++ b/mirror/sound/pci/oxygen/xonar_wm87x6.c
@@ -1255,7 +1255,6 @@ static void dump_wm87x6_registers(struct oxygen *chip,
 }
 
 static const struct oxygen_model model_xonar_ds = {
-	.shortname = "Xonar DS",
 	.longname = "Asus Virtuoso 66",
 	.chip = "AV200",
 	.init = xonar_ds_init,
@@ -1327,6 +1326,11 @@ int __devinit get_xonar_wm87x6_model(struct oxygen *chip,
 	switch (id->subdevice) {
 	case 0x838e:
 		chip->model = model_xonar_ds;
+		chip->model.shortname = "Xonar DS";
+		break;
+	case 0x8522:
+		chip->model = model_xonar_ds;
+		chip->model.shortname = "Xonar DSX";
 		break;
 	case 0x835e:
 		chip->model = model_xonar_hdav_slim;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
  2012-09-08 19:09 [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support sgiurgiu11
@ 2012-09-09 10:03 ` Clemens Ladisch
  2012-09-09  8:01   ` Sergiu Giurgiu
  0 siblings, 1 reply; 11+ messages in thread
From: Clemens Ladisch @ 2012-09-09 10:03 UTC (permalink / raw)
  To: sgiurgiu11; +Cc: alsa-devel, patch

sgiurgiu11@gmail.com wrote:
> From: Sergiu Giurgiu <sgiurgiu11@gmail.com>
>
> Signed-off-by: Sergiu Giurgiu <sgiurgiu11@gmail.com>

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

> +++ b/mirror/sound/pci/oxygen/xonar_wm87x6.c
>
> +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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
  2012-09-09  8:01   ` Sergiu Giurgiu
@ 2012-09-20 22:55     ` Adriano Angeletti
  2012-10-29  3:51     ` jack
  1 sibling, 0 replies; 11+ messages in thread
From: Adriano Angeletti @ 2012-09-20 22:55 UTC (permalink / raw)
  To: alsa-devel



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
  2012-09-09  8:01   ` Sergiu Giurgiu
  2012-09-20 22:55     ` Adriano Angeletti
@ 2012-10-29  3:51     ` jack
  1 sibling, 0 replies; 11+ messages in thread
From: jack @ 2012-10-29  3:51 UTC (permalink / raw)
  To: alsa-devel

Just want to add that the optical out is working with this patch as
well. 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
  2012-09-09  9:14 sgiurgiu11
@ 2013-09-26 10:07 ` Ian Clarke
  2013-09-26 10:17 ` Ian Clarke
  2015-01-03  6:16 ` Man
  2 siblings, 0 replies; 11+ messages in thread
From: Ian Clarke @ 2013-09-26 10:07 UTC (permalink / raw)
  To: alsa-devel

 <sgiurgiu11 <at> gmail.com> writes:

> 
> From: Sergiu Giurgiu <sgiurgiu11 <at> gmail.com>
> 
> This patch adds support for ASUS - Xonar DSX sound cards. Tested on
openSUSE 12.2 with kernel:
> Linux 3.4.6-2.10-desktop #1 SMP PREEMPT Thu Jul 26 09:36:26 UTC 2012
(641c197) x86_64 x86_64 x86_64 GNU/Linux
> Works:
>  - play sounds
>  - adjust volume on master channel.
>  - mute .
> 
> Since Xonar DS uses the same chip, everything that works for DS should
work for DSX as well.
> 
> Thank you,
> Sergiu Giurgiu.
> 
> Signed-off-by: Sergiu Giurgiu <sgiurgiu11 <at> gmail.com>
> 
> diff --git a/mirror/sound/pci/oxygen/virtuoso.c
b/mirror/sound/pci/oxygen/virtuoso.c
> index 3d71423..8104eab 100644
> --- a/mirror/sound/pci/oxygen/virtuoso.c
> +++ b/mirror/sound/pci/oxygen/virtuoso.c
>  <at>  <at>  -52,6 +52,7  <at>  <at>  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 },
>  	{ }
>  };
> diff --git a/mirror/sound/pci/oxygen/xonar_wm87x6.c
b/mirror/sound/pci/oxygen/xonar_wm87x6.c
> index 63cff90..b555b62 100644
> --- a/mirror/sound/pci/oxygen/xonar_wm87x6.c
> +++ b/mirror/sound/pci/oxygen/xonar_wm87x6.c
>  <at>  <at>  -1255,7 +1255,6  <at>  <at>  static void
dump_wm87x6_registers(struct oxygen *chip,
>  }
> 
>  static const struct oxygen_model model_xonar_ds = {
> -	.shortname = "Xonar DS",
>  	.longname = "Asus Virtuoso 66",
>  	.chip = "AV200",
>  	.init = xonar_ds_init,
>  <at>  <at>  -1327,6 +1326,11  <at>  <at>  int __devinit
get_xonar_wm87x6_model(struct oxygen *chip,
>  	switch (id->subdevice) {
>  	case 0x838e:
>  		chip->model = model_xonar_ds;
> +		chip->model.shortname = "Xonar DS";
> +		break;
> +	case 0x8522:
> +		chip->model = model_xonar_ds;
> +		chip->model.shortname = "Xonar DSX";
>  		break;
>  	case 0x835e:
>  		chip->model = model_xonar_hdav_slim;

--------------------------------------------------------------------------

It appears that I need to apply this patch but I cannot understand how to do
this.
I have read that in order for the drivers to recognise the DSX card then
this patch is necessary.
Please explain where to apply it and how to compile the drivers afterwards.

Linux Mint 14, KDE, ASUS M5A78L-M motherboard with ALC887 chip. ALSA and
PulseAudio, all work together but sound quality is disappointing so I wish
to use the Xonar DSX instead.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
  2012-09-09  9:14 sgiurgiu11
  2013-09-26 10:07 ` Ian Clarke
@ 2013-09-26 10:17 ` Ian Clarke
  2013-09-26 11:05   ` Clemens Ladisch
  2015-01-03  6:16 ` Man
  2 siblings, 1 reply; 11+ messages in thread
From: Ian Clarke @ 2013-09-26 10:17 UTC (permalink / raw)
  To: alsa-devel

 <sgiurgiu11 <at> gmail.com> writes:

> 
> From: Sergiu Giurgiu <sgiurgiu11 <at> gmail.com>
> 
> This patch adds support for ASUS - Xonar DSX sound cards. Tested on
openSUSE 12.2 with kernel:
> Linux 3.4.6-2.10-desktop #1 SMP PREEMPT Thu Jul 26 09:36:26 UTC 2012
(641c197) x86_64 x86_64 x86_64 GNU/Linux
> Works:
>  - play sounds
>  - adjust volume on master channel.
>  - mute .
> 
> Since Xonar DS uses the same chip, everything that works for DS should
work for DSX as well.
> 
> Thank you,
> Sergiu Giurgiu.
> 
> Signed-off-by: Sergiu Giurgiu <sgiurgiu11 <at> gmail.com>
> 
> diff --git a/mirror/sound/pci/oxygen/virtuoso.c
b/mirror/sound/pci/oxygen/virtuoso.c
> index 3d71423..8104eab 100644
> --- a/mirror/sound/pci/oxygen/virtuoso.c
> +++ b/mirror/sound/pci/oxygen/virtuoso.c
>  <at>  <at>  -52,6 +52,7  <at>  <at>  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 },
>  	{ }
>  };
> diff --git a/mirror/sound/pci/oxygen/xonar_wm87x6.c
b/mirror/sound/pci/oxygen/xonar_wm87x6.c
> index 63cff90..b555b62 100644
> --- a/mirror/sound/pci/oxygen/xonar_wm87x6.c
> +++ b/mirror/sound/pci/oxygen/xonar_wm87x6.c
>  <at>  <at>  -1255,7 +1255,6  <at>  <at>  static void
dump_wm87x6_registers(struct oxygen *chip,
>  }
> 
>  static const struct oxygen_model model_xonar_ds = {
> -	.shortname = "Xonar DS",
>  	.longname = "Asus Virtuoso 66",
>  	.chip = "AV200",
>  	.init = xonar_ds_init,
>  <at>  <at>  -1327,6 +1326,11  <at>  <at>  int __devinit
get_xonar_wm87x6_model(struct oxygen *chip,
>  	switch (id->subdevice) {
>  	case 0x838e:
>  		chip->model = model_xonar_ds;
> +		chip->model.shortname = "Xonar DS";
> +		break;
> +	case 0x8522:
> +		chip->model = model_xonar_ds;
> +		chip->model.shortname = "Xonar DSX";
>  		break;
>  	case 0x835e:
>  		chip->model = model_xonar_hdav_slim;


-------------------------------------------------------------------------

It appears that I need to apply this patch but I cannot understand how to do
this.
I have read that in order for the drivers to recognise the DSX card then
this patch is necessary.
Please explain where to apply it and how to compile the drivers afterwards.

Linux Mint 14, KDE, ASUS M5A78L-M motherboard with ALC887 chip. ALSA and
PulseAudio, all work together but sound quality is disappointing so I wish
to use the Xonar DSX instead.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
  2013-09-26 10:17 ` Ian Clarke
@ 2013-09-26 11:05   ` Clemens Ladisch
  0 siblings, 0 replies; 11+ messages in thread
From: Clemens Ladisch @ 2013-09-26 11:05 UTC (permalink / raw)
  To: Ian Clarke, alsa-devel

Ian Clarke wrote:
> <sgiurgiu11 <at> gmail.com> writes:
>> This patch adds support for ASUS - Xonar DSX sound cards.
>
> It appears that I need to apply this patch but I cannot understand how to do
> this.
>
> Linux Mint 14

You need kernel 3.7 or later.  Update your kernel, or update the entire
distribution.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
  2012-09-09  9:14 sgiurgiu11
  2013-09-26 10:07 ` Ian Clarke
  2013-09-26 10:17 ` Ian Clarke
@ 2015-01-03  6:16 ` Man
  2015-01-04 21:56   ` Clemens Ladisch
  2 siblings, 1 reply; 11+ messages in thread
From: Man @ 2015-01-03  6:16 UTC (permalink / raw)
  To: alsa-devel



What are these codes?  Am I suppose to copy this into a file for the sound
card to work on linux?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support
  2015-01-03  6:16 ` Man
@ 2015-01-04 21:56   ` Clemens Ladisch
  0 siblings, 0 replies; 11+ messages in thread
From: Clemens Ladisch @ 2015-01-04 21:56 UTC (permalink / raw)
  To: Man, alsa-devel

Man wrote:
> Am I suppose to copy this into a file for the sound card to work on linux?

This code got merged into the 3.8 kernel two years ago.
If your kernel is older, update it.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-01-04 21:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-08 19:09 [PATCH - ALSA: snd-virtuoso 1/1] Xonar DSX support sgiurgiu11
2012-09-09 10:03 ` Clemens Ladisch
2012-09-09  8:01   ` Sergiu Giurgiu
2012-09-20 22:55     ` Adriano Angeletti
2012-10-29  3:51     ` jack
  -- strict thread matches above, loose matches on Subject: below --
2012-09-09  9:14 sgiurgiu11
2013-09-26 10:07 ` Ian Clarke
2013-09-26 10:17 ` Ian Clarke
2013-09-26 11:05   ` Clemens Ladisch
2015-01-03  6:16 ` Man
2015-01-04 21:56   ` Clemens Ladisch

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).