From patchwork Mon Dec 30 12:48:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Roth?= X-Patchwork-Id: 3419171 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C72499F37A for ; Mon, 30 Dec 2013 12:49:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C557200E6 for ; Mon, 30 Dec 2013 12:49:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7EB320107 for ; Mon, 30 Dec 2013 12:49:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755765Ab3L3Mt3 (ORCPT ); Mon, 30 Dec 2013 07:49:29 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:57431 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755619Ab3L3Mt0 (ORCPT ); Mon, 30 Dec 2013 07:49:26 -0500 Received: by mail-ee0-f45.google.com with SMTP id d49so4955067eek.18 for ; Mon, 30 Dec 2013 04:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=s/roZSHq/Yd6MYKrhoW9Du5/9QldZPLfWn34pmQ7PHM=; b=0EdG+Xpy0NrzBdTUs79O50KVjfV4TikieJ6YNFHubwtLw/Kr8eAruuaRTHhvF3VdYf waxXuZGObRJSmwlFoYqDg0uDqxYhyQbqE1vQz9fko2pjRwYJsIhzIY05IRo1RPOjkLmM mlgdQnvmQMY3GvRVvqb44OrT9zx+Q4UroE5+nOUM6BthW8+HEYxqvrJE/b7zRnmvP5Ww dF0Bch6TrWdXIjrrQ35hdDBboR9a54tnd/kz70wFoEOvHLW0upbfgb/zayBMgnkTyIW/ XpsXWPQQnSxDI7W3N+mH+RNvFS8bT/cKbT6QRdvPUgQjKBBy2UCESFs5x1Q8O/FEiZcX OZ2w== X-Received: by 10.14.194.131 with SMTP id m3mr54973454een.2.1388407765471; Mon, 30 Dec 2013 04:49:25 -0800 (PST) Received: from neutrino.exnihilo (140-227.61-188.cust.bluewin.ch. [188.61.227.140]) by mx.google.com with ESMTPSA id z42sm108428856eeo.17.2013.12.30.04.49.24 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Dec 2013 04:49:25 -0800 (PST) From: =?UTF-8?q?Andr=C3=A9=20Roth?= To: linux-media@vger.kernel.org Cc: =?UTF-8?q?Andr=C3=A9=20Roth?= Subject: [PATCH 03/18] libdvbv5: VCT table cleanup Date: Mon, 30 Dec 2013 13:48:36 +0100 Message-Id: <1388407731-24369-3-git-send-email-neolynx@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1388407731-24369-1-git-send-email-neolynx@gmail.com> References: <1388407731-24369-1-git-send-email-neolynx@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: André Roth --- lib/include/descriptors/vct.h | 10 ++++++---- lib/libdvbv5/descriptors/vct.c | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/include/descriptors/vct.h b/lib/include/descriptors/vct.h index 6272b43..2d269dc 100644 --- a/lib/include/descriptors/vct.h +++ b/lib/include/descriptors/vct.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2013 - Mauro Carvalho Chehab + * Copyright (c) 2013 - Andre Roth * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -35,14 +36,14 @@ struct dvb_table_vct_channel { uint16_t __short_name[7]; union { - uint16_t bitfield1; + uint32_t bitfield1; struct { uint32_t modulation_mode:8; uint32_t minor_channel_number:10; uint32_t major_channel_number:10; uint32_t reserved1:4; } __attribute__((packed)); - }; + } __attribute__((packed)); uint32_t carrier_frequency; uint16_t channel_tsid; @@ -60,7 +61,8 @@ struct dvb_table_vct_channel { uint16_t ETM_location:2; } __attribute__((packed)); - }; + } __attribute__((packed)); + uint16_t source_id; union { uint16_t bitfield3; @@ -68,7 +70,7 @@ struct dvb_table_vct_channel { uint16_t descriptors_length:10; uint16_t reserved3:6; } __attribute__((packed)); - }; + } __attribute__((packed)); /* * Everything after descriptor (including it) won't be bit-mapped diff --git a/lib/libdvbv5/descriptors/vct.c b/lib/libdvbv5/descriptors/vct.c index e703c52..c1578ad 100644 --- a/lib/libdvbv5/descriptors/vct.c +++ b/lib/libdvbv5/descriptors/vct.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2013 - Mauro Carvalho Chehab + * Copyright (c) 2013 - Andre Roth * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -74,7 +75,7 @@ void dvb_table_vct_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf, bswap32(channel->carrier_frequency); bswap16(channel->channel_tsid); bswap16(channel->program_number); - bswap16(channel->bitfield1); + bswap32(channel->bitfield1); bswap16(channel->bitfield2); bswap16(channel->source_id); bswap16(channel->bitfield3);