* [PATCH] Envy24HT
2002-11-27 21:47 ` Envy24HT James Stafford
@ 2002-12-03 17:07 ` James Stafford
2002-12-03 18:06 ` Jaroslav Kysela
0 siblings, 1 reply; 8+ messages in thread
From: James Stafford @ 2002-12-03 17:07 UTC (permalink / raw)
To: alsa-devel@lists.sourceforge.net
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 1099 bytes --]
Attached are two patches that add basic Envy24HT support to the ICE1712
driver and VT1616 to the AC97 codec driver. They were made against the cvs
from today.
Issues:
Quote from VT1616 data sheet: "The VT1616 powers up with pins 39 and 41
assigned to the Front channel DACs as described in the 2.2 specification.
When this bit is to 0, the output pins get assigned to the Rear stereo
DAC pair with an independent volume control."
The reference design uses pins 39 and 41 for the left and right rear
outputs. I have added a control to set this bit to 0 but the default is 1.
Should a patch function be used to set the default to 0?
When using applications such as MPlayer and ac3dec, the centre/lfe and rear
outputs are swapped so that the data for the rear comes out of centre/lfe
and vice versa. Is there something I have missed here?
Todo:
Capture has not been tested
Add support for rates of 176.4 KHz and 192KHz
Add support for internal S/PDIF transmitter and MPU-401
Fix the Fifo error interrupt handling.
Possibly add support for Envy24HT specific options to the envy24control
program
[-- Attachment #2: envy24ht-001b.diff.gz --]
[-- Type: application/octet-stream, Size: 3461 bytes --]
[-- Attachment #3: envy24ht-001a.diff.gz --]
[-- Type: application/octet-stream, Size: 7713 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Envy24HT
2002-12-03 17:07 ` [PATCH] Envy24HT James Stafford
@ 2002-12-03 18:06 ` Jaroslav Kysela
2002-12-04 12:54 ` James Stafford
0 siblings, 1 reply; 8+ messages in thread
From: Jaroslav Kysela @ 2002-12-03 18:06 UTC (permalink / raw)
To: James Stafford; +Cc: alsa-devel@lists.sourceforge.net
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN, Size: 1894 bytes --]
On Tue, 3 Dec 2002, James Stafford wrote:
> Attached are two patches that add basic Envy24HT support to the ICE1712
> driver and VT1616 to the AC97 codec driver. They were made against the cvs
> from today.
>
> Issues:
> Quote from VT1616 data sheet: "The VT1616 powers up with pins 39 and 41
> assigned to the Front channel DACs as described in the 2.2 specification.
> When this bit is to 0, the output pins get assigned to the Rear stereo
> DAC pair with an independent volume control."
> The reference design uses pins 39 and 41 for the left and right rear
> outputs. I have added a control to set this bit to 0 but the default is 1.
> Should a patch function be used to set the default to 0?
I think that the default should be left in the AC97 code and write the
appropriate configuration after snd_ac97_mixer() call when you detect your
hardware and VT1616 codec.
> When using applications such as MPlayer and ac3dec, the centre/lfe and rear
> outputs are swapped so that the data for the rear comes out of centre/lfe
> and vice versa. Is there something I have missed here?
We send data in this order: channel0,1 = front; channel2,3 = rear;
channel4,5 = center/lfe ; if your hardware has swapped some stereo paths,
you need to swap channels in software - see
alsa-lib/src/conf/cards/ICH.conf - ICH.pcm.surround51.0 {} section
I've applied your patch and fixed one missing update in ice1712.h. Also,
the driver id is changed in CVS.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET
comprehensive development tool, built to increase your
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Envy24HT
2002-12-03 18:06 ` Jaroslav Kysela
@ 2002-12-04 12:54 ` James Stafford
0 siblings, 0 replies; 8+ messages in thread
From: James Stafford @ 2002-12-04 12:54 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel@lists.sourceforge.net
At 19:06 03/12/02 +0100, you wrote:
>I think that the default should be left in the AC97 code and write the
>appropriate configuration after snd_ac97_mixer() call when you detect your
>hardware and VT1616 codec.
I have added a build_controls function in the amp.c file which sets the
relavent ac97 register. Is this the correct way to do this?
>We send data in this order: channel0,1 = front; channel2,3 = rear;
>channel4,5 = center/lfe ; if your hardware has swapped some stereo paths,
>you need to swap channels in software - see
>alsa-lib/src/conf/cards/ICH.conf - ICH.pcm.surround51.0 {} section
Once I have a conf file, what do I do with it and how do I use it?
As a test, I added
pcm.ice1724 {
type plug
ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
slave.pcm {
type hw
card 0
device 0
}
}
to my ~/.asoundrc file.
The channels were then routed correctly when using the "ice1724" device.
-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET
comprehensive development tool, built to increase your
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Envy24HT
[not found] <m18JZ72-003yUIC@mail.corpex.com>
@ 2002-12-04 13:05 ` Jaroslav Kysela
2002-12-04 14:38 ` James Stafford
0 siblings, 1 reply; 8+ messages in thread
From: Jaroslav Kysela @ 2002-12-04 13:05 UTC (permalink / raw)
To: James Stafford; +Cc: alsa-devel@lists.sourceforge.net
On Wed, 4 Dec 2002, James Stafford wrote:
> At 19:06 03/12/02 +0100, you wrote:
>
> >I think that the default should be left in the AC97 code and write the
> >appropriate configuration after snd_ac97_mixer() call when you detect your
> >hardware and VT1616 codec.
>
> I have added a build_controls function in the amp.c file which sets the
> relavent ac97 register. Is this the correct way to do this?
The controls should be built in the ac97_codec.c, but the initial settings
of AC97 registers might be done in the amp.c file.
> >We send data in this order: channel0,1 = front; channel2,3 = rear;
> >channel4,5 = center/lfe ; if your hardware has swapped some stereo paths,
> >you need to swap channels in software - see
> >alsa-lib/src/conf/cards/ICH.conf - ICH.pcm.surround51.0 {} section
> Once I have a conf file, what do I do with it and how do I use it?
>
> As a test, I added
>
> pcm.ice1724 {
> type plug
> ttable.0.0 1
> ttable.1.1 1
> ttable.2.4 1
> ttable.3.5 1
> ttable.4.2 1
> ttable.5.3 1
> slave.pcm {
> type hw
> card 0
> device 0
> }
> }
>
> to my ~/.asoundrc file.
> The channels were then routed correctly when using the "ice1724" device.
If you follow the ICH.conf file (and/or ICE1712.conf) file, then you can
use 'surround51' device as ac3dec uses: 'aplay -D plug:surround51' .
The new name will be ICE1724.conf (I changed the driver ID for the new
chip). Unfortunately, at the time, we cannot distinguish more
hardware variations for given driver, but hopefully, it will change in the
future.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET
comprehensive development tool, built to increase your
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Envy24HT
2002-12-04 13:05 ` Jaroslav Kysela
@ 2002-12-04 14:38 ` James Stafford
2002-12-04 17:29 ` James Stafford
0 siblings, 1 reply; 8+ messages in thread
From: James Stafford @ 2002-12-04 14:38 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel@lists.sourceforge.net
At 14:05 04/12/02 +0100, Jaroslav Kysela wrote:
>> I have added a build_controls function in the amp.c file which sets the
>> relavent ac97 register. Is this the correct way to do this?
>
>The controls should be built in the ac97_codec.c, but the initial settings
>of AC97 registers might be done in the amp.c file.
All the controls are built in ac97_codec.c. I only write to one of the ac97
registers in the build_controls function from the snd_ice1712_card_info
structure because it was the only card specific function call after the
call to snd_ice1712_ac97_mixer. Would it be better to add a new function
pointer to the snd_ice1712_card_info structure for setting the initial
values of the chip specific ac97 registers (such as the rerouting of some
of the outputs) ?
I thought it was best not to write the ac97 register in ice1712.c since not
all Envy24HT cards use the VT1616.
>If you follow the ICH.conf file (and/or ICE1712.conf) file, then you can
>use 'surround51' device as ac3dec uses: 'aplay -D plug:surround51' .
>The new name will be ICE1724.conf (I changed the driver ID for the new
>chip). Unfortunately, at the time, we cannot distinguish more
>hardware variations for given driver, but hopefully, it will change in the
>future.
Ok, I understand you now.
--
James Stafford
mailto:jstafford@ampltd.com
Advanced Micro Peripherals Ltd
Unit 17
Sedgeway Business Park
Witchford
Cambridge
CB6 2HY
Tel: +44 1353 659 500
Fax:+44 1353 659 600
-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET
comprehensive development tool, built to increase your
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Envy24HT
2002-12-04 14:38 ` James Stafford
@ 2002-12-04 17:29 ` James Stafford
0 siblings, 0 replies; 8+ messages in thread
From: James Stafford @ 2002-12-04 17:29 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel@lists.sourceforge.net
Here are some more patches for Envy24HT support in the ICE1712 driver.
For now, I have left some of the debug code I accidentally left in the last
patch, since it is only added to the /proc output.
The name of the PCM streams for the ICE1724 is changed to "ICE1724 multi"
from "ICE1712 multi"
The ICE1724.conf file is added to alsa-lib/src/conf/cards to fix the
channel routing
Index: alsa-kernel/pci/ice1712/amp.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/amp.c,v
retrieving revision 1.1
diff -u -r1.1 amp.c
--- alsa-kernel/pci/ice1712/amp.c 3 Dec 2002 17:53:43 -0000 1.1
+++ alsa-kernel/pci/ice1712/amp.c 4 Dec 2002 15:04:05 -0000
@@ -42,6 +42,12 @@
return 0;
}
+static int __devinit snd_vt1724_amp_add_controls(ice1712_t *ice)
+{
+ /* we use pins 39 and 41 of the VT1616 for left and right read outputs */
+ snd_ac97_write_cache(ice->ac97, 0x5a, snd_ac97_read(ice->ac97, 0x5a) &
~0x8000);
+}
+
/* entry point */
struct snd_ice1712_card_info snd_vt1724_amp_cards[] __devinitdata = {
@@ -49,6 +55,7 @@
VT1724_SUBDEVICE_AUDIO2000,
"AMP Ltd AUDIO2000",
snd_vt1724_amp_init,
+ snd_vt1724_amp_add_controls,
},
{ } /* terminator */
};
Index: alsa-kernel/pci/ice1712/ice1712.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1712.c,v
retrieving revision 1.14
diff -u -r1.14 ice1712.c
--- alsa-kernel/pci/ice1712/ice1712.c 3 Dec 2002 21:15:29 -0000 1.14
+++ alsa-kernel/pci/ice1712/ice1712.c 4 Dec 2002 15:04:17 -0000
@@ -1405,7 +1405,11 @@
if (rpcm)
*rpcm = NULL;
- err = snd_pcm_new(ice->card, "ICE1712 multi", device, 1, 1, &pcm);
+ if (ice->vt1724)
+ err = snd_pcm_new(ice->card, "ICE1724 multi", device, 1, 1, &pcm);
+ else
+ err = snd_pcm_new(ice->card, "ICE1712 multi", device, 1, 1, &pcm);
+
if (err < 0)
return err;
@@ -1415,7 +1419,10 @@
pcm->private_data = ice;
pcm->private_free = snd_ice1712_pcm_profi_free;
pcm->info_flags = 0;
- strcpy(pcm->name, "ICE1712 multi");
+ if (ice->vt1724)
+ strcpy(pcm->name, "ICE1724 multi");
+ else
+ strcpy(pcm->name, "ICE1712 multi");
snd_pcm_lib_preallocate_pci_pages_for_all(ice->pci, pcm, 256*1024,
256*1024);
Index: alsa-lib/src/conf/cards/Makefile.am
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/conf/cards/Makefile.am,v
retrieving revision 1.9
diff -u -r1.9 Makefile.am
--- alsa-lib/src/conf/cards/Makefile.am 29 Nov 2002 14:50:03 -0000 1.9
+++ alsa-lib/src/conf/cards/Makefile.am 4 Dec 2002 15:04:19 -0000
@@ -10,6 +10,7 @@
FM801.conf \
GUS.conf \
ICE1712.conf \
+ ICE1724.conf \
ICH.conf \
RME9636.conf \
RME9652.conf \
diff -u -N -r cvs2/alsa-lib/src/conf/cards/ICE1724.conf
cvs-envy24ht/alsa-lib/src/conf/cards/ICE1724.conf
--- cvs2/alsa-lib/src/conf/cards/ICE1724.conf Thu Jan 1 01:00:00 1970
+++ cvs-envy24ht/alsa-lib/src/conf/cards/ICE1724.conf Wed Dec 4 15:34:26 2002
@@ -0,0 +1,100 @@
+#
+# Configuration for the ICE1724 (Envy24HT) chip
+#
+
+<confdir:pcm/front.conf>
+
+ICE1724.pcm.front.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type route
+ ttable.0.0 1
+ ttable.1.1 1
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+}
+
+<confdir:pcm/surround40.conf>
+
+ICE1724.pcm.surround40.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type route
+ ttable.0.0 1
+ ttable.1.1 1
+ ttable.2.4 1
+ ttable.3.5 1
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+}
+
+<confdir:pcm/surround51.conf>
+
+ICE1724.pcm.surround51.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type route
+ ttable.0.0 1
+ ttable.1.1 1
+ ttable.2.4 1
+ ttable.3.5 1
+ ttable.4.2 1
+ ttable.5.3 1
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+}
+
+<confdir:pcm/iec958.conf>
+
+ICE1724.pcm.iec958.0 {
+ @args [ CARD AES0 AES1 AES2 AES3 ]
+ @args.CARD {
+ type string
+ }
+ @args.AES0 {
+ type integer
+ }
+ @args.AES1 {
+ type integer
+ }
+ @args.AES2 {
+ type integer
+ }
+ @args.AES3 {
+ type integer
+ }
+ type hooks
+ slave.pcm {
+ type route
+ ttable.0.6 1
+ ttable.1.7 1
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ }
+ hooks.0 {
+ type ctl_elems
+ hook_args [
+ {
+ interface PCM
+ name "IEC958 Playback PCM Stream"
+ lock true
+ preserve true
+ value [ $AES0 $AES1 $AES2 $AES3 ]
+ }
+ ]
+ }
+}
--
James Stafford
mailto:jstafford@ampltd.com
Advanced Micro Peripherals Ltd
Unit 17
Sedgeway Business Park
Witchford
Cambridge
CB6 2HY
Tel: +44 1353 659 500
Fax:+44 1353 659 600
-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET
comprehensive development tool, built to increase your
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Envy24HT
@ 2003-01-27 13:31 James Stafford
2003-01-27 14:02 ` Takashi Iwai
0 siblings, 1 reply; 8+ messages in thread
From: James Stafford @ 2003-01-27 13:31 UTC (permalink / raw)
To: alsa-devel@lists.sourceforge.net
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
One of the attached patches correct a problem with the surround speakers
with the AUDIO2000 Envy24HT based board. The other patch adds the
ICE1724.conf file to the alsa-lib/src/conf/cards directory.
[-- Attachment #2: patch-envy24ht-surroundfix.diff --]
[-- Type: application/octet-stream, Size: 646 bytes --]
--- alsa-kernel/pci/ice1712/amp.c 3 Dec 2002 17:53:43 -0000 1.1
+++ alsa-kernel/pci/ice1712/amp.c 4 Dec 2002 15:04:05 -0000
@@ -42,6 +42,12 @@
return 0;
}
+static int __devinit snd_vt1724_amp_add_controls(ice1712_t *ice)
+{
+ /* we use pins 39 and 41 of the VT1616 for left and right read outputs */
+ snd_ac97_write_cache(ice->ac97, 0x5a, snd_ac97_read(ice->ac97, 0x5a) & ~0x8000);
+}
+
/* entry point */
struct snd_ice1712_card_info snd_vt1724_amp_cards[] __devinitdata = {
@@ -49,6 +55,7 @@
VT1724_SUBDEVICE_AUDIO2000,
"AMP Ltd AUDIO2000",
snd_vt1724_amp_init,
+ snd_vt1724_amp_add_controls,
},
{ } /* terminator */
};
[-- Attachment #3: patch-envy24ht-addconf.diff --]
[-- Type: application/octet-stream, Size: 1875 bytes --]
--- alsa-lib/src/conf/cards/Makefile.am 29 Nov 2002 14:50:03 -0000 1.9
+++ alsa-lib/src/conf/cards/Makefile.am 4 Dec 2002 15:04:19 -0000
@@ -10,6 +10,7 @@
FM801.conf \
GUS.conf \
ICE1712.conf \
+ ICE1724.conf \
ICH.conf \
RME9636.conf \
RME9652.conf \
diff -u -N -r cvs2/alsa-lib/src/conf/cards/ICE1724.conf
cvs-envy24ht/alsa-lib/src/conf/cards/ICE1724.conf
--- cvs2/alsa-lib/src/conf/cards/ICE1724.conf Thu Jan 1 01:00:00 1970
+++ cvs-envy24ht/alsa-lib/src/conf/cards/ICE1724.conf Wed Dec 4 15:34:26 2002
@@ -0,0 +1,100 @@
+#
+# Configuration for the ICE1724 (Envy24HT) chip
+#
+
+<confdir:pcm/front.conf>
+
+ICE1724.pcm.front.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type route
+ ttable.0.0 1
+ ttable.1.1 1
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+}
+
+<confdir:pcm/surround40.conf>
+
+ICE1724.pcm.surround40.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type route
+ ttable.0.0 1
+ ttable.1.1 1
+ ttable.2.4 1
+ ttable.3.5 1
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+}
+
+<confdir:pcm/surround51.conf>
+
+ICE1724.pcm.surround51.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type route
+ ttable.0.0 1
+ ttable.1.1 1
+ ttable.2.4 1
+ ttable.3.5 1
+ ttable.4.2 1
+ ttable.5.3 1
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+}
+
+<confdir:pcm/iec958.conf>
+
+ICE1724.pcm.iec958.0 {
+ @args [ CARD AES0 AES1 AES2 AES3 ]
+ @args.CARD {
+ type string
+ }
+ @args.AES0 {
+ type integer
+ }
+ @args.AES1 {
+ type integer
+ }
+ @args.AES2 {
+ type integer
+ }
+ @args.AES3 {
+ type integer
+ }
+ type hooks
+ slave.pcm {
+ type route
+ ttable.0.6 1
+ ttable.1.7 1
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ }
+ hooks.0 {
+ type ctl_elems
+ hook_args [
+ {
+ interface PCM
+ name "IEC958 Playback PCM Stream"
+ lock true
+ preserve true
+ value [ $AES0 $AES1 $AES2 $AES3 ]
+ }
+ ]
+ }
+}
[-- Attachment #4: Type: text/plain, Size: 183 bytes --]
--
James Stafford
mailto:jstafford@ampltd.com
Advanced Micro Peripherals Ltd
Unit 17
Sedgeway Business Park
Witchford
Cambridge
CB6 2HY
Tel: +44 1353 659 500
Fax:+44 1353 659 600
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Envy24HT
2003-01-27 13:31 [PATCH] Envy24HT James Stafford
@ 2003-01-27 14:02 ` Takashi Iwai
0 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2003-01-27 14:02 UTC (permalink / raw)
To: James Stafford; +Cc: alsa-devel@lists.sourceforge.net
Hi,
At Mon, 27 Jan 2003 13:31:38 +0000,
James Stafford wrote:
>
> One of the attached patches correct a problem with the surround speakers
> with the AUDIO2000 Envy24HT based board. The other patch adds the
> ICE1724.conf file to the alsa-lib/src/conf/cards directory.
thanks, applied to cvs now.
Takashi
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-01-27 14:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-27 13:31 [PATCH] Envy24HT James Stafford
2003-01-27 14:02 ` Takashi Iwai
[not found] <m18JZ72-003yUIC@mail.corpex.com>
2002-12-04 13:05 ` Jaroslav Kysela
2002-12-04 14:38 ` James Stafford
2002-12-04 17:29 ` James Stafford
-- strict thread matches above, loose matches on Subject: below --
2002-11-25 12:06 Envy24HT Jaroslav Kysela
2002-11-24 20:32 ` Envy24HT James Stafford
2002-11-27 21:47 ` Envy24HT James Stafford
2002-12-03 17:07 ` [PATCH] Envy24HT James Stafford
2002-12-03 18:06 ` Jaroslav Kysela
2002-12-04 12:54 ` James Stafford
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.