From patchwork Mon May 9 19:54:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 770652 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p49JsKqO019309 for ; Mon, 9 May 2011 19:54:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754581Ab1EITyS (ORCPT ); Mon, 9 May 2011 15:54:18 -0400 Received: from mail-in-08.arcor-online.net ([151.189.21.48]:44930 "EHLO mail-in-08.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754536Ab1EITyP (ORCPT ); Mon, 9 May 2011 15:54:15 -0400 Received: from mail-in-12-z2.arcor-online.net (mail-in-12-z2.arcor-online.net [151.189.8.29]) by mx.arcor.de (Postfix) with ESMTP id AC896205956; Mon, 9 May 2011 21:54:14 +0200 (CEST) Received: from mail-in-14.arcor-online.net (mail-in-14.arcor-online.net [151.189.21.54]) by mail-in-12-z2.arcor-online.net (Postfix) with ESMTP id 9FA331DF162; Mon, 9 May 2011 21:54:14 +0200 (CEST) Received: from localhost.localdomain (dslb-178-000-053-073.pools.arcor-ip.net [178.0.53.73]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-14.arcor-online.net (Postfix) with ESMTPA id 58B6B9C13C; Mon, 9 May 2011 21:54:14 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-14.arcor-online.net 58B6B9C13C DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1304970854; bh=QLW1EUP++jQF0q2LkvvhTXfJCiw7tyfRqXxOMkx/dCE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=P8op4eiA8Jda0Mt0NNHoh76MStOonmqXxERocpFiYMsSF6H5Ec5eZxX8+Zw1tcmZK jLid8THvgUJQIYmAPdoOs1N3n1o3mreMCaY9xI/5Mkhyda7u1+/LVkWveA/4m9+Dci BGjctqhBh8/wWTjCb8dlzKoUYOqEdkDy1PhUhyp4= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, d.belimov@gmail.com, Stefan Ringel Subject: [PATCH 12/16] tm6000: all audio packets must swab Date: Mon, 9 May 2011 21:54:00 +0200 Message-Id: <1304970844-20955-12-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.7.4.2 In-Reply-To: <1304970844-20955-1-git-send-email-stefan.ringel@arcor.de> References: <1304970844-20955-1-git-send-email-stefan.ringel@arcor.de> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 09 May 2011 19:54:20 +0000 (UTC) From: Stefan Ringel all audio packets must swab Signed-off-by: Stefan Ringel --- drivers/staging/tm6000/tm6000-video.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index a9a5919..ea5ad6c 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -344,17 +344,14 @@ static int copy_streams(u8 *data, unsigned long len, if (vbuf) memcpy(&voutp[pos], ptr, cpysize); break; - case TM6000_URB_MSG_AUDIO: - /* Need some code to copy audio buffer */ - if (dev->fourcc == V4L2_PIX_FMT_YUYV) { - /* Swap word bytes */ - int i; + case TM6000_URB_MSG_AUDIO: { + int i; + for (i = 0; i < cpysize; i += 2) + swab16s((u16 *)(ptr + i)); - for (i = 0; i < cpysize; i += 2) - swab16s((u16 *)(ptr + i)); - } tm6000_call_fillbuf(dev, TM6000_AUDIO, ptr, cpysize); break; + } case TM6000_URB_MSG_VBI: /* Need some code to copy vbi buffer */ break;