alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* hdspmixer broken for 96khz
@ 2011-04-02 12:28 Tim Blechmann
  2011-04-03  8:16 ` Adrian Knoth
  0 siblings, 1 reply; 9+ messages in thread
From: Tim Blechmann @ 2011-04-02 12:28 UTC (permalink / raw)
  To: alsa-devel

the updated hdspmixer doesn't work for 96khz any more. the 44.1/48 khz versions 
are drawn correctly, the 88.2/96 khz version hides all controls, so just the 
menu is visible.

bisecting fails, since some versions of hdspmixer simply segfault. the bisect 
report gives me:

There are only 'skip'ped commits left to test.
The first bad commit could be any of:
0201fd1778fb536b2b1f2f5305e64a162667769c
69991756aa544021bff485eae64c02ee674c3e30
9ea2fb1f880667388435f4983f6d727d6b55875a
cef20c040c962e3183e20093478d30f2ffc1ee46
073fad25cb1e05c6fa00d9d2f3fb3781156e6988
5d4bcc44ce054cedaa6f998bcb6a7c0746d19f69
3f34b2c0f2aba38b819d4b05a25b2ff2f090f512
4c63a6b7beec6d9402b5e3fd8a5a075e436f6055
3506d3d9a7d13c40f8080bf36e2c745a73310da9
d0d9470deeb06d1cc5405e37695229db68cde3bd
97e96addffef14f71739bdf1e51030cce854904b
f2bb47662d65ecb358f51b66dfd64eed1f38dde1
646eacb626355a7010aab901dbe4dcfa66ede70f

oddly, i cannot get any earler version of hdspmixer working: the version tagged 
with v1.0.24.1 gives me:
HDSPMixer 1.6 - Copyright (C) 2003 Thomas Charbonnel <thomas@undata.org>
This program comes with ABSOLUTELY NO WARRANTY
HDSPMixer is free software, see the file COPYING for details

Looking for RME cards :
Card 0 : HDA Intel at 0xf7ff8000 irq 70
Card 1 : RME Hammerfall DSP + Multiface at 0xfbef0000, irq 16
Uninitialized HDSP card found.
Use hdsploader to upload configuration data to the card.
No RME cards found.

hdspconf can connect to the card, though

thoughts?

-- 
tim@klingt.org
http://tim.klingt.org

Your mind will answer most questions if you learn to relax and wait
for the answer.
  William S. Burroughs

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

* Re: hdspmixer broken for 96khz
  2011-04-02 12:28 hdspmixer broken for 96khz Tim Blechmann
@ 2011-04-03  8:16 ` Adrian Knoth
  2011-04-03  9:39   ` Tim Blechmann
  0 siblings, 1 reply; 9+ messages in thread
From: Adrian Knoth @ 2011-04-03  8:16 UTC (permalink / raw)
  To: Tim Blechmann; +Cc: alsa-devel

On Sat, Apr 02, 2011 at 02:28:02PM +0200, Tim Blechmann wrote:

Hi!

> the updated hdspmixer doesn't work for 96khz any more. the 44.1/48 khz
> versions are drawn correctly, the 88.2/96 khz version hides all
> controls, so just the menu is visible.

I've seen "both", a *working* hdspmixer at 96k and all hidden controls.
The latter could be caused by wrongly initialized or restored presets.

Can you try to activate the controls in the View menu again? Maybe even
the shortcuts work: I for Input section, P for Playback and O for
Output.


Cheers

-- 
mail: adi@thur.de  	http://adi.thur.de	PGP/GPG: key via keyserver

The trouble with being punctual is that nobody's there to appreciate it.
                -- Franklin P. Jones

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

* Re: hdspmixer broken for 96khz
  2011-04-03  8:16 ` Adrian Knoth
@ 2011-04-03  9:39   ` Tim Blechmann
  2011-04-03 10:25     ` Adrian Knoth
  2011-04-04  7:58     ` Takashi Iwai
  0 siblings, 2 replies; 9+ messages in thread
From: Tim Blechmann @ 2011-04-03  9:39 UTC (permalink / raw)
  To: Adrian Knoth; +Cc: alsa-devel


[-- Attachment #1.1: Type: Text/Plain, Size: 912 bytes --]

> > the updated hdspmixer doesn't work for 96khz any more. the 44.1/48 khz
> > versions are drawn correctly, the 88.2/96 khz version hides all
> > controls, so just the menu is visible.
> 
> I've seen "both", a *working* hdspmixer at 96k and all hidden controls.
> The latter could be caused by wrongly initialized or restored presets.
> 
> Can you try to activate the controls in the View menu again? Maybe even
> the shortcuts work: I for Input section, P for Playback and O for

ok, after removing my old hdspmixer configuration file, it seems to work. would 
be good to have a more robust behavior, since the current behavior is quite 
confusing and people may have rather complex mixer setups, which they would need 
to regenerate.

thnx, tim

-- 
tim@klingt.org
http://tim.klingt.org

The price an artist pays for doing what he wants is that he has to do
it.
  William S. Burroughs

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: 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] 9+ messages in thread

* Re: hdspmixer broken for 96khz
  2011-04-03  9:39   ` Tim Blechmann
@ 2011-04-03 10:25     ` Adrian Knoth
  2011-04-04  7:21       ` Tim Blechmann
  2011-04-04  7:58     ` Takashi Iwai
  1 sibling, 1 reply; 9+ messages in thread
From: Adrian Knoth @ 2011-04-03 10:25 UTC (permalink / raw)
  To: alsa-devel

On Sun, Apr 03, 2011 at 11:39:41AM +0200, Tim Blechmann wrote:

> > > the updated hdspmixer doesn't work for 96khz any more. the 44.1/48 khz
> > > versions are drawn correctly, the 88.2/96 khz version hides all
> > > controls, so just the menu is visible.
> > 
> > I've seen "both", a *working* hdspmixer at 96k and all hidden controls.
> > The latter could be caused by wrongly initialized or restored presets.
> > 
> > Can you try to activate the controls in the View menu again? Maybe even
> > the shortcuts work: I for Input section, P for Playback and O for
> 
> ok, after removing my old hdspmixer configuration file, it seems to
> work. would be good to have a more robust behavior, since the current
> behavior is quite confusing and people may have rather complex mixer
> setups, which they would need to regenerate.

I thought I have paid attention to migrate the settings from the old
file format to the new one:

   http://git.alsa-project.org/?p=alsa-tools.git;a=commit;h=287bc091e9dba539399ba4540c60623dee1a3bc3

I wonder what went wrong. If you like, feel free to further dig into
this.

However, the current on-disk format is utterly stupid, it has no
meta-information at all, it will break if the order of cards change.

The whole hdspmixer is a dead-end, even supporting more than one card in
a single app complicates things like hell (I have an upcoming patch
series. Took me 6hrs or so just to get switching back/forth between two
cards right).

So the next thing I'd like to implement is to limit hdspmixer to a
single card and then run a new instance on the second, third, 4th a.s.o.
card. Like alsamixer -c 1: hdspmixer -c 1, maybe -c reflecting the ALSA
card number as found in /proc/asound/cards.

Anyway, the whole codebase is subtle broken, and the best approach would
be a rewrite from scratch. Maybe it makes sense to merge hdsp and hdspm,
first. Comments welcome. ;)


Cheers

-- 
mail: adi@thur.de  	http://adi.thur.de	PGP/GPG: key via keyserver

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

* Re: hdspmixer broken for 96khz
  2011-04-03 10:25     ` Adrian Knoth
@ 2011-04-04  7:21       ` Tim Blechmann
  0 siblings, 0 replies; 9+ messages in thread
From: Tim Blechmann @ 2011-04-04  7:21 UTC (permalink / raw)
  To: alsa-devel

> I wonder what went wrong. If you like, feel free to further dig into
> this.
> 
> However, the current on-disk format is utterly stupid, it has no
> meta-information at all, it will break if the order of cards change.
> 
> The whole hdspmixer is a dead-end, even supporting more than one card in
> a single app complicates things like hell (I have an upcoming patch
> series. Took me 6hrs or so just to get switching back/forth between two
> cards right).

the hdspmixer is not perfect, but it more or less worked for years and it is 
used in `production' environments. so breaking the parts that are currently 
working is quite annoying for users.

> So the next thing I'd like to implement is to limit hdspmixer to a
> single card and then run a new instance on the second, third, 4th a.s.o.
> card. Like alsamixer -c 1: hdspmixer -c 1, maybe -c reflecting the ALSA
> card number as found in /proc/asound/cards.
> 
> Anyway, the whole codebase is subtle broken, and the best approach would
> be a rewrite from scratch. Maybe it makes sense to merge hdsp and hdspm,
> first. Comments welcome. ;)

rewriting the hdspmixer doesn't sound like a bad idea to me. reworking the 
sampling rate switching would be a great help as well: the hdsp is the only 
device i know, which requires an external program to switch the sampling rate. a 
few years ago i had a brief look at the driver, but this seemed to be a non-
trivial problem.

cheers, tim

-- 
tim@klingt.org
http://tim.klingt.org

Most of the trouble in this world has been caused by folks who can't
mind their own business, because they have no business of their own to
mind, any more than a smallpox virus has.
  William S. Burroughs

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

* Re: hdspmixer broken for 96khz
  2011-04-03  9:39   ` Tim Blechmann
  2011-04-03 10:25     ` Adrian Knoth
@ 2011-04-04  7:58     ` Takashi Iwai
  2011-04-04  8:05       ` Tim Blechmann
  1 sibling, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2011-04-04  7:58 UTC (permalink / raw)
  To: Tim Blechmann; +Cc: Adrian Knoth, alsa-devel

At Sun, 3 Apr 2011 11:39:41 +0200,
Tim Blechmann wrote:
> 
> > > the updated hdspmixer doesn't work for 96khz any more. the 44.1/48 khz
> > > versions are drawn correctly, the 88.2/96 khz version hides all
> > > controls, so just the menu is visible.
> > 
> > I've seen "both", a *working* hdspmixer at 96k and all hidden controls.
> > The latter could be caused by wrongly initialized or restored presets.
> > 
> > Can you try to activate the controls in the View menu again? Maybe even
> > the shortcuts work: I for Input section, P for Playback and O for
> 
> ok, after removing my old hdspmixer configuration file, it seems to work. would 
> be good to have a more robust behavior, since the current behavior is quite 
> confusing and people may have rather complex mixer setups, which they would need 
> to regenerate.

Any chance to recover the old broken configuration?
Then we can track down the bug.


thanks,

Takashi

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

* Re: hdspmixer broken for 96khz
  2011-04-04  7:58     ` Takashi Iwai
@ 2011-04-04  8:05       ` Tim Blechmann
  2011-04-04 10:01         ` Adrian Knoth
  0 siblings, 1 reply; 9+ messages in thread
From: Tim Blechmann @ 2011-04-04  8:05 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Adrian Knoth, alsa-devel


[-- Attachment #1.1.1: Type: Text/Plain, Size: 1018 bytes --]

> > > > the updated hdspmixer doesn't work for 96khz any more. the 44.1/48
> > > > khz versions are drawn correctly, the 88.2/96 khz version hides all
> > > > controls, so just the menu is visible.
> > > 
> > > I've seen "both", a *working* hdspmixer at 96k and all hidden controls.
> > > The latter could be caused by wrongly initialized or restored presets.
> > > 
> > > Can you try to activate the controls in the View menu again? Maybe even
> > > the shortcuts work: I for Input section, P for Playback and O for
> > 
> > ok, after removing my old hdspmixer configuration file, it seems to work.
> > would be good to have a more robust behavior, since the current behavior
> > is quite confusing and people may have rather complex mixer setups,
> > which they would need to regenerate.
> 
> Any chance to recover the old broken configuration?
> Then we can track down the bug.

attached

tim

-- 
tim@klingt.org
http://tim.klingt.org

I don't write music for sissy ears.
  Charles Ives

[-- Attachment #1.1.2: hhdsp.mix.zip --]
[-- Type: application/zip, Size: 3838 bytes --]

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: 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] 9+ messages in thread

* Re: hdspmixer broken for 96khz
  2011-04-04  8:05       ` Tim Blechmann
@ 2011-04-04 10:01         ` Adrian Knoth
  2011-04-05 10:29           ` Tim Blechmann
  0 siblings, 1 reply; 9+ messages in thread
From: Adrian Knoth @ 2011-04-04 10:01 UTC (permalink / raw)
  To: alsa-devel

On Mon, Apr 04, 2011 at 10:05:58AM +0200, Tim Blechmann wrote:

> > Any chance to recover the old broken configuration?
> > Then we can track down the bug.
> attached

This isn't the old configuration, it's the new one. (it has my new magic
code "HDSPMixer v1" right at the beginning)

The foremost question is: when did you wrote your old configuration
file?

What I tried so far: checked out tag 1.0.24, created a conf file, then
checked out HEAD. As expected, hdspmixer correctly loads the file,
switching samplerates works.

Since I only have a RayDAT at hand right now, I cannot test with
anything older than 1.0.24 (to be precise, older than commit
e24e56795ea57e3dd7da45063ab71f04e231192d)

But what I can say for sure is: if you used hdspmixer before 1.0.24 on a
non-MADI card like Multiface/Digiface, loading this preset file in
1.0.24 would break the configuration. Is this what we're talking about?

Reason: defines.h contains HDSP_MAX_CHANNELS, it was 26 until adding
support for MADI cards, bumping this value to 64. And now let's have a
look at the preset load/restore code:

    for (int speed = 0; speed < 3; ++speed) {
	for (int card = 0; card < MAX_CARDS; ++card) {
	    for (int preset = 0; preset < 8; ++preset) {
		for (int channel = 0; channel < HDSP_MAX_CHANNELS; ++channel) {
		    /* inputs pans and volumes */
		    if (fread((void
*)&(inputs->strips[channel]->data[card][speed][preset]->pan_pos[0]),
sizeof(int), 14, file) != 14) {
			goto load_error;
		    }
		    if (fread((void
*)&(inputs->strips[channel]->data[card][speed][preset]->fader_pos[0]),
sizeof(int), 14, file) != 14) {
			goto load_error;
		    }

As I said earlier, the ondisk format is a pure 1:1 memory dump without
any meta information, just an array of integers.

Now that HDSP_MAX_CHANNELS has changed, the size of the final memory
dump differs and different values end up in different places.

The only possible way to circumvent this is to check the file size.
3*3*8*26*some_constant is different than 3*3*8*64*some_constant, and we
would be able to guess if it's a pre-1.0.24 preset file or a newer one.


Cheers

-- 
mail: adi@thur.de  	http://adi.thur.de	PGP/GPG: key via keyserver

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

* Re: hdspmixer broken for 96khz
  2011-04-04 10:01         ` Adrian Knoth
@ 2011-04-05 10:29           ` Tim Blechmann
  0 siblings, 0 replies; 9+ messages in thread
From: Tim Blechmann @ 2011-04-05 10:29 UTC (permalink / raw)
  To: alsa-devel

>> > Any chance to recover the old broken configuration?
>> > Then we can track down the bug.
>> attached
> 
> This isn't the old configuration, it's the new one. (it has my new magic
> code "HDSPMixer v1" right at the beginning)
> 
> The foremost question is: when did you wrote your old configuration
> file?

hm, good question! i have been using this preset file for years, maybe i've 
stored it with the new hdspmixer. but with this preset file, the 96khz mixer was 
not shown.


> But what I can say for sure is: if you used hdspmixer before 1.0.24 on a
> non-MADI card like Multiface/Digiface, loading this preset file in
> 1.0.24 would break the configuration. Is this what we're talking about?

exactly!


> Reason: defines.h contains HDSP_MAX_CHANNELS, it was 26 until adding
> support for MADI cards, bumping this value to 64.
> And now let's have a
> look at the preset load/restore code:

oh shit :/


> The only possible way to circumvent this is to check the file size.
> 3*3*8*26*some_constant is different than 3*3*8*64*some_constant, and we
> would be able to guess if it's a pre-1.0.24 preset file or a newer one.

that sounds reasonable. at least printing a big fat warning would be 
appreciated!

btw, when working on the hdspmixer it would be cool, if you keep the fireface in 
mind. someone seems to work on ffado support and i suppose the fireface mixer 
can share some code with the hdspmixer.

cheers, tim

-- 
tim@klingt.org
http://tim.klingt.org

Contrary to general belief, an artist is never ahead of his time but
most people are far behind theirs.
  Edgar Varèse


_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2011-04-05 10:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-02 12:28 hdspmixer broken for 96khz Tim Blechmann
2011-04-03  8:16 ` Adrian Knoth
2011-04-03  9:39   ` Tim Blechmann
2011-04-03 10:25     ` Adrian Knoth
2011-04-04  7:21       ` Tim Blechmann
2011-04-04  7:58     ` Takashi Iwai
2011-04-04  8:05       ` Tim Blechmann
2011-04-04 10:01         ` Adrian Knoth
2011-04-05 10:29           ` Tim Blechmann

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