View previous topic :: View next topic |
Author |
Message |
KruzeS n00b
Joined: 10 Jul 2003 Posts: 60 Location: Portugal
|
Posted: Mon Sep 01, 2003 1:02 pm Post subject: Problems with xmms-cdread... |
|
|
I used to have cdread working just fine...
But now i reinstalled my system from scratch (had to repartition): same kernel, same configs, and can't get it working.
It's a ~ppc version like the old one I used (there is no stable version, and it's something we need so much) but I wonder if it's a new unstable version that doesn't work (it wouldn't have appeared on "emerge -u world"s)
Can you tell me which version are you using? The one that's giving me the headache is 0.14a.
Thanks!!
Last edited by KruzeS on Mon Sep 01, 2003 8:53 pm; edited 1 time in total |
|
Back to top |
|
|
KruzeS n00b
Joined: 10 Jul 2003 Posts: 60 Location: Portugal
|
Posted: Mon Sep 01, 2003 8:52 pm Post subject: |
|
|
Sorry for answering myself, but anybody?
If any of you got this to work, please tell me the version you're using...
Thanks! |
|
Back to top |
|
|
KruzeS n00b
Joined: 10 Jul 2003 Posts: 60 Location: Portugal
|
Posted: Mon Sep 01, 2003 10:34 pm Post subject: |
|
|
Well I belive I've tracked down the source of my problem: the usual endianess problems.
So why haven't I experienced this before? (this version of cdread as been around for a while, and was the one I had been using) The difference is not in the gentoo instalation, not on the kernel config... no... it's on the equalizer!
You see, I stole an .eqf file back from winamp "headfones/laptop speakers" my favorite one, and now am using it always. And xmms-cdread as an endianess problem with the equalizer on!
I haven't managed a full fix for this, but this will work for me, at least for a while:
Code: |
filter.c - line 40
< if (!cd_eq_on) return;
> /*if (!cd_eq_on)*/ return;
|
This makes the plugin totally ignore the equalizer, playing the tunes fine, just not equalized.
Hope it helps, people... and thanks anyway! |
|
Back to top |
|
|
KruzeS n00b
Joined: 10 Jul 2003 Posts: 60 Location: Portugal
|
Posted: Wed Sep 03, 2003 11:56 am Post subject: |
|
|
Well seems from the lack of responses noone is really interested on this, but I finished my patch:
Code: |
filter.c - line 40
< if (!cd_eq_on) return;
<
< for (i = 0; i < len; i++) {
< ...
< }
> if (!cd_eq_on) return;
>
> for (i = 0; i < len; i++) {
> char * h, * l;
> l = 1 + (h = (char *)&data[i].l);
> *h ^= *l ^= *h ^= *l;
> l = 1 + (h = (char *)&data[i].r);
> *h ^= *l ^= *h ^= *l;
> }
>
> for (i = 0; i < len; i++) {
> ...
> }
>
> for (i = 0; i < len; i++) {
> char * h, * l;
> l = 1 + (h = (char *)&data[i].l);
> *h ^= *l ^= *h ^= *l;
> l = 1 + (h = (char *)&data[i].r);
> *h ^= *l ^= *h ^= *l;
> }
|
The equalizer filter cannot work in big endian mode, so this swaps byte order before and after the filter is applied.
It works for me... |
|
Back to top |
|
|
cselkirk Apprentice
Joined: 09 Jun 2003 Posts: 199 Location: NL
|
Posted: Thu Sep 11, 2003 8:29 pm Post subject: |
|
|
I can verify this problem (and was interested .. I just hadn't has the time to look into). What kind of patch is this <grin> .. "diff -ruN xmms-cdread-${VERSION}.orig xmms-cdread-${VERSION} >| xmms-cdread-endian.patch" would certainly be easier to apply (and for the xmms-cdread developers to accept). _________________ cn=cselkirk,dc=xs4all,dc=nl
Last edited by cselkirk on Thu Sep 11, 2003 9:46 pm; edited 1 time in total |
|
Back to top |
|
|
cselkirk Apprentice
Joined: 09 Jun 2003 Posts: 199 Location: NL
|
Posted: Thu Sep 11, 2003 9:45 pm Post subject: |
|
|
Your "patch" makes absolutly no sense whatsoever _________________ cn=cselkirk,dc=xs4all,dc=nl |
|
Back to top |
|
|
KruzeS n00b
Joined: 10 Jul 2003 Posts: 60 Location: Portugal
|
Posted: Sat Sep 13, 2003 11:34 am Post subject: |
|
|
Look "pal", I am so very sorry I am such a hopeless noob in linux and don't know how to make patches. You tipped me how to do it, thanks. Here it is:
Code: |
xmms-cdread-0.14a-endian.patch:
diff -Naur xmms-cdread-0.14a/filter.c xmms-cdread-0.14a-endian/filter.c
--- xmms-cdread-0.14a/filter.c 2001-04-09 19:33:13.000000000 +0100
+++ xmms-cdread-0.14a-endian/filter.c 2003-09-13 13:31:02.000000000 +0100
@@ -41,6 +41,14 @@
if (!cd_eq_on) return;
for (i = 0; i < len; i++) {
+ char * h, * l;
+ l = 1 + (h = (char *)&data[i].l);
+ *h ^= *l ^= *h ^= *l;
+ l = 1 + (h = (char *)&data[i].r);
+ *h ^= *l ^= *h ^= *l;
+ }
+
+ for (i = 0; i < len; i++) {
ol = fc[0] * (real)data[i].l;
or = fc[0] * (real)data[i].r;
j = 1;
@@ -58,6 +66,15 @@
data[i].l = (short)ol;
data[i].r = (short)or;
}
+
+ for (i = 0; i < len; i++) {
+ char * h, * l;
+ l = 1 + (h = (char *)&data[i].l);
+ *h ^= *l ^= *h ^= *l;
+ l = 1 + (h = (char *)&data[i].r);
+ *h ^= *l ^= *h ^= *l;
+ }
+
}
#define PI 3.1415926535897932384626433832795029L
|
But "pal", what I do know about is C, and you are not going to give any lessons about it. I am trully sorry it makes no sense to you, but belive it or not it does exactly what I explained, and you know what?... it works! Tested it against xmms-cdread on a x86.
So "pal", unless you have a better idea, a correction to make, or even if you want me to beautify the code (I know it stinks), stop the flamming or just ask politely.
I was trying to be helpfull, since this community has helpped me a lot (this is my first ever linux distro on my first ever mac and no macos afterall) Since you had no time to help before, and unless you want to be helpfull and give a constructive aproach to the problem being, I strongly suggest you to just stop there. Otherwise, please continue helpping me to improve my "patch", "fix"... whatever! |
|
Back to top |
|
|
cselkirk Apprentice
Joined: 09 Jun 2003 Posts: 199 Location: NL
|
Posted: Sat Sep 13, 2003 2:44 pm Post subject: |
|
|
KruzeS wrote: | I was trying to be helpfull, since this community has helpped me a lot (this is my first ever linux distro on my first ever mac and no macos afterall) Since you had no time to help before, and unless you want to be helpfull and give a constructive aproach to the problem being, I strongly suggest you to just stop there. Otherwise, please continue helpping me to improve my "patch", "fix"... whatever! |
Apologies if I seemed gruff, It really wasn't my intention, but from the ">>" "<<" ".." I could make no sense of it, seeing it in diff format, I now can.
Not to dwell on it too much I will say that calling someone repeatedly "pal" is quite condesending .. if it was indeed a "flame" and you feel it could have been responded to in a more "constructive" way, then this approach is simply fanning the flames.
I made a diff based on yours (as copy pasting from the page will loose the tab settings and fail to apply) and it doesn't work for me, still white noise. Prehaps as I am using ALSA as my sound driver. _________________ cn=cselkirk,dc=xs4all,dc=nl
Last edited by cselkirk on Sun Sep 14, 2003 1:43 pm; edited 1 time in total |
|
Back to top |
|
|
KruzeS n00b
Joined: 10 Jul 2003 Posts: 60 Location: Portugal
|
Posted: Sun Sep 14, 2003 1:55 am Post subject: |
|
|
Apologies accepted, and I'm sorry if I offended you in any way. I can edit and remove it at your wish. I do tend to fan the flames too easily.
As to the matter being, well it does work for me, so I really don't know. I am using OSS though, so it might be your ALSA. I still haven't managed to get ALSA working, since I have a more urgent problem in hands (with a VPN I need for school), so it would probably be easier for you to try it with OSS.
If it is from ALSA (and you still get the same endian white noise) you may try to correct it. From looking at my source you'll find that I inserted to for cycles to reverse the endianess, before and after applying the equalizer. You can try to remove either one. If the problem is from ALSA I would guess the second, otherwise it might be from the cd reading (don't know if you're on the same hardware as I), and then the first would probably be the one.
I did what I felt was logic to me, since I assumed (and correctly, at least for me) that the equalizer could not work in that endianess state, so I simply reversed it before and after.
Finally I can only add that you can try my first fix, which ignores the equalizer for CDs complectly, and which I belive is a little bit better that having to shut it down manually. If you want a patch file for this I can easily post it.
I'm sorry I can't help much more, but doing an horizontal patch that works for every peace of hardware and all, that is clean enough to send to the developers really gets out of my league. This was more like a quick fix to a problem I came into. If you want to take it up that level, be my guest, I'll just be happy to see it fixed on the next version out. Otherwise, I still feal too much like a noob to take those steps for myself. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|