Skip to contentSkip to conversation

Maya44 revised patch

PATCH Rainer Zimmermann 3 participants 8 messages Feb 13, 2008 – Feb 19, 2008 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

This is the revised version of the ESI Maya44 patch.
changes are mainly coding style, some cleanups and using a patch file for ice1724.c .

The added code now (mostly) passes checkpatch.pl, except for some "#if 0"'s which I'd leave in for the development phase.

Also, I changed the rate setting logic, which (for now) allows all rates up to 192kHz even for capturing. As capturing actually only supports 96 kHz, while capturing & playback rates are linked, this is not really ok. I'd appreciate suggestions about how this could be handled properly, while still supporting playback up to 192 kHz...

Again, feedback & testing is appreciated.

For more information, see doc/README.maya44 .

-Rainer

Signature · 2 lines
Lightshed IT Services
Löfflerstr. 27, 22765 Hamburg, Germany * [email protected] * www.lightshed.de
alsa-kernel new file +1 -0
diff -r 5715d75f833f alsa-kernel
@@ -0,0 +1,1 @@
+../alsa-kernel
\ No newline at end of file
doc/README.maya44 new file +158 -0

158 lines not on this page · raw message

i2c/other/Makefile +6 -1
diff -r 5715d75f833f i2c/other/Makefile
@@ -5,7 +5,12 @@ include $(SND_TOPDIR)/toplevel.config
 include $(SND_TOPDIR)/toplevel.config
 include $(SND_TOPDIR)/Makefile.conf
 
-export-objs += ak4xxx-adda.o ak4114.o ak4117.o pt2258.o
+export-objs += ak4xxx-adda.o ak4114.o ak4117.o pt2258.o wm8776.o
+
+snd-wm8776-objs := wm8776.o
+
+# Module Dependency
+obj-$(CONFIG_SND_ICE1724) += snd-wm8776.o
 
 # Toplevel Module Dependency
 # hack for tea575x support
i2c/other/wm8776.c new file +406 -0

406 lines not on this page · raw message

include/sound new file +1 -0
diff -r 5715d75f833f include/sound
@@ -0,0 +1,1 @@
+../alsa-kernel/include
\ No newline at end of file
include/wm8776.h new file +149 -0

149 lines not on this page · raw message

pci/Makefile +1 -1
diff -r 5715d75f833f pci/Makefile
@@ -12,7 +12,7 @@ clean-files := ad1889.c atiixp.c atiixp_
 clean-files := ad1889.c atiixp.c atiixp_modem.c bt87x.c cmipci.c ens1370.c \
 	fm801.c intel8x0.c maestro3.c via82xx.c via82xx_modem.c
 
-obj-$(CONFIG_SND) += pdplus/ asihpi/
+obj-$(CONFIG_SND) += pdplus/ asihpi/ ice1712/
 
 #
 #
pci/ice1712/Makefile +6 -0
diff -r 5715d75f833f pci/ice1712/Makefile
@@ -5,8 +5,14 @@ include $(SND_TOPDIR)/toplevel.config
 include $(SND_TOPDIR)/toplevel.config
 include $(SND_TOPDIR)/Makefile.conf
 
+clean-files := ice1724.c ice1712.h
 export-objs = ak4xxx.o
 
 include $(SND_TOPDIR)/alsa-kernel/pci/ice1712/Makefile
 
+snd-ice1724-objs += maya44.o
+
 include $(SND_TOPDIR)/Rules.make
+
+ice1724.c: ice1724.patch $(SND_TOPDIR)/alsa-kernel/pci/ice1712/ice1724.c
+ice1712.h: ice1712.h.patch $(SND_TOPDIR)/alsa-kernel/pci/ice1712/ice1712.h
pci/ice1712/amp.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/amp.h
@@ -0,0 +1,1 @@
+#include "../../alsa-kernel/pci/ice1712/amp.h"
pci/ice1712/aureon.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/aureon.h
@@ -0,0 +1,1 @@
+#include "../../alsa-kernel/pci/ice1712/aureon.h"
pci/ice1712/envy24ht.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/envy24ht.h
@@ -0,0 +1,1 @@
+#include "../../alsa-kernel/pci/ice1712/envy24ht.h"
pci/ice1712/ice1712.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/ice1712.h
@@ -0,0 +1,1 @@
+#include "../../alsa-kernel/pci/ice1712/ice1712.h"
pci/ice1712/ice1712.h.patch new file +10 -0
diff -r 5715d75f833f pci/ice1712/ice1712.h.patch
@@ -0,0 +1,10 @@
+--- ../../alsa-kernel/pci/ice1712/ice1712.h	2008-02-01 17:52:14.000000000 +0100
++++ ice1712.h	2008-02-08 13:32:03.000000000 +0100
+@@ -340,6 +340,7 @@
+ 	struct mutex open_mutex;
+ 	struct snd_pcm_substream *pcm_reserved[4];
+ 	struct snd_pcm_hw_constraint_list *hw_rates; /* card-specific rate constraints */
++	struct snd_pcm_hw_constraint_list *hw_rates_adc; /* card-specific rate constraints for ADC */
+ 
+ 	unsigned int akm_codecs;
+ 	struct snd_akm4xxx *akm;
pci/ice1712/ice1724.c +2579 -1

2,234 lines not on this page · raw message

pci/ice1712/ice1724.patch new file +470 -0

470 lines not on this page · raw message

pci/ice1712/juli.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/juli.h

Lines of this file are not shown. View the raw message.

pci/ice1712/maya44.c new file +691 -0

691 lines not on this page · raw message

pci/ice1712/maya44.h new file +10 -0
diff -r 5715d75f833f pci/ice1712/maya44.h

Lines of this file are not shown. View the raw message.

pci/ice1712/phase.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/phase.h

Lines of this file are not shown. View the raw message.

pci/ice1712/pontis.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/pontis.h

Lines of this file are not shown. View the raw message.

pci/ice1712/prodigy192.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/prodigy192.h

Lines of this file are not shown. View the raw message.

pci/ice1712/prodigy_hifi.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/prodigy_hifi.h

Lines of this file are not shown. View the raw message.

pci/ice1712/revo.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/revo.h

Lines of this file are not shown. View the raw message.

pci/ice1712/se.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/se.h

Lines of this file are not shown. View the raw message.

pci/ice1712/vt1720_mobo.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/vt1720_mobo.h

Lines of this file are not shown. View the raw message.

pci/ice1712/wtm.h new file +1 -0
diff -r 5715d75f833f pci/ice1712/wtm.h

Lines of this file are not shown. View the raw message.

scripts new file +1 -0
diff -r 5715d75f833f scripts

Lines of this file are not shown. View the raw message.

sound new file +1 -0
diff -r 5715d75f833f sound

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Part of the diff is not shown here. View the raw message.

#1 lore raw

Re: Maya44 revised patch - vu meters

Hi,

The vu-meters in alsamixer are not changing, because alsamixer does not
refresh regularly their values. They reflect status of ice1724
vu-meters at the moment of alsamixer start.

I have already raised the issue and I got a fair answer - alsamixer is a console mixer and should thus consume as little network bandwidth as possible.

Since the meaning of these read-only controls is clear only upon detailed study of the driver and Envy24 datasheet plus I encounter a lot of questins/complaints about them, I suggest to change their type from MIXER to PCM. They would still be readily accessible from amixer or API.

Here is my little vu-meter script I use for testing ice1724 cards:

while true; do amixer cget name="Multi Track Peak" | grep ": values"; sleep 0.5; done

Thanks for considering this minor change which would simplify life of a lot of users/admins.

Regards,

Pavel Hofman.

Quoted 31 lines · Rainer Zimmermann

This is the revised version of the ESI Maya44 patch. changes are mainly coding style, some cleanups and using a patch file for ice1724.c .

The added code now (mostly) passes checkpatch.pl, except for some "#if 0"'s which I'd leave in for the development phase.

Also, I changed the rate setting logic, which (for now) allows all rates up to 192kHz even for capturing. As capturing actually only supports 96 kHz, while capturing & playback rates are linked, this is not really ok. I'd appreciate suggestions about how this could be handled properly, while still supporting playback up to 192 kHz...

Again, feedback & testing is appreciated.

For more information, see doc/README.maya44 .

-Rainer

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

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 16 lines
-----------------

inSITE, s.r.o.

Rubesova 29, 326 00 Plzen
Tel., fax: +420 - 37 - 74 493 58
GSM: +420 - 603 - 163 973
Email: [email protected]

www.educity.cz, www.insite.cz
www.meetings.cz, www.hrzive.cz
www.comben.cz, www.hr-online.cz
-------------------------------
Navstivte www.educity.cz, server
s nejvetsi nabidkou profesniho
vzdelavani na ceskem internetu.
#2 lore raw
In reply to Rainer Zimmermann

At Thu, 14 Feb 2008 00:36:07 +0100,

Quoted 6 lines · Rainer Zimmermann

This is the revised version of the ESI Maya44 patch.
changes are mainly coding style, some cleanups and using a patch file for ice1724.c .

Quoted 8 lines

The added code now (mostly) passes checkpatch.pl, except for some "#if 0"'s which I'd leave in for the development phase.

Also, I changed the rate setting logic, which (for now) allows all rates up to 192kHz even for capturing. As capturing actually only supports 96 kHz, while capturing & playback rates are linked, this is not really ok. I'd appreciate suggestions about how this could be handled properly, while still supporting playback up to 192 kHz...

Does the 96kHz constraint come from ice172x chip or the codec chip? (I have to recheck the datasheet...)

Anyway, we can limit this in a scenario like below:
- disallow the rate over 96kHz if the capture stream is being opened
- if the rate is set above 96kHz, the capture stream cannot be opened, returns -EBUSY or so.

BTW, is it supposed to be still highly experimental? If the driver works more or less stably with your device (and on the recent kernel), it'd be also good to put this to the upstream, i.e. in alsa-kernel tree instead of alsa-driver tree.

Takashi

#3 lore raw

Hi,

The constraint comes from the codec, the chip itself can handle 192kHz, e.g. the 192kHz SPDIF input works fine. Actually more of the ice1724 cards have this limit. If this issue is solved in a general way, it could be implemented to other cards with 192kHz DACs/96kHz ADCs too.

Pavel

Quoted 35 lines · Takashi Iwai

At Thu, 14 Feb 2008 00:36:07 +0100,

Quoted 5 lines · Rainer Zimmermann

This is the revised version of the ESI Maya44 patch.
changes are mainly coding style, some cleanups and using a patch file for ice1724.c .

Quoted 8 lines

The added code now (mostly) passes checkpatch.pl, except for some "#if 0"'s which I'd leave in for the development phase.

Also, I changed the rate setting logic, which (for now) allows all rates up to 192kHz even for capturing. As capturing actually only supports 96 kHz, while capturing & playback rates are linked, this is not really ok. I'd appreciate suggestions about how this could be handled properly, while still supporting playback up to 192 kHz...

Does the 96kHz constraint come from ice172x chip or the codec chip? (I have to recheck the datasheet...)

Anyway, we can limit this in a scenario like below:
- disallow the rate over 96kHz if the capture stream is being opened
- if the rate is set above 96kHz, the capture stream cannot be opened, returns -EBUSY or so.

BTW, is it supposed to be still highly experimental? If the driver works more or less stably with your device (and on the recent kernel), it'd be also good to put this to the upstream, i.e. in alsa-kernel tree instead of alsa-driver tree.

Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 16 lines
-----------------

inSITE, s.r.o.

Rubesova 29, 326 00 Plzen
Tel., fax: +420 - 37 - 74 493 58
GSM: +420 - 603 - 163 973
Email: [email protected]

www.educity.cz, www.insite.cz
www.meetings.cz, www.hrzive.cz
www.comben.cz, www.hr-online.cz
-------------------------------
Navstivte www.educity.cz, server
s nejvetsi nabidkou profesniho
vzdelavani na ceskem internetu.
#4 lore raw

At Thu, 14 Feb 2008 13:29:00 +0100,

Quoted 7 lines · Pavel Hofman

Hi,

The constraint comes from the codec, the chip itself can handle 192kHz, e.g. the 192kHz SPDIF input works fine. Actually more of the ice1724 cards have this limit. If this issue is solved in a general way, it could be implemented to other cards with 192kHz DACs/96kHz ADCs too.

Thanks for a quick information. Then, yes, we should fix this issue in general. The separate lists of rates for playback and capture would be required in the end...

Takashi

Quoted 57 lines

Pavel

Quoted 35 lines · Takashi Iwai

At Thu, 14 Feb 2008 00:36:07 +0100,

Quoted 5 lines · Rainer Zimmermann

This is the revised version of the ESI Maya44 patch.
changes are mainly coding style, some cleanups and using a patch file for ice1724.c .

Quoted 8 lines

The added code now (mostly) passes checkpatch.pl, except for some "#if 0"'s which I'd leave in for the development phase.

Also, I changed the rate setting logic, which (for now) allows all rates up to 192kHz even for capturing. As capturing actually only supports 96 kHz, while capturing & playback rates are linked, this is not really ok. I'd appreciate suggestions about how this could be handled properly, while still supporting playback up to 192 kHz...

Does the 96kHz constraint come from ice172x chip or the codec chip? (I have to recheck the datasheet...)

Anyway, we can limit this in a scenario like below:
- disallow the rate over 96kHz if the capture stream is being opened
- if the rate is set above 96kHz, the capture stream cannot be opened, returns -EBUSY or so.

BTW, is it supposed to be still highly experimental? If the driver works more or less stably with your device (and on the recent kernel), it'd be also good to put this to the upstream, i.e. in alsa-kernel tree instead of alsa-driver tree.

Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 16 lines
-----------------

inSITE, s.r.o.

Rubesova 29, 326 00 Plzen
Tel., fax: +420 - 37 - 74 493 58
GSM: +420 - 603 - 163 973
Email: [email protected]

www.educity.cz, www.insite.cz
www.meetings.cz, www.hrzive.cz
www.comben.cz, www.hr-online.cz
-------------------------------
Navstivte www.educity.cz, server
s nejvetsi nabidkou profesniho
vzdelavani na ceskem internetu.
#5 lore raw

Hi Takashi and Pavel,

Quoted 9 lines · Takashi Iwai
Quoted 4 lines

The constraint comes from the codec, the chip itself can handle 192kHz, e.g. the 192kHz SPDIF input works fine. Actually more of the ice1724 cards have this limit. If this issue is solved in a general way, it could be implemented to other cards with 192kHz DACs/96kHz ADCs too.

Thanks for a quick information. Then, yes, we should fix this issue in general. The separate lists of rates for playback and capture would be required in the end...

ok. Actually, as Pavel mentioned SPDIF, I guess there should be a third set of rates for SPDIF, to be used when the appropriate channel is switched to SPDIF.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Anyway, we can limit this in a scenario like below: - disallow the rate over 96kHz if the capture stream is being opened - if the rate is set above 96kHz, the capture stream cannot be opened, returns -EBUSY or so.

Yes, I was thinking of something along those lines. But 2 possible issues:

- maybe a stupid question, but couldn't there be some "backdoor"? E.g., could a playback stream change its rate to above 96kHz while a capture stream is open?

- In the latter case, I think it should read: "if a playback stream is running at above 96kHz, the capture stream cannot be opened". Otherwise, e.g. arecord couldn't open the device if another app left the rate at 192kHz.

Are there other examples (non-ice17xx) how this is handled?

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

BTW, is it supposed to be still highly experimental? If the driver works more or less stably with your device (and on the recent kernel), it'd be also good to put this to the upstream, i.e. in alsa-kernel tree instead of alsa-driver tree.

Yes, so far the driver is stable on my system (2.6.22) and on Piotr's, but I would still consider it experimental. It still contains experimental code and some experimental controls, and I guess there should be more testing, in particular the MI/ODI/O and SPDIF part is still untested.
Well, your decision...

As for the vu-meters:

Quoted 4 lines

Since the meaning of these read-only controls is clear only upon detailed study of the driver and Envy24 datasheet plus I encounter a lot of questins/complaints about them, I suggest to change their type from MIXER to PCM. They would still be readily accessible from amixer or API.

No objection from my part, but could it break any app software? any other comments?

-Rainer

Signature · 2 lines
Lightshed IT Services
Löfflerstr. 27, 22765 Hamburg, Germany * [email protected] * www.lightshed.de
#6 lore raw

Rainer Zimmermann napsal(a):

.........

Quoted 5 lines

Yes, so far the driver is stable on my system (2.6.22) and on Piotr's, but I would still consider it experimental. It still contains experimental code and some experimental controls, and I guess there should be more testing, in particular the MI/ODI/O and SPDIF part is still untested.
Well, your decision...

The Juli@ support I am working on requires some major changes to ice1724.c in the rate-setting code, to make it custumizable for individual cards. Since I do not want to resolve the conflicts the commit would inflict to my to-be-coded version, please let me know your next plans with ice1724.c. I would start after the commit.

Thanks a lot,

Pavel.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

At Thu, 14 Feb 2008 17:59:05 +0100,

Quoted 12 lines · Rainer Zimmermann

Hi Takashi and Pavel,

Quoted 5 lines · Takashi Iwai
Quoted 4 lines

The constraint comes from the codec, the chip itself can handle 192kHz, e.g. the 192kHz SPDIF input works fine. Actually more of the ice1724 cards have this limit. If this issue is solved in a general way, it could be implemented to other cards with 192kHz DACs/96kHz ADCs too.

Quoted 7 lines
Quoted 4 lines

Thanks for a quick information. Then, yes, we should fix this issue in general. The separate lists of rates for playback and capture would be required in the end...

ok. Actually, as Pavel mentioned SPDIF, I guess there should be a third set of rates for SPDIF, to be used when the appropriate channel is switched to SPDIF.

That's a good point.

Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Anyway, we can limit this in a scenario like below: - disallow the rate over 96kHz if the capture stream is being opened - if the rate is set above 96kHz, the capture stream cannot be opened, returns -EBUSY or so.

Quoted 8 lines

Yes, I was thinking of something along those lines. But 2 possible issues:

- maybe a stupid question, but couldn't there be some "backdoor"? E.g., could a playback stream change its rate to above 96kHz while a capture stream is open?

- In the latter case, I think it should read: "if a playback stream is running at above 96kHz, the capture stream cannot be opened". Otherwise, e.g. arecord couldn't open the device if another app left the rate at 192kHz.

Yes, the defnial of opening a capture stream over 96kHz is a drawback in this method.

Quoted 1 line

Are there other examples (non-ice17xx) how this is handled?

Either setting a fixed rate via a control or disallow-streams-that- don't-support way.

Quoted 10 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

BTW, is it supposed to be still highly experimental? If the driver works more or less stably with your device (and on the recent kernel), it'd be also good to put this to the upstream, i.e. in alsa-kernel tree instead of alsa-driver tree.

Yes, so far the driver is stable on my system (2.6.22) and on Piotr's, but I would still consider it experimental. It still contains experimental code and some experimental controls, and I guess there should be more testing, in particular the MI/ODI/O and SPDIF part is still untested.
Well, your decision...

It's rather your decision at this stage since I have no hardware for testing. I'd just like to mention that merging to the upstream gives more users a chance to try.

Quoted 8 lines

As for the vu-meters:

Quoted 4 lines

Since the meaning of these read-only controls is clear only upon detailed study of the driver and Envy24 datasheet plus I encounter a lot of questins/complaints about them, I suggest to change their type from MIXER to PCM. They would still be readily accessible from amixer or API.

No objection from my part, but could it break any app software? any other comments?

Well, I think it's fine at this moment since we have (still) no envy24control for vt172x. Actually, some other controls are also candidates to hide from the mixer interface. We need a more detailed review in this regard.

Takashi