New alsa lowlevel driver for the SE-200PCI and SE-90PCI
HI. I mail from Japan.
I wrote a driver for the SE-200PCI and SE-90PCI what are salling in Japan. And I want to merge it to current source tree.
How should I do?
Thanks.
[email protected] wrote
Quoted 4 lines
I wrote a driver for the SE-200PCI and SE-90PCI what are salling in Japan.
And I want to merge it to current source tree.
How should I do?
Post the patch here. The developers will then suggest enhancements and/or apply it. (Well, they will when they come back from vacation.)
Regards,
Clemens
At Tue, 02 Oct 2007 20:17:52 +0200,
Quoted 9 lines · Clemens Ladisch
[email protected] wrote
Quoted 4 lines
I wrote a driver for the SE-200PCI and SE-90PCI what are salling in Japan.
And I want to merge it to current source tree.
How should I do?Post the patch here. The developers will then suggest enhancements and/or apply it. (Well, they will when they come back from vacation.)
At least, one developer is available now :)
So, don't hesitate to post a patch (or mail it directly if you prefer, before publishing it).
thanks,
Takashi
It tries by way of experiment by this method though how to put up Res is not understood.
I put the patch on my HP
http://www.d4.dion.ne.jp/~sh_okada/misc/alsa-SE200PCI.patch.tgz
Please take it here.
thanks, Okada
At Tue, 09 Oct 2007 20:57:58 +0900,
Quoted 3 lines · [email protected] wrote:
It tries by way of experiment by this method though how to put up Res is not understood.
You can simply paste the patch in a mail.
Some MUA cannot pass the text as is, and it would break the embedded patch. In such a case, use an attachment.
Quoted 3 lines
I put the patch on my HP
http://www.d4.dion.ne.jp/~sh_okada/misc/alsa-SE200PCI.patch.tgz
Please take it here.
Thanks, I took a look at it. The code itself seems almost OK.
But, before merging, please fix the coding style to follow the standard style. Read $LINUX_KERNEL/Documentation/CodingStyle file first. This describes many details.
In doubt, run scripts/checkpatch.pl script included in the recent linux kernel tree. It's a really picky guy, so you don't have to obey every detail :)
Second, the mixer control names should follow standard names (somehow). For example, in your code,
{"Front(green) Playback Volume" ,WM8776output ,VOLUME1,0,NULL}
,{"Surround(orange) Playback Volume" ,WM8766 ,VOLUME1,1,NULL}
,{"SurroundBack(white) Playback Volume" ,WM8766 ,VOLUME1,2,NULL}
,{"CenterAndSW(black) Playback Volume" ,WM8766 ,VOLUME1,0,NULL}
we have standard names: Front Playback Volume, Surround Playback Volume, Side Playback Volume, CLFE Playback Volume. If Center and LFE can be split, it'd be much better to have two mono controls, Center Playback Volume and LFE Playback Volume.
thanks,
Takashi
Quoted 3 lines
You can simply paste the patch in a mail.
Some MUA cannot pass the text as is, and it would break the embedded patch. In such a case, use an attachment.
Sorry, my MUA lost the CC field,
so the mail was not sent to the alsa-devel ML.
Quoted 1 line
Thanks, I took a look at it. The code itself seems almost OK.
Thank you for the check.
Quoted 6 lines
But, before merging, please fix the coding style to follow the standard style. Read $LINUX_KERNEL/Documentation/CodingStyle file first. This describes many details.
In doubt, runscripts/checkpatch.plscript included in the recent linux kernel tree. It's a really picky guy, so you don't have to obey every detail :)
I want to rewrite, and to send it later.
Quoted 11 lines
Second, the mixer control names should follow standard names (somehow). For example, in your code,
{"Front(green) Playback Volume" ,WM8776output ,VOLUME1,0,NULL}
,{"Surround(orange) Playback Volume" ,WM8766 ,VOLUME1,1,NULL}
,{"SurroundBack(white) Playback Volume" ,WM8766 ,VOLUME1,2,NULL
}
,{"CenterAndSW(black) Playback Volume" ,WM8766 ,VOLUME1,0,NULL}
we have standard names: Front Playback Volume, Surround Playback Volume, Side Playback Volume, CLFE Playback Volume. If Center and LFE can be split, it'd be much better to have two mono controls, Center Playback Volume and LFE Playback Volume.
And I want to rewrite as this.
But in Japan, How to call is different.
the speaker put the side of the seat position say SurroundSpeaker and the speaker put the back say BackSpeaker.
When comparing it
Side <-> SurroundSpeaker
Surround <-> BackSpeaker
The twist phenomenon has occurred.
What shall we do?
Though it is a proposal,
How about saying that the comment area will be added to the control name? Like "Surround(orange) Playback Volume",
and When it is necessary to match the pattern,
the area of parentheses is deleted.
Boolnew_check_same( char *req,char *src )
{
char buff_req[BUFSIZ];
char buff_src[BUFSIZ];
strip_comment( buff_req,req ); strip_comment( buff_src,src ); return( check_same(buff_req,buff_src) ); }
Though it is a peculiar problem to this, SE-200PCI not has a notation of the terminal, and the connection destination is shown only by the color. It is not easy to understand.
So I want to write
"Side(orange,Surround) Playback Volume",
"Surround(white,SurrondBack) Playback Volume",
Thanks
At Wed, 10 Oct 2007 21:49:37 +0900,
Quoted 13 lines · [email protected] wrote:
Quoted 12 lines
Second, the mixer control names should follow standard names (somehow). For example, in your code,
{"Front(green) Playback Volume" ,WM8776output ,VOLUME1,0,NULL}
,{"Surround(orange) Playback Volume" ,WM8766 ,VOLUME1,1,NULL}
,{"SurroundBack(white) Playback Volume" ,WM8766 ,VOLUME1,2,NULL
}
,{"CenterAndSW(black) Playback Volume" ,WM8766 ,VOLUME1,0,NULL}
we have standard names: Front Playback Volume, Surround Playback Volume, Side Playback Volume, CLFE Playback Volume. If Center and LFE can be split, it'd be much better to have two mono controls, Center Playback Volume and LFE Playback Volume.
Quoted 8 lines
And I want to rewrite as this.
But in Japan, How to call is different.
the speaker put the side of the seat position say SurroundSpeaker and the speaker put the back say BackSpeaker.
When comparing it
Side <-> SurroundSpeaker
Surround <-> BackSpeaker
The definition of "Surround" in ALSA mixer is the primary surround channels, and it usually corresponds to Surround Rear (Back). Thus your mapping above looks correct.
Quoted 8 lines
The twist phenomenon has occurred.
What shall we do?Though it is a proposal,
How about saying that the comment area will be added to the control name? Like "Surround(orange) Playback Volume",
and When it is necessary to match the pattern,
the area of parentheses is deleted.
This simply breaks the existing rule, and present mixer apps won't be able to parse the name as is. The mixer name string is used not for an ID but as a component role. If we inevitablly need a new attribute such as jack colors, let's use TLV information, for example.
IMO, this is a pure option. The life goes well without such information. So, let's implement the code in the usual style, then add extra information to give improvements.
Thanks,
Takashi
A new code was put on my HP.
http://www.d4.dion.ne.jp/~sh_okada/misc/alsa-SE200PCI.patch-2.tgz
The change is as follows.
1 The coding style
2 The name of the control
Thanks.
At Wed, 10 Oct 2007 23:57:16 +0900,
Quoted 3 lines · [email protected] wrote:
A new code was put on my HP.
http://www.d4.dion.ne.jp/~sh_okada/misc/alsa-SE200PCI.patch-2.tgz
Thanks!
Quoted 2 lines
The change is as follows.
1 The coding style
Well, the current code still doesn't follow properly. Below are some nitpickings.
Quoted 2 lines
static void se200pci_WM8766_write(struct
snd_ice1712*ice,
unsigned int addr,unsigned int data)
You need a space after comma (,)
Quoted 1 line
st = (((addr&0x7f)<<9)|(data&0x1ff));
Ditto for each operator.
Quoted 1 line
for (i=0 ; i<16 ; i++) {Spaces around '=' and '<', no space before ';'
Quoted 1 line
if (st & 0x10000) bits |= DATA; else bits &= ~DATA;
Break lines for each statement, namely
Quoted 4 lines
if (st & 0x10000) bits |= DATA; else bits &= ~DATA;
And,
Quoted 5 lines
if (ch == 0) {
se200pci_WM8766_write(ice, 0x000, vol1);
se200pci_WM8766_write(ice, 0x001, vol2|0x100);
}
else if (ch == 1) {Put 'else if...' with the same line as the close brace,
Quoted 1 line
} else if (ch == 1) {But in this case, it's better to use switch, or a value integer array. Ditto for se200pci_WM8776_set_input_selector().
Quoted 3 lines
if (rate > 96000) se200pci_WM8766_write(ice, 0x0a, 0x000); /* MCLK=128fs */ else se200pci_WM8766_write(ice, 0x0a, 0x080); /* MCLK=256fs */
Break the line of 'else'.
Quoted 6 lines
struct {
char *name;
enum { WM8766,
WM8776in,
WM8776out,
WM8776sel,Quoted 8 lines
WM8776agc,
WM8776afl
} target;
enum { VOLUME1,VOLUME2,BOOLEAN,ENUM } type;
int ch;
char **member;
char *comment;
} se200pci_cont[]={Missing static here. Also the above definition still doesn't follow the coding style well. The enum should be defined outside the struct as its scope is always global in C (unlike C++).
Quoted 1 line
{"Front Playback Volume", WM8776out,VOLUME1,0,NULL,"Front(green)"},
Use C99 initialization style, such as
Quoted 7 lines
{
.name = "Front Playback Volume",
.target = WM8776out,
.type = VOLUME1,
.ch = 0,
.comment = "Front(green)"
}Note that 0 and NULL can be omitted in initializations if you want (as I did for member in the above example).
se200pci_cont_info() should use switch instead of if..else.
Quoted 3 lines
for (c=0 ; c<100 ; c++) {
if (member[c] == NULL) break;
}First, coding style error, and second, a magic number 100 appears here suddenly.
In se200pci_WM8766_write(),
Quoted 4 lines
unsigned int DATA = 0x010000; unsigned int CLOCK = 0x020000; unsigned int LOAD = 0x040000; unsigned int ALL_MASK = (DATA|CLOCK|LOAD);
Apparently they should be defined as const (or use define).
You don't need braces around a single-line if, for example,
Quoted 6 lines
if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE90PCI) {
/* nothing to do */
}
else if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) {
se200pci_add_controls(ice);
}should be
Quoted 4 lines
if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE90PCI) /* nothing to do */ else if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) se200pci_add_controls(ice);
Well, let's stop here.
Quoted 1 line
2 The name of the control
Now looks better. One remaining thing is you're using an enum control for "ACG Capture Switch". If it's a switch, you should use a boolean type.
thanks,
Takashi
Quoted 2 lines
Well, the current code still doesn't follow properly. Below are some nitpickings.
Thank you for a detailed check.
A new one put my HP
http://www.d4.dion.ne.jp/~sh_okada/misc/alsa-SE200PCI.patch-3.tgz
Quoted 15 lines
You don't need braces around a single-line if, for example,
Quoted 6 lines
if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE90PCI) { /* nothing to do */ } else if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) { se200pci_add_controls(ice); }should be
Quoted 4 lines
if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE90PCI) /* nothing to do */ else if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) se200pci_add_controls(ice);
This becomes a compile error,
Because when omitting it
if (A) else if (B) func();
It needs ';' or '{}'
like
if (A) ; else if (B) func();
or
if (A) {} else if (B) func();Therefore, "/* nothing to do */" cannot be written by this style. When forcibly writing It becomes tricky.
if (A) /* nothing to do */; else if (B) func();
or
if (A) {
/* nothing to do */
} else if (B)
func();So I wrote as
/* nothing to do for VT1724_SUBDEVICE_SE90PCI */ if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) err = se200pci_add_controls(ice);
Quoted 5 lines
Quoted 1 line
2 The name of the control
Now looks better. One remaining thing is you're using an enum control for "ACG Capture Switch". If it's a switch, you should use a boolean type.
AGC has some modes, but now coded one mode.
It makes it to such a style, Because it is likely to be going to increase it in the future.
now OFF, ON(type=1)
future OFF, ON(type=1), ON(type=2),...
Thanks
At Sat, 13 Oct 2007 00:05:43 +0900,
Quoted 7 lines · [email protected] wrote:
Quoted 3 lines
Well, the current code still doesn't follow properly. Below are some nitpickings.
Thank you for a detailed check.
A new one put my HP
http://www.d4.dion.ne.jp/~sh_okada/misc/alsa-SE200PCI.patch-3.tgz
Thanks, I'll take a look later.
Quoted 43 lines
Quoted 15 lines
You don't need braces around a single-line if, for example,
Quoted 6 lines
if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE90PCI) { /* nothing to do */ } else if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) { se200pci_add_controls(ice); }should be
Quoted 4 lines
if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE90PCI) /* nothing to do */ else if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) se200pci_add_controls(ice);This becomes a compile error,
Because when omitting itif (A) else if (B) func();It needs ';' or '{}'
likeif (A) ; else if (B) func(); or if (A) {} else if (B) func();Therefore, "/* nothing to do */" cannot be written by this style. When forcibly writing It becomes tricky.
if (A) /* nothing to do */; else if (B) func();or
if (A) { /* nothing to do */ } else if (B) func();
Quoted 5 lines
So I wrote as
/* nothing to do for VT1724_SUBDEVICE_SE90PCI */ if (ice->eeprom.subvendor == VT1724_SUBDEVICE_SE200PCI) err = se200pci_add_controls(ice);
Yeah, that's better.
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
2 The name of the control
Now looks better. One remaining thing is you're using an enum control for "ACG Capture Switch". If it's a switch, you should use a boolean type.
Quoted 6 lines
AGC has some modes, but now coded one mode.
It makes it to such a style, Because it is likely to be going to increase it in the future.now OFF, ON(type=1)
future OFF, ON(type=1), ON(type=2),...
Then let's rename it to another one, such as, 'AGC Capture Mode'. Also, a value like "ON(xxx)" look ugly. I'd suggest items like 'Off', 'Type1', 'Type2'.
Takashi
Hi!
First I want to thank you both for your work on this driver! I got that
soundcard via import from Japan (into Germany) and was waiting for exactly this ;)
But:... I know I'm stupid, but I don't get this driver compiled... I added it to the alsa 15rc3-tree
- copy se.* to ./alsa-kernel/pci/ice1712
- edit ./alsa-kernel/pci/ice1712/Makefile: added se.o
- added a new se.c to ./pci/ice1712 linking to the alsa-kernel-directory (like the juli.c)
After ./cvscompile I get:
[...]
In file included from /home/daniel/alsa-driver-1.0.15rc3/pci/ice1712/se.c:2:./alsa-kernel/pci/ice1712/se.c:396:
Warnung: Initialisierung von inkompatiblem Zeigertyp ./alsa-kernel/pci/ice1712/se.c:402:
Warnung: Initialisierung von inkompatiblem Zeigertyp ./alsa-kernel/pci/ice1712/se.c: In Funktion »se200pci_cont_get«:./alsa-kernel/pci/ice1712/se.c:463:
Fehler: »union <anonymous>« hat kein Element namens »se« ./alsa-kernel/pci/ice1712/se.c:464:
Fehler: »union <anonymous>« hat kein Element namens »se« ./alsa-kernel/pci/ice1712/se.c:468:
Fehler: »union <anonymous>« hat kein Element namens »se« ./alsa-kernel/pci/ice1712/se.c: In Funktion »se200pci_cont_put«:./alsa-kernel/pci/ice1712/se.c:491:
Fehler: »union <anonymous>« hat kein Element namens »se« ./alsa-kernel/pci/ice1712/se.c:492:
Fehler: »union <anonymous>« hat kein Element namens »se« ./alsa-kernel/pci/ice1712/se.c:493:
Fehler: »union <anonymous>« hat kein Element namens »se« ./alsa-kernel/pci/ice1712/se.c:494:
Fehler: »union <anonymous>« hat kein Element namens »se« ./alsa-kernel/pci/ice1712/se.c:499:
Fehler: »union <anonymous>« hat kein Element namens »se« ./alsa-kernel/pci/ice1712/se.c:500:
Fehler: »union <anonymous>« hat kein Element namens »se« make[4]: *** [/home/daniel/alsa-driver-1.0.15rc3/pci/ice1712/se.o] Fehler 1 make[3]: *** [/home/daniel/alsa-driver-1.0.15rc3/pci/ice1712] Fehler 2 make[2]: *** [/home/daniel/alsa-driver-1.0.15rc3/pci] Fehler 2 make[1]: *** [_module_/home/daniel/alsa-driver-1.0.15rc3] Fehler 2 make[1]: Verlasse Verzeichnis '/usr/src/linux-headers-2.6.22-14-generic'
make: *** [compile] Fehler 2
What went wrong?
Greetings,
Daniel
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Hi
A new one put my HP
http://www.d4.dion.ne.jp/~sh_okada/misc/alsa-SE200PCI.patch-4.tgz
Quoted 3 lines
Then let's rename it to another one, such as, 'AGC Capture Mode'. Also, a value like "ON(xxx)" look ugly. I'd suggest items like 'Off', 'Type1', 'Type2'.
It changed from "AGC Capture Switch" to "AGC Capture Mode" and changed the mode name "ON(type=1)" to "LimiterMode" and added a new mode "ALCMode".
As a result the mode is "Off", "LimiterMode", "ALCMode".
Thanks
Just a question: You said the 8740 is hardwired on the board, so is the "Selectable digital low pass filter" controllable by any means?
Thanks
At Wed, 17 Oct 2007 09:32:18 +0000 (UTC),
Quoted 3 lines · Daniel Mayer
Just a question: You said the 8740 is hardwired on the board, so is the "Selectable digital low pass filter" controllable by any means?
If the codec chip supports it, yes, should be feasible...
Takashi
At Tue, 16 Oct 2007 21:32:53 +0900,
Quoted 10 lines · [email protected] wrote:
Hi
A new one put my HP
http://www.d4.dion.ne.jp/~sh_okada/misc/alsa-SE200PCI.patch-4.tgzQuoted 3 lines
Then let's rename it to another one, such as, 'AGC Capture Mode'. Also, a value like "ON(xxx)" look ugly. I'd suggest items like 'Off', 'Type1', 'Type2'.
Quoted 5 lines
It changed from "AGC Capture Switch" to "AGC Capture Mode" and changed the mode name "ON(type=1)" to "LimiterMode" and added a new mode "ALCMode".
As a result the mode is "Off", "LimiterMode", "ALCMode".
FYI, the patch is now merged to ALSA HG tree (with slight modifications and fixes). Please check whether it works for you.
Thanks,
Takashi
Quoted 12 lines
At Tue, 16 Oct 2007 21:32:53 +0900,
Quoted 10 lines · [email protected] wrote:
Hi
A new one put my HP
http://www.d4.dion.ne.jp/~sh_okada/misc/alsa-SE200PCI.patch-4.tgzQuoted 3 lines
Then let's rename it to another one, such as, 'AGC Capture Mode'. Also, a value like "ON(xxx)" look ugly. I'd suggest items like 'Off', 'Type1', 'Type2'.
Quoted 8 lines
Quoted 5 lines
It changed from "AGC Capture Switch" to "AGC Capture Mode" and changed the mode name "ON(type=1)" to "LimiterMode" and added a new mode "ALCMode".
As a result the mode is "Off", "LimiterMode", "ALCMode".
FYI, the patch is now merged to ALSA HG tree (with slight modifications and fixes). Please check whether it works for you.
All analog outputs, all analog inputs with selector and the AFL path switch works well.
But though it forgot to say, because I do not have a digital device, I doesn't confirm it.
However, it is said on HP that it works by
modprobe snd-ice1724 model=prodigy71
So I selected prodigy71's mode, and I think that it moves perhaps.
Thanks