All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eliot Blennerhassett <linux@audioscience.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: [PATCH][asihpi] Meter control return peak.
Date: Tue, 17 Jun 2008 13:35:44 +1200	[thread overview]
Message-ID: <200806171335.44469.linux@audioscience.com> (raw)

Use Peak meter instead of Rms meter because it is supported by all card 
families.
Minor checkpatch cleanups.

Signed-off-by: Eliot Blennerhassett <linux@audioscience.com>

---
diff --git a/pci/asihpi/asihpi.c b/pci/asihpi/asihpi.c
index 8cbefab..ab90b08 100644
--- a/pci/asihpi/asihpi.c
+++ b/pci/asihpi/asihpi.c
@@ -383,15 +383,15 @@ static void snd_card_asihpi_pcm_samplerates(struct 
snd_card_asihpi *asihpi,
 		rate_max = 100000;
 	} else {
 		/* on cards without SRC,
-		    valid rates are determined by sampleclock */
+		   valid rates are determined by sampleclock */
 		err = HPI_MixerGetControl(phSubSys, asihpi->hMixer,
 					  HPI_SOURCENODE_CLOCK_SOURCE, 0, 0, 0,
 					  HPI_CONTROL_SAMPLECLOCK, &hControl);
 
 		for (idx = 0; idx < 100; idx++) {
 			if (HPI_ControlQuery(phSubSys, hControl,
-				HPI_SAMPLECLOCK_SAMPLERATE, idx, 0,
-				&sampleRate))
+					HPI_SAMPLECLOCK_SAMPLERATE,
+					idx, 0, &sampleRate))
 				break;
 
 			rate_min = min(rate_min, sampleRate);
@@ -443,7 +443,7 @@ static void snd_card_asihpi_pcm_samplerates(struct 
snd_card_asihpi *asihpi,
 		}
 	}
 
-	/*printk(KERN_INFO "Supported rates %X %d %d\n",
+	/* printk(KERN_INFO "Supported rates %X %d %d\n",
 	   rates, rate_min, rate_max); */
 	pcmhw->rates = rates;
 	pcmhw->rate_min = rate_min;
@@ -885,7 +885,7 @@ static void snd_card_asihpi_playback_format(struct 
snd_card_asihpi *asihpi,
 						u32 hStream,
 						struct snd_pcm_hardware *pcmhw)
 {
-  struct hpi_format hpi_format;
+	struct hpi_format hpi_format;
 	u16 wFormat;
 	u16 err;
 	u32 hControl;
@@ -1126,10 +1126,10 @@ static void snd_card_asihpi_capture_format(struct 
snd_card_asihpi *asihpi,
 	for (wFormat = HPI_FORMAT_PCM8_UNSIGNED;
 		wFormat <= HPI_FORMAT_PCM24_SIGNED; wFormat++) {
 
-		HPI_FormatCreate(
-			&hpi_format, 2, wFormat, dwSampleRate, 128000, 0);
-
-		err = HPI_InStreamQueryFormat(phSubSys, hStream,
+		HPI_FormatCreate(&hpi_format, 2, wFormat, dwSampleRate,
+						128000, 0);
+		err =
+		    HPI_InStreamQueryFormat(phSubSys, hStream,
 					    &hpi_format);
 		if (!err)
 			pcmhw->formats |=
@@ -2025,7 +2025,7 @@ static int snd_asihpi_meter_get(struct snd_kcontrol 
*kcontrol,
 	short anGain0_01dB[HPI_MAX_CHANNELS], i;
 	u16 err;
 
-	err = HPI_MeterGetRms(phSubSys, hControl, anGain0_01dB);
+	err = HPI_MeterGetPeak(phSubSys, hControl, anGain0_01dB);
 
 	for (i = 0; i < HPI_MAX_CHANNELS; i++) {
 #if ASIHPI_LINEAR_METERS
@@ -2796,7 +2796,7 @@ int __devinit snd_asihpi_probe(struct pci_dev *pci_dev,
 	asihpi->support_mmap = (!err);
 
 	asihpi->support_mrx = (((asihpi->wType & 0xFF00) == 0x8900) ||
-					((asihpi->wType & 0xF000) == 0x6000));
+			((asihpi->wType & 0xF000) == 0x6000));
 
 
 	printk(KERN_INFO "Supports mmap:%d grouping:%d\n",

-- 
--
Eliot Blennerhassett
www.audioscience.com

             reply	other threads:[~2008-06-17  1:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17  1:35 Eliot Blennerhassett [this message]
2008-06-19  8:27 ` [PATCH][asihpi] Meter control return peak Jaroslav Kysela

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=200806171335.44469.linux@audioscience.com \
    --to=linux@audioscience.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.