* hdsp driver broken for Multiface II Rev 35
@ 2008-01-14 1:21 Andreas Degert
2008-01-14 11:00 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Degert @ 2008-01-14 1:21 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai
Hi folks,
changeset 5326 from 2007/08/31 broke the driver for this card revision.
There was an older thread about this problem which didn't seem to come
to a conclusion.
ioctl SNDRV_HDSP_IOCTL_GET_VERSION returns
io_type = 1 (Multiface)
firmware_rev = 0x35
which is correct. The old code for hdsp_playback_to_output_key looks
like this:
static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in, int out)
{
switch (hdsp->firmware_rev) {
case 0xa:
return (64 * out) + (32 + (in));
case 0x96:
case 0x97:
return (32 * out) + (16 + (in));
default:
return (52 * out) + (26 + (in));
}
}
For my card the result is "(52 * out) + (26 + (in))". The new code
looks like this:
static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in, int out)
{
switch (hdsp->io_type) {
case Multiface:
case Digiface:
default:
return (64 * out) + (32 + (in));
case H9632:
return (32 * out) + (16 + (in));
case H9652:
return (52 * out) + (26 + (in));
}
}
which gives the wrong result "(64 * out) + (32 + (in))". The old code
returns this when firmware_rev == 0xa, which might be the revision of
the older Multiface (not Multiface II). I changed the code to
static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in, int out)
{
switch (hdsp->io_type) {
case Multiface:
case Digiface:
default:
if (hdsp->firmware_rev == 0xa)
return (64 * out) + (32 + (in));
else
return (52 * out) + (26 + (in));
case H9632:
return (32 * out) + (16 + (in));
case H9652:
return (52 * out) + (26 + (in));
}
}
Another possibility would be to go back to the old version of the code
and only make changes for io_type H9632/H9652 with new firmware
revisions:
static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in, int out)
{
switch (hdsp->firmware_rev) {
case 0xa:
return (64 * out) + (32 + (in));
case 0x96:
case 0x97:
return (32 * out) + (16 + (in));
}
switch (hdsp->io_type) {
case H9632:
return (32 * out) + (16 + (in));
case Multiface:
case H9652:
return (52 * out) + (26 + (in));
case Digiface:
??? is there a Digiface with revision != 0xa ???
default:
??? HDSP_IO_Type Undefined ???
}
}
Similar changes must be made to hdsp_input_to_output_key. Does anyone
know which firmware revision exist for which card (io_type) ?
thank you
Andreas Degert
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hdsp driver broken for Multiface II Rev 35
2008-01-14 1:21 hdsp driver broken for Multiface II Rev 35 Andreas Degert
@ 2008-01-14 11:00 ` Takashi Iwai
2008-01-15 19:42 ` Andreas Degert
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2008-01-14 11:00 UTC (permalink / raw)
To: Andreas Degert; +Cc: alsa-devel
At Mon, 14 Jan 2008 02:21:42 +0100,
Andreas Degert wrote:
>
> Hi folks,
>
> changeset 5326 from 2007/08/31 broke the driver for this card revision.
> There was an older thread about this problem which didn't seem to come
> to a conclusion.
>
> ioctl SNDRV_HDSP_IOCTL_GET_VERSION returns
>
> io_type = 1 (Multiface)
> firmware_rev = 0x35
>
> which is correct. The old code for hdsp_playback_to_output_key looks
> like this:
>
> static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in, int out)
> {
> switch (hdsp->firmware_rev) {
> case 0xa:
> return (64 * out) + (32 + (in));
> case 0x96:
> case 0x97:
> return (32 * out) + (16 + (in));
> default:
> return (52 * out) + (26 + (in));
> }
> }
>
> For my card the result is "(52 * out) + (26 + (in))". The new code
> looks like this:
>
> static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in, int out)
> {
> switch (hdsp->io_type) {
> case Multiface:
> case Digiface:
> default:
> return (64 * out) + (32 + (in));
> case H9632:
> return (32 * out) + (16 + (in));
> case H9652:
> return (52 * out) + (26 + (in));
> }
> }
>
> which gives the wrong result "(64 * out) + (32 + (in))". The old code
> returns this when firmware_rev == 0xa, which might be the revision of
> the older Multiface (not Multiface II). I changed the code to
>
> static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in, int out)
> {
> switch (hdsp->io_type) {
> case Multiface:
> case Digiface:
> default:
> if (hdsp->firmware_rev == 0xa)
> return (64 * out) + (32 + (in));
> else
> return (52 * out) + (26 + (in));
> case H9632:
> return (32 * out) + (16 + (in));
> case H9652:
> return (52 * out) + (26 + (in));
> }
> }
This looks OK. Could you prepare a patch (with a proper changelog and
your sing-off)?
> Another possibility would be to go back to the old version of the code
> and only make changes for io_type H9632/H9652 with new firmware
> revisions:
It's a wrong approach in general when the driver supports multiple
hardwares. The firmware is basically strongly bound with the hardware
model, so checking only the revision is dangerous as well.
Thanks,
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hdsp driver broken for Multiface II Rev 35
2008-01-14 11:00 ` Takashi Iwai
@ 2008-01-15 19:42 ` Andreas Degert
2008-01-15 21:28 ` Christian Schumann
2008-01-16 15:00 ` Takashi Iwai
0 siblings, 2 replies; 6+ messages in thread
From: Andreas Degert @ 2008-01-15 19:42 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 958 bytes --]
On Mon, 14 Jan 2008 12:00:10 +0100
Takashi Iwai <tiwai@suse.de> wrote:
[...]
> >
> > static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in,
> > int out) {
> > switch (hdsp->io_type) {
> > case Multiface:
> > case Digiface:
> > default:
> > if (hdsp->firmware_rev == 0xa)
> > return (64 * out) + (32 + (in));
> > else
> > return (52 * out) + (26 + (in));
> > case H9632:
> > return (32 * out) + (16 + (in));
> > case H9652:
> > return (52 * out) + (26 + (in));
> > }
> > }
>
> This looks OK. Could you prepare a patch (with a proper changelog and
> your sing-off)?
ok, here it is:
hdsp: make Multiface II work again
This device has io_type == 1 (Multiface) and firmware_rev > 0xa
(fixes regression from changeset 5326)
Signed-off-by: Andreas Degert <ad@papyrus-gmbh.de>
[-- Attachment #2: hdsp.patch --]
[-- Type: text/x-patch, Size: 780 bytes --]
diff -r 1f9fd3d3cb12 -r d06a33481e0d pci/rme9652/hdsp.c
--- a/pci/rme9652/hdsp.c Mon Jan 14 12:07:53 2008 +0100
+++ b/pci/rme9652/hdsp.c Tue Jan 15 20:29:52 2008 +0100
@@ -607,7 +607,10 @@ static int hdsp_playback_to_output_key (
case Multiface:
case Digiface:
default:
- return (64 * out) + (32 + (in));
+ if (hdsp->firmware_rev == 0xa)
+ return (64 * out) + (32 + (in));
+ else
+ return (52 * out) + (26 + (in));
case H9632:
return (32 * out) + (16 + (in));
case H9652:
@@ -621,7 +624,10 @@ static int hdsp_input_to_output_key (str
case Multiface:
case Digiface:
default:
- return (64 * out) + in;
+ if (hdsp->firmware_rev == 0xa)
+ return (64 * out) + in;
+ else
+ return (52 * out) + in;
case H9632:
return (32 * out) + in;
case H9652:
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hdsp driver broken for Multiface II Rev 35
2008-01-15 19:42 ` Andreas Degert
@ 2008-01-15 21:28 ` Christian Schumann
2008-01-16 15:00 ` Takashi Iwai
1 sibling, 0 replies; 6+ messages in thread
From: Christian Schumann @ 2008-01-15 21:28 UTC (permalink / raw)
To: alsa-devel
Hi Andreas,
On Tue, Jan 15, 2008 at 08:42:15PM +0100, Andreas Degert wrote:
> ok, here it is:
>
> hdsp: make Multiface II work again
>
> This device has io_type == 1 (Multiface) and firmware_rev > 0xa
> (fixes regression from changeset 5326)
>
> Signed-off-by: Andreas Degert <ad@papyrus-gmbh.de>
>
[..]
I was one of the Digiface users with problems with the new driver
revisions. Although I don't know to which tree to apply your patch, I
edited alsa-drver-1.0.15 by hand, and so far after a quick test I can
confirm that it's working with my Digiface. Thank you very much.
Best regards
Christian
--
------------------------------------------------------------------------
Dipl.-Phys. Christian Schumann |Technische Universitaet Kaiserslautern
Mail: schumann@physik.uni-kl.de | Fachbereich Physik
Tel.: 0631/205-4842 (Office) | http://www.physik.uni-kl.de
Tel.: 0631/205-4843 (Lab) |
Fax.: 0631/205-3902 |
Post: Erwin-Schroedinger-Strasse, D-67663 Kaiserslautern
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hdsp driver broken for Multiface II Rev 35
2008-01-15 19:42 ` Andreas Degert
2008-01-15 21:28 ` Christian Schumann
@ 2008-01-16 15:00 ` Takashi Iwai
1 sibling, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2008-01-16 15:00 UTC (permalink / raw)
To: Andreas Degert; +Cc: alsa-devel
At Tue, 15 Jan 2008 20:42:15 +0100,
Andreas Degert wrote:
>
> On Mon, 14 Jan 2008 12:00:10 +0100
> Takashi Iwai <tiwai@suse.de> wrote:
>
> [...]
> > >
> > > static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in,
> > > int out) {
> > > switch (hdsp->io_type) {
> > > case Multiface:
> > > case Digiface:
> > > default:
> > > if (hdsp->firmware_rev == 0xa)
> > > return (64 * out) + (32 + (in));
> > > else
> > > return (52 * out) + (26 + (in));
> > > case H9632:
> > > return (32 * out) + (16 + (in));
> > > case H9652:
> > > return (52 * out) + (26 + (in));
> > > }
> > > }
> >
> > This looks OK. Could you prepare a patch (with a proper changelog and
> > your sing-off)?
>
> ok, here it is:
>
> hdsp: make Multiface II work again
>
> This device has io_type == 1 (Multiface) and firmware_rev > 0xa
> (fixes regression from changeset 5326)
>
> Signed-off-by: Andreas Degert <ad@papyrus-gmbh.de>
Applied to HG tree now. Thanks!
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hdsp driver broken for Multiface II Rev 35
@ 2008-01-16 22:43 Jean Batrel
0 siblings, 0 replies; 6+ messages in thread
From: Jean Batrel @ 2008-01-16 22:43 UTC (permalink / raw)
To: alsa-devel
> Date: Mon, 14 Jan 2008 02:21:42 +0100
> From: Andreas Degert <ad@papyrus-gmbh.de>
> Subject: [alsa-devel] hdsp driver broken for Multiface II Rev 35
> To: alsa-devel@alsa-project.org
> Cc: tiwai@suse.de
> Message-ID: <20080114022142.51d6ae44@pluto.noname>
> Content-Type: text/plain; charset=US-ASCII
>
> Hi folks,
>
> changeset 5326 from 2007/08/31 broke the driver for this card revision.
> There was an older thread about this problem which didn't seem to come
> to a conclusion.
> (...)
> Similar changes must be made to hdsp_input_to_output_key. Does anyone
> know which firmware revision exist for which card (io_type) ?
>
> thank you
> Andreas Degert
> ------------------------------
Bonjour !
You are asking for firmware revision and (RME) cards :
I use a HDSP9632 RME card with issues : my card is Rev. 1.53 and only the 1.51 version is working with Linux, AFAIK...
The card is detected, there is some activity in the middle of HDSPmixer, but I can hear no sound...
A lspci says :
02:01.0 Multimedia audio controller: Xilinx Corporation RME Hammerfall DSP (rev 99)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 255
Interrupt: pin A routed to IRQ 20
Region 0: Memory at feaf0000 (32-bit, non-prefetchable) [size=64K]
I have no very skills with Linux yet, but I very hope getting this card working with Linux.
Can you help me please ? I very apologize if this mail is not relevant in this list.
But I very thank you in advance (I use Fedora 8 and the latest CCRMA kernel) !
Jean Batrel - jean.batrel@voila.fr
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-01-16 22:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-14 1:21 hdsp driver broken for Multiface II Rev 35 Andreas Degert
2008-01-14 11:00 ` Takashi Iwai
2008-01-15 19:42 ` Andreas Degert
2008-01-15 21:28 ` Christian Schumann
2008-01-16 15:00 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2008-01-16 22:43 Jean Batrel
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.