Re: Icebooks
John Hughes(john@fallenbit.com)@Mon, Jul 30, 2001 at 05:17:36PM -0400:
> On Monday 30 July 2001 01:46, Yves wrote:
> > I agree with that. I have swapped the translators of dmasound_core.c on my
> > icebook, and I can now listen music with xmms, at high volume (well with
> > set_eq 1...).
>
> Do you have the hacked dmasound_core.c file? or a patch that does it? I
> looked through it, but am not a programmer and was not sure what to change.
> Thanks
>
Not released a patch, since it's very ugly since it breaks the driver
for other dmasound devices...
The changes are very simple :
The file is driver/sound/dmasound/dmasound_core.c
Near the line 290, you change the different cases as follow
static ssize_t sound_copy_translate(TRANS *trans, const u_char *userPtr,
size_t userCount, u_char frame[],
ssize_t *frameUsed, ssize_t frameLeft)
{
ssize_t (*ct_func)(const u_char *, size_t, u_char *, ssize_t *, ssize_t);
switch (dmasound.soft.format) {
case AFMT_MU_LAW:
ct_func = trans->ct_ulaw;
break;
case AFMT_A_LAW:
ct_func = trans->ct_alaw;
break;
case AFMT_S8:
ct_func = trans->ct_s8;
break;
case AFMT_U8:
ct_func = trans->ct_u8;
break;
case AFMT_S16_BE:
ct_func = trans->ct_s16be;
break;
case AFMT_U16_BE:
ct_func = trans->ct_u16be;
break;
case AFMT_S16_LE:
ct_func = trans->ct_s16le;
break;
case AFMT_U16_LE:
ct_func = trans->ct_u16le;
break;
default:
return 0;
}
/* if the user has requested a non-existent translation don't try
to call it but just return 0 bytes moved
*/
if (ct_func)
return ct_func(userPtr, userCount, frame, frameUsed, frameLeft);
return 0;
}
Note that it is really an ugly patch... I have _not_ looked if these changes are necessary, or if
another proper way exists... It worked, that's all
I don't know how to handle this properly. Do we have to swap the translators (or not use it
seems better way...)
Yves
Reply to: