public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Valentin <edubezval@gmail.com>
To: linux-omap@vger.kernel.org
Cc: Felipe Balbi <me@felipebalbi.com>,
	Ragner Magalhaes <ragner.magalhaes@indt.org.br>,
	Eduardo Valentin <eduardo.valentin@indt.org.br>
Subject: [PATCH 10/19] Code clean-up for sound/arm/omap/omap-alsa-sx1.c
Date: Fri, 18 Apr 2008 04:00:57 -0400	[thread overview]
Message-ID: <1208505666-13744-11-git-send-email-edubezval@gmail.com> (raw)
In-Reply-To: <1208505666-13744-10-git-send-email-edubezval@gmail.com>

From: Eduardo Valentin <eduardo.valentin@indt.org.br>

Removed lots of whitespaces and a few errors and
warnings reported by checkpatch.pl.

Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
---
 sound/arm/omap/omap-alsa-sx1.c |   72 +++++++++++++++++++++++++++------------
 1 files changed, 50 insertions(+), 22 deletions(-)

diff --git a/sound/arm/omap/omap-alsa-sx1.c b/sound/arm/omap/omap-alsa-sx1.c
index c4691cd..efcabff 100644
--- a/sound/arm/omap/omap-alsa-sx1.c
+++ b/sound/arm/omap/omap-alsa-sx1.c
@@ -14,19 +14,18 @@
 #include <linux/soundcard.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
-#include <asm/io.h>
-#include <asm/arch/mcbsp.h>
-
+#include <linux/io.h>
+#include <linux/connector.h>
 #include <linux/slab.h>
 #include <linux/pm.h>
+
 #include <asm/arch/dma.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
-
+#include <asm/arch/mcbsp.h>
 #include <asm/arch/omap-alsa.h>
-#include "omap-alsa-sx1.h"
 
-#include <linux/connector.h>
+#include "omap-alsa-sx1.h"
 
 /* Connector implementation */
 static struct cb_id cn_sx1snd_id = { CN_IDX_SX1SND, CN_VAL_SX1SND };
@@ -36,9 +35,10 @@ static void cn_sx1snd_callback(void *data)
 {
 	struct cn_msg *msg = (struct cn_msg *)data;
 
-	printk("%s: %lu: idx=%x, val=%x, seq=%u, ack=%u, len=%d: %s.\n",
-			__func__, jiffies, msg->id.idx, msg->id.val,
-			msg->seq, msg->ack, msg->len, (char *)msg->data);
+	printk(KERN_INFO
+		"%s: %lu: idx=%x, val=%x, seq=%u, ack=%u, len=%d: %s.\n",
+		__func__, jiffies, msg->id.idx, msg->id.val,
+		msg->seq, msg->ack, msg->len, (char *)msg->data);
 }
 
 /* Send IPC message to sound server */
@@ -63,7 +63,7 @@ int cn_sx1snd_send(unsigned int cmd, unsigned int arg1, unsigned int arg2)
 	memcpy(m + 1, data, m->len);
 
 	err = cn_netlink_send(m, CN_IDX_SX1SND, gfp_any());
-	snd_printd("sent= %02X %02X %02X, err=%d\n", cmd,arg1,arg2,err);
+	snd_printd("sent= %02X %02X %02X, err=%d\n", cmd, arg1, arg2, err);
 	kfree(m);
 
 	if (err == -ESRCH)
@@ -150,15 +150,42 @@ static void egold_set_samplerate(long sample_rate)
 	clkgdv	= CODEC_CLOCK / (sample_rate * (DEFAULT_BITPERSAMPLE * 2 - 1));
 #endif
 	switch (sample_rate) {
-		case 8000:	clkgdv = 71; egold_rate = FRQ_8000; break;
-		case 11025:	clkgdv = 51; egold_rate = FRQ_11025; break;
-		case 12000:	clkgdv = 47; egold_rate = FRQ_12000; break;
-		case 16000:	clkgdv = 35; egold_rate = FRQ_16000; break;
-		case 22050:	clkgdv = 25; egold_rate = FRQ_22050; break;
-		case 24000:	clkgdv = 23; egold_rate = FRQ_24000; break;
-		case 32000:	clkgdv = 17; egold_rate = FRQ_32000; break;
-		case 44100:	clkgdv = 12; egold_rate = FRQ_44100; break;
-		case 48000:	clkgdv = 11; egold_rate = FRQ_48000; break;
+	case 8000:
+		clkgdv = 71;
+		egold_rate = FRQ_8000;
+		break;
+	case 11025:
+		clkgdv = 51;
+		egold_rate = FRQ_11025;
+		break;
+	case 12000:
+		clkgdv = 47;
+		egold_rate = FRQ_12000;
+		break;
+	case 16000:
+		clkgdv = 35;
+		egold_rate = FRQ_16000;
+		break;
+	case 22050:
+		clkgdv = 25;
+		egold_rate = FRQ_22050;
+		break;
+	case 24000:
+		clkgdv = 23;
+		egold_rate = FRQ_24000;
+		break;
+	case 32000:
+		clkgdv = 17;
+		egold_rate = FRQ_32000;
+		break;
+	case 44100:
+		clkgdv = 12;
+		egold_rate = FRQ_44100;
+		break;
+	case 48000:
+		clkgdv = 11;
+		egold_rate = FRQ_48000;
+		break;
 	}
 
 	srgr1 = (FWID(DEFAULT_BITPERSAMPLE - 1) | CLKGDV(clkgdv));
@@ -234,8 +261,8 @@ static int __init snd_omap_alsa_egold_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	codec_cfg->hw_constraints_rates	= &egold_hw_constraints_rates;
-	codec_cfg->snd_omap_alsa_playback= &egold_snd_omap_alsa_playback;
-	codec_cfg->snd_omap_alsa_capture  = &egold_snd_omap_alsa_capture;
+	codec_cfg->snd_omap_alsa_playback = &egold_snd_omap_alsa_playback;
+	codec_cfg->snd_omap_alsa_capture = &egold_snd_omap_alsa_capture;
 	codec_cfg->codec_configure_dev	= egold_configure;
 	codec_cfg->codec_set_samplerate	= egold_set_samplerate;
 	codec_cfg->codec_clock_setup	= egold_clock_setup;
@@ -262,7 +289,8 @@ static int __init omap_alsa_egold_init(void)
 {
 	int retval;
 
-	retval = cn_add_callback(&cn_sx1snd_id, cn_sx1snd_name, cn_sx1snd_callback);
+	retval = cn_add_callback(&cn_sx1snd_id, cn_sx1snd_name,
+					cn_sx1snd_callback);
 	if (retval)
 		printk(KERN_WARNING "cn_sx1snd failed to register\n");
 	return platform_driver_register(&omap_alsa_driver);
-- 
1.5.5-rc3.GIT


  reply	other threads:[~2008-04-18  8:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-18  8:00 [PATCH 00/19] Update and clean up on sound/arm/omap/omap-alsa*[c,h] (take #2) Eduardo Valentin
2008-04-18  8:00 ` [PATCH 01/19] Update audio driver for H2 board Eduardo Valentin
2008-04-18  8:00   ` [PATCH 02/19] Code clean-up for include/asm-arm/arch-omap/omap-alsa.h Eduardo Valentin
2008-04-18  8:00     ` [PATCH 03/19] Code clean-up for sound/arm/omap/omap-alsa-aic23.c Eduardo Valentin
2008-04-18  8:00       ` [PATCH 04/19] Code clean-up for sound/arm/omap/omap-alsa-aic23.h Eduardo Valentin
2008-04-18  8:00         ` [PATCH 05/19] Code clean-up for sound/arm/omap/omap-alsa-aic23-mixer.c Eduardo Valentin
2008-04-18  8:00           ` [PATCH 06/19] Code clean-up for sound/arm/omap/omap-alsa-dma.c Eduardo Valentin
2008-04-18  8:00             ` [PATCH 07/19] Code clean-up for sound/arm/omap/omap-alsa-dma.h Eduardo Valentin
2008-04-18  8:00               ` [PATCH 08/19] Code clean-up for sound/arm/omap/omap-alsa-sx1-mixer.c Eduardo Valentin
2008-04-18  8:00                 ` [PATCH 09/19] Code clean-up for sound/arm/omap/omap-alsa-sx1-mixer.h Eduardo Valentin
2008-04-18  8:00                   ` Eduardo Valentin [this message]
2008-04-18  8:00                     ` [PATCH 11/19] Code clean-up for sound/arm/omap/omap-alsa-sx1.h Eduardo Valentin
2008-04-18  8:00                       ` [PATCH 12/19] Code clean-up for sound/arm/omap/omap-alsa-tsc2101-mixer.c Eduardo Valentin
2008-04-18  8:01                         ` [PATCH 13/19] Code clean-up for sound/arm/omap/omap-alsa-tsc2101-mixer.h Eduardo Valentin
2008-04-18  8:01                           ` [PATCH 14/19] Code clean-up for sound/arm/omap/omap-alsa-tsc2101.c Eduardo Valentin
2008-04-18  8:01                             ` [PATCH 15/19] Code clean-up for sound/arm/omap/omap-alsa-tsc2101.h Eduardo Valentin
2008-04-18  8:01                               ` [PATCH 16/19] Code clean-up for sound/arm/omap/omap-alsa-tsc2102-mixer.c Eduardo Valentin
2008-04-18  8:01                                 ` [PATCH 17/19] Code clean-up for sound/arm/omap/omap-alsa-tsc2102.c Eduardo Valentin
2008-04-18  8:01                                   ` [PATCH 18/19] Code clean-up for sound/arm/omap/omap-alsa-tsc2102.h Eduardo Valentin
2008-04-18  8:01                                     ` [PATCH 19/19] Code clean-up for sound/arm/omap/omap-alsa.c Eduardo Valentin
2008-04-23 23:57 ` [PATCH 00/19] Update and clean up on sound/arm/omap/omap-alsa*[c,h] (take #2) Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2008-04-15 14:02 [PATCH 00/19] Update and clean up on sound/arm/omap/omap-alsa*[c,h] Eduardo Valentin
2008-04-15 14:02 ` [PATCH 01/19] Update audio driver for H2 board Eduardo Valentin
2008-04-15 14:02   ` [PATCH 02/19] Code clean-up for sound/arm/omap/omap-alsa.h Eduardo Valentin
2008-04-15 14:02     ` [PATCH 03/19] Code clean-up for sound/arm/omap/omap-alsa-aic23.c Eduardo Valentin
2008-04-15 14:02       ` [PATCH 04/19] Code clean-up for sound/arm/omap/omap-alsa-aic23.h Eduardo Valentin
2008-04-15 14:02         ` [PATCH 05/19] Code clean-up for sound/arm/omap/omap-alsa-aic23-mixer.c Eduardo Valentin
2008-04-15 14:02           ` [PATCH 06/19] Code clean-up for sound/arm/omap/omap-alsa-dma.c Eduardo Valentin
2008-04-15 14:02             ` [PATCH 07/19] Code clean-up for sound/arm/omap/omap-alsa-dma.h Eduardo Valentin
2008-04-15 14:02               ` [PATCH 08/19] Code clean-up for sound/arm/omap/omap-alsa-sx1-mixer.c Eduardo Valentin
2008-04-15 14:02                 ` [PATCH 09/19] Code clean-up for sound/arm/omap/omap-alsa-sx1-mixer.h Eduardo Valentin
2008-04-15 14:02                   ` [PATCH 10/19] Code clean-up for sound/arm/omap/omap-alsa-sx1.c Eduardo Valentin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1208505666-13744-11-git-send-email-edubezval@gmail.com \
    --to=edubezval@gmail.com \
    --cc=eduardo.valentin@indt.org.br \
    --cc=linux-omap@vger.kernel.org \
    --cc=me@felipebalbi.com \
    --cc=ragner.magalhaes@indt.org.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox