tree 225958f7e2fd766e9834a07e33ad7b8727081ca5
parent d5ae36dd439549305f00a755556f49c9fa7bb237
author Henk <[EMAIL PROTECTED]> Wed, 17 Aug 2005 10:40:26 +0200
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Fri, 09 Sep 2005 06:40:57 -0700

[PATCH] USB: yealink: fix htons usage, documentation updates

Signed-off-by: Henk Vergonet <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

 Documentation/input/yealink.txt |   34 +++++++++++++++++++++++++---------
 drivers/usb/input/yealink.c     |    6 +++---
 2 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/Documentation/input/yealink.txt b/Documentation/input/yealink.txt
--- a/Documentation/input/yealink.txt
+++ b/Documentation/input/yealink.txt
@@ -1,16 +1,18 @@
-yealink - Linux driver for usb-p1k phones
+Driver documentation for yealink usb-p1k phones
 
 0. Status
 ~~~~~~~~~
 
 The p1k is a relatively cheap usb 1.1 phone with:
-  - keyboard           full support
-  - LCD                        full support
-  - LED                        full support
-  - dialtone           full support
-  - ringtone           full support
-  - audio playback     via generic usb audio diver
-  - audio record       via generic usb audio diver
+  - keyboard           full support, yealink.ko / input event API
+  - LCD                        full support, yealink.ko / sysfs API
+  - LED                        full support, yealink.ko / sysfs API
+  - dialtone           full support, yealink.ko / sysfs API
+  - ringtone           full support, yealink.ko / sysfs API
+  - audio playback     full support, snd_usb_audio.ko / alsa API
+  - audio record       full support, snd_usb_audio.ko / alsa API
+
+For vendor documentation see http://www.yealink.com
 
 
 1. Compilation (stand alone version)
@@ -178,7 +180,21 @@ updated with the first letter of the ico
   echo -n RINGTONE > /sys/..../hide_icon
 
 
-5. Credits & Acknowledgments
+5. Sound features
+~~~~~~~~~~~~~~~~~
+Sound is supported by the ALSA driver: snd_usb_audio
+
+One 16-bit channel with sample and playback rates of 8000 Hz is the practical
+limit of the device.
+
+  Example - recording test:
+  arecord -v -d 10 -r 8000 -f S16_LE -t wav  foobar.wav
+
+  Example - playback test:
+  aplay foobar.wav
+
+
+6. Credits & Acknowledgments
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   - Olivier Vandorpe, for starting the usbb2k-api project doing much of
        the reverse engineering.
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c
--- a/drivers/usb/input/yealink.c
+++ b/drivers/usb/input/yealink.c
@@ -318,7 +318,7 @@ static int yealink_set_ringtone(struct y
                if (len > sizeof(p->data))
                        len = sizeof(p->data);
                p->size   = len;
-               p->offset = htons(ix);
+               p->offset = cpu_to_be16(ix);
                memcpy(p->data, &buf[ix], len);
                yealink_cmd(yld, p);
                ix += len;
@@ -383,7 +383,7 @@ send_update:
                val--;
                val &= 0x1f;
                yld->ctl_data->cmd      = CMD_SCANCODE;
-               yld->ctl_data->offset   = htons(val);
+               yld->ctl_data->offset   = cpu_to_be16(val);
                yld->ctl_data->data[0]  = 0;
                yld->ctl_data->sum      = -1 - CMD_SCANCODE - val;
                break;
@@ -395,7 +395,7 @@ send_update:
                /* Combine up to <len> consecutive LCD bytes in a singe request
                 */
                yld->ctl_data->cmd      = CMD_LCD;
-               yld->ctl_data->offset   = htons(ix);
+               yld->ctl_data->offset   = cpu_to_be16(ix);
                yld->ctl_data->size     = len;
                yld->ctl_data->sum      = -CMD_LCD - ix - val - len;
                for(i=1; i<len; i++) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to