Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235811
b: refs/heads/master
c: 1a4cb0f
h: refs/heads/master
i:
  235809: 5fc6ba2
  235807: 8430649
v: v3
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Feb 4, 2011
1 parent d9de08a commit dd517b7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0117f77904a1cbd62cc6e7c25e3ebfc872707712
refs/heads/master: 1a4cb0fb7da009643368b3577b65a2d1da5485dd
25 changes: 12 additions & 13 deletions trunk/drivers/staging/easycap/easycap_sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct snd_pcm_runtime *prt;
int dma_bytes, fragment_bytes;
int isfragment;
__u8 *p1, *p2;
__s16 s16;
__s16 tmp;
int i, j, more, much, rc;
#ifdef UPSAMPLE
int k;
Expand Down Expand Up @@ -203,22 +203,22 @@ for (i = 0; i < purb->number_of_packets; i++) {

delta = (newaudio - oldaudio)
/ 4;
s16 = oldaudio + delta;
tmp = oldaudio + delta;

for (k = 0; k < 4; k++) {
*p2 = (0x00FF & s16);
*p2 = (0x00FF & tmp);
*(p2 + 1) = (0xFF00 &
s16) >> 8;
tmp) >> 8;
p2 += 2;
*p2 = (0x00FF & s16);
*p2 = (0x00FF & tmp);
*(p2 + 1) = (0xFF00 &
s16) >> 8;
tmp) >> 8;
p2 += 2;
s16 += delta;
tmp += delta;
}
p1++;
more--;
oldaudio = s16;
oldaudio = tmp;
}
#else /*!UPSAMPLE*/
if (much > (2 * more))
Expand All @@ -227,11 +227,10 @@ for (i = 0; i < purb->number_of_packets; i++) {
peasycap->dma_fill);

for (j = 0; j < (much / 2); j++) {
s16 = ((int) *p1) - 128;
s16 = 128 *
s16;
*p2 = (0x00FF & s16);
*(p2 + 1) = (0xFF00 & s16) >>
tmp = ((int) *p1) - 128;
tmp = 128 * tmp;
*p2 = (0x00FF & tmp);
*(p2 + 1) = (0xFF00 & tmp) >>
8;
p1++; p2 += 2;
more--;
Expand Down
26 changes: 13 additions & 13 deletions trunk/drivers/staging/easycap/easycap_sound_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ easyoss_complete(struct urb *purb)
struct easycap *peasycap;
struct data_buffer *paudio_buffer;
__u8 *p1, *p2;
__s16 s16;
__s16 tmp;
int i, j, more, much, leap, rc;
#ifdef UPSAMPLE
int k;
Expand Down Expand Up @@ -235,35 +235,35 @@ for (i = 0; i < purb->number_of_packets; i++) {

delta = (newaudio - oldaudio)
/ 4;
s16 = oldaudio + delta;
tmp = oldaudio + delta;

for (k = 0; k < 4; k++) {
*p2 = (0x00FF & s16);
*p2 = (0x00FF & tmp);
*(p2 + 1) = (0xFF00 &
s16) >> 8;
tmp) >> 8;
p2 += 2;
*p2 = (0x00FF & s16);
*p2 = (0x00FF & tmp);
*(p2 + 1) = (0xFF00 &
s16) >> 8;
tmp) >> 8;
p2 += 2;

s16 += delta;
tmp += delta;
}
p1++;
more--;
oldaudio = s16;
oldaudio = tmp;
}
#else /*!UPSAMPLE*/
if (much > (2 * more))
much = 2 * more;
p2 = (__u8 *)paudio_buffer->pto;

for (j = 0; j < (much / 2); j++) {
s16 = ((int) *p1) - 128;
s16 = 128 *
s16;
*p2 = (0x00FF & s16);
*(p2 + 1) = (0xFF00 & s16) >>
tmp = ((int) *p1) - 128;
tmp = 128 *
tmp;
*p2 = (0x00FF & tmp);
*(p2 + 1) = (0xFF00 & tmp) >>
8;
p1++; p2 += 2;
more--;
Expand Down

0 comments on commit dd517b7

Please sign in to comment.