[parisc-linux-cvs] Lasi Harmony driver updates
Helge Deller
deller@gmx.de
Wed, 28 Feb 2001 01:37:51 +0100
--------------Boundary-00=_33ZFO86282K924FZ4M36
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Subject:
The following (large) patch updates most parts of the current lasi harmony
driver and adds full mixer support.
The good thing is, that you now are able to play .mp3-songs with mpg123 with
just an overhead of only ~30% on older PA-machines.
All cudos should go to Matthieu Delahaye <delahaym@esiee.fr> and
Jean-Christophe Vaugeois <vaugeoij@esiee.fr> from the eisee-team, which did
most of this happen. I just added modularization support and some
cleanups/bugfixes.
Please remember to run "make oldconfig" if you had harmony enabled before,
since I changed the CONFIG_xxx option for astetic reasons in the Makefile.
Changelog:
---------
- updated the harmony-driver with mixer support
(mixer support was contributed by Matthieu Delahaye <delahaym@esiee.fr>,
buffer-handling code was contributed by Jean-Christophe Vaugeois
<vaugeoij@esiee.fr>)
- modularization of harmony-driver (untested)
- switched Config.in and Makefile to use CONFIG_SOUND_HARMONY instead of
CONFIG_SOUND_GSC_HARMONY
- various bugfixes
- adjusted indenting
Helge
--------------Boundary-00=_33ZFO86282K924FZ4M36
Content-Type: text/plain;
charset="iso-8859-1";
name="t1"
Content-Transfer-Encoding: base64
Content-Description: harmony-patch
Content-Disposition: attachment; filename="t1"
PyBoYXJtb255LmMuY3ZzLmMKPyBoYXJtb255LmMub2sKSW5kZXg6IENvbmZpZy5pbgo9PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09ClJDUyBmaWxlOiAvaG9tZS9jdnMvcGFyaXNjL2xpbnV4L2RyaXZlcnMvc291bmQvQ29uZmln
LmluLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjEyCmRpZmYgLXUgLXIxLjEyIENvbmZpZy5pbgot
LS0gQ29uZmlnLmluCTIwMDEvMDIvMDIgMDM6MzY6NTEJMS4xMgorKysgQ29uZmlnLmluCTIwMDEv
M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VmdF9sZXZlbCA8PCBHQUlOX01BX1NISUZUKTsKKwkJCWhhcm1vbnlfbWl4ZXJf
c2V0X2dhaW4oKTsKKwkJCXJldHVybiBuZXdfbGVmdF9sZXZlbDsKKwl9CisKKwlyZXR1cm4gLUVJ
TlZBTDsKK30KKworI3VuZGVmIHRvX2hhcm1vbnlfbGV2ZWwKKyN1bmRlZiB0b19vc3NfbGV2ZWwK
KworLyogCisgKiBSZXR1cm4gdGhlIHNlbGVjdGVkIGlucHV0IGRldmljZSAobWljIG9yIGxpbmUp
CisgKi8KKworc3RhdGljIGludCBoYXJtb255X21peGVyX2dldF9yZWNtYXNrKHZvaWQpIAorewor
CWludCBjdXJyZW50X2lucHV0X2xpbmU7CisJCisJY3VycmVudF9pbnB1dF9saW5lID0gKGhhcm1v
bnkuY3VycmVudF9nYWluICYgR0FJTl9JU19NQVNLKSA+PiBHQUlOX0lTX1NISUZUOworCWlmIChj
dXJyZW50X2lucHV0X2xpbmUpIAorCQlyZXR1cm4gU09VTkRfTUFTS19NSUM7CisKKwlyZXR1cm4g
U09VTkRfTUFTS19MSU5FOworfQorCisvKgorICogU2V0IHRoZSBpbnB1dCAob25seSBvbmUgYXQg
dGltZSwgYXJiaXRyYXJ5IHByaW9yaXR5IHRvIGxpbmUgaW4pCisgKi8KKworc3RhdGljIGludCBo
YXJtb255X21peGVyX3NldF9yZWNtYXNrKGludCByZWNtYXNrKQoreworCWludCBuZXdfaW5wdXRf
bGluZTsKKwlpbnQgbmV3X2lucHV0X21hc2s7CisKKwlpZiAoKHJlY21hc2sgJiBTT1VORF9NQVNL
X0xJTkUpKSB7CisJCW5ld19pbnB1dF9saW5lID0gMDsKKwkJbmV3X2lucHV0X21hc2sgPSBTT1VO
RF9NQVNLX0xJTkU7CisJfSBlbHNlICB7CisJCW5ld19pbnB1dF9saW5lID0gMTsKKwkJbmV3X2lu
cHV0X21hc2sgPSBTT1VORF9NQVNLX01JQzsKKwl9CisJaGFybW9ueS5jdXJyZW50X2dha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