[ltp] CD speed support in tp_smapi

Stefan Schmidt linux-thinkpad@linux-thinkpad.org
Wed, 7 Dec 2005 09:22:40 +0100


--8RsyD0KswhpoK73Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello.

On Tue, 2005-12-06 at 21:57, Michael Stilkerich wrote:
> * Shem Multinymous <multinymous@gmail.com> [2005-12-06 18:25]:
> > /sys/devices/platform/smapi/cdrom_speeeteset/get the CD drive speed
> > level (0=3Dslow, 1=3Dmedium, 2=3Dfast). It seems that no other speed
> this one seems to work on my T40p :-)

OK. Here are my tests on my T40p:

Module loads fine.

echo 0 > /sys/devices/platform/smapi/cdrom_speed:
-------------------------------------------------
tp_smapi: smapi_request in: BX=3D8220 CX=3D0 DI=3D0 SI=3D0
tp_smapi: smapi_request out: AX=3D80 BX=3D920 CX=3D78 DX=3Df DI=3D0 SI=3D0 =
ret=3D0
tp_smapi: smapi_request in: BX=3D8221 CX=3Df DI=3D0 SI=3D0
tp_smapi: smapi_request out: AX=3D80 BX=3D8221 CX=3Df DX=3Db2 DI=3D0 SI=3D0=
 ret=3D0
tp_smapi: cdrom speed set to level 0


echo 1 > /sys/devices/platform/smapi/cdrom_speed:
-------------------------------------------------
tp_smapi: smapi_request in: BX=3D8220 CX=3D0 DI=3D0 SI=3D0
tp_smapi: smapi_request out: AX=3D80 BX=3D920 CX=3D78 DX=3Df DI=3D0 SI=3D0 =
ret=3D0
tp_smapi: smapi_request in: BX=3D8221 CX=3D1e DI=3D4 SI=3D0
tp_smapi: smapi_request out: AX=3D80 BX=3D8221 CX=3D1e DX=3Db2 DI=3D4 SI=3D=
0 ret=3D0
tp_smapi: cdrom speed set to level 1



echo 2 > /sys/devices/platform/smapi/cdrom_speed:
-------------------------------------------------
tp_smapi: smapi_request in: BX=3D8220 CX=3D0 DI=3D0 SI=3D0
tp_smapi: smapi_request out: AX=3D80 BX=3D920 CX=3D78 DX=3D1e DI=3D4 SI=3D0=
 ret=3D0
tp_smapi: smapi_request in: BX=3D8221 CX=3D78 DI=3D1e SI=3D0
tp_smapi: smapi_request out: AX=3D80 BX=3D8221 CX=3D78 DX=3Db2 DI=3D1e SI=
=3D0
ret=3D0
tp_smapi: cdrom speed set to level 2


I've also done some tests with hdparm to test speed. But the tests are
not significant.

I also had no problem to change the speed with inserted CD.


--- README      2005-12-07 09:15:53.000000000 +0100
+++ README-new  2005-12-07 09:17:07.000000000 +0100
@@ -60,8 +60,8 @@

 Set and get CD-ROM speed:
 # echo 0 > /sys/devices/platform/smapi/cdrom_speed # slow
-# echo 0 > /sys/devices/platform/smapi/cdrom_speed # medium
-# echo 0 > /sys/devices/platform/smapi/cdrom_speed # fast
+# echo 1 > /sys/devices/platform/smapi/cdrom_speed # medium
+# echo 2 > /sys/devices/platform/smapi/cdrom_speed # fast
 # cat /sys/devices/platform/smapi/cdrom_speed

 WARNING: changing the CD speed when it is in use will hang your computer.
@@ -103,7 +103,7 @@

 Avoid hangs when changing CD speed concurrently with CD access.

-Don't creat /sys files for unsupported functions (requires probing on modu=
le
+Don't create /sys files for unsupported functions (requires probing on mod=
ule
 load or a huge white/blacklist).

 Support both batteries, putting the files of each battery in a separate


regards=20
Stefan Schmidt

--8RsyD0KswhpoK73Z
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDlpvQbNSsvd31FmURAmvZAJ0f2lvzSVeC/yQYxCwK68eA0TKO5ACcDLdP
aNBaBUqfRAwQ3xLcjNQDGuY=
=Xgva
-----END PGP SIGNATURE-----

--8RsyD0KswhpoK73Z--