Alsa-devel
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
September 2008
- 101 participants
- 247 discussions
Titanium is second generation X-Fi, and ALSA has yet to support the
1st generation. It's very unlikely that it will happen anytime soon.
2008/9/10 William Zumwalt <wizumwalt(a)gmail.com>:
> Hi all,
> I have an X-Fi Titanium Fatal1ty card and have been having a really hard
> time trying to get the driver for it installed and was wondering if anyone
> had an idea when this card would be supported by alsa.
> Thanks,
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Alsa-user mailing list
> Alsa-user(a)lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-user
>
>
--
Vedran Miletić
1
0
I've started a new thread to avoid confusion, and copied bits here:
On Monday 08 September 2008 21:51, Mark Brown wrote:
> On Mon, Sep 08, 2008 at 09:27:13PM +0100, Alan Horstmann wrote:
> > With just this one change we have been successful in running the codec
> > over spi. At present we do have an issue with dapm during capture
> > -nothing is being turned on! Any pointers would be appreciated.
>
> If you define DEBUG when building soc-dapm.c (a define at the top of the
> source file will do the trick) then it will be very verbose about the
> decisions it's making - that will normally point out the problem.
> Probably either one of the input controls is not configured to make a
> path from the input pins to the ADC or the input has been mistakenly
> marked as disabled.
That gets us lots of info to digest, and it does look like there are no dapm
capture paths -listing below. What we cannot fathom is why!
Can users of wm8731 confirm successful capture with dapm on any platform? It
is not clear at this stage whether we are looking for a problem on our
platform, or a general bug in the driver dapm code.
Any assistance would be appreciated.
Alan
widget ADC
HiFi Capture stream Capture event 1
widget DAC
HiFi Playback stream Capture event 1
reg old 5f new 5f change 0
reg old 5f new 5f change 0
DAPM WM8731 snd_soc_dapm_stream_event
Ext Spk: Off in 0 out 1
in static LHPOUT
Int Mic: Off in 1 out 0
out static Mic Bias
LLINEIN: Off in 0 out 1
out static Line Input
RLINEIN: Off in 0 out 1
out static Line Input
MICIN: Off in 1 out 0
in static Mic Bias
out static Mic Bias
Mic Bias: Off in 1 out 0
in static Int Mic
in static MICIN
out static MICIN
Line Input: Off in 0 out 1
in static RLINEIN
in static LLINEIN
out Line In Input Mux
Input Mux: Off in 0 out 1
in Line In Line Input
out static ADC
ADC: Off in 0 out 1
in static Input Mux
RHPOUT: Off in 0 out 1
in static Output Mixer
ROUT: Off in 0 out 1
in static Output Mixer
LHPOUT: Off in 0 out 1
in static Output Mixer
out static Ext Spk
LOUT: Off in 0 out 1
in static Output Mixer
DAC: Off in 0 out 4
out HiFi Playback Switch Output Mixer
Output Mixer: Off in 0 out 4
in HiFi Playback Switch DAC
out static LOUT
out static LHPOUT
out static ROUT
out static RHPOUT
2
2
Hi,
I'm trying to get an jukebox application going on a Sony PlayStation3 using
Qt-Embedded, Phonon and PulseAudio. The application is working well on my KDE-
based laptop where it appears that the application is using Phonon -> ALSA ->
PulseAudio. But there is no sound from the application when run on the PS3.
I initially reported this problem to the PulseAudio mailing list. The first
post on this topic is at https://tango.0pointer.de/pipermail/pulseaudio-
discuss/2008-August/002249.html . In pacticular, see these posts:
1) https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008-
September/002346.html where I detail the results of a final test using the
latest development version of PulseAudio; and
2) https://tango.0pointer.de/pipermail/pulseaudio-discuss/2008-
September/002347.html where a PulseAudio developer diagnoses the problem as
being within ALSA.
For convenience, the following is from the latter post:
"So, what happens here is this: your device can only do non-interleaved audio
and is hence configured for it (as we can see from that "slave setup" listing
above). Because your hardware lacks a hardware volume control ALSA puts
"softvol" on top of the hw device: the "Soft Volume PCM" you can see in the
first part. That device is initialized for interleaved audio as you can see.
Which is what PA supports and PA asked for.
Now, if softval takes non-interleaved from below and gives interleaved to the
layer above than it would need to rearrange those samples -- which it however
doesn't actually. PA hence checks with those asserts if the audio data is
properly arranged -- which it is not as we can see.
This is a bug in ALSA's softvol module. Please report this on alsa-devel.
softvol falsely claims to be able to rearrange non-interleaved audio to
interleaved."
Not sure what other information I should post here so I'll wait for any
feedback.
Thanks in advance,
Kevin
4
7
[alsa-devel] [PATCH 1/8] ASoC: Make all codecs depend on rather than selecting I2C
by Mark Brown 09 Sep '08
by Mark Brown 09 Sep '08
09 Sep '08
The I2C layer uses I/O operations that aren't available on all
architectures and since select bypasses Kconfig dependency checking
selecting I2C breaks builds like allmodconfig on some architectures.
Signed-off-by: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
---
sound/soc/codecs/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 5d77dc3..13ae4fd 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1,6 +1,6 @@
config SND_SOC_ALL_CODECS
tristate "Build all ASoC CODEC drivers"
- select I2C
+ depends on I2C
select SPI
select SND_SOC_AK4535
select SND_SOC_UDA1380
--
1.5.6.5
6
20
[alsa-devel] how is 'dir' in snd_pcm_hw_params_set_periods_near() supposed to work?
by Lennart Poettering 09 Sep '08
by Lennart Poettering 09 Sep '08
09 Sep '08
Heya!
How is the 'dir' argument in snd_pcm_hw_params_set_periods_near()
supposed to work?
I'd assume that passing dir=1 would mean that it is looked for a
number of periods that is greater *or equal* to what we request. If we
pass dir=-1 we'd be looking for a number of periods that is smaller
*or equal* to what we request.
However, what I am experiencing is that there is no "or equal". On my
softvol on hda setup here if I ask for 5 periods I will always get 6
if I pass dir=1 -- even if the could give me 5 and will give me five
if I pass dir=0.
The docs don't really elaborate on this much.
I'd certainly think that having ">=" and "<=" here is much more useful
and natural than ">" and "<", and hence I was wondering: is this just
a bug in the software or is it really intended to be this way?
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
2
1
[alsa-devel] [PATCH 09/24] sound/pci: coding style fixes: sound/pci/e*
by Alexander Beregalov 09 Sep '08
by Alexander Beregalov 09 Sep '08
09 Sep '08
- <asm/io.h> -> <linux/io.h>
- remove trailing whitespaces
- convert comments
Only compile tested.
Signed-off-by: Alexander Beregalov <a.beregalov(a)gmail.com>
---
sound/pci/ens1370.c | 60 ++++++++++++++++++++--------------------
sound/pci/es1938.c | 68 +++++++++++++++++++++++-----------------------
sound/pci/es1968.c | 74 +++++++++++++++++++++++++-------------------------
3 files changed, 101 insertions(+), 101 deletions(-)
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c
index 9bf9536..56a8f7c 100644
--- a/sound/pci/ens1370.c
+++ b/sound/pci/ens1370.c
@@ -26,7 +26,7 @@
* by Kurt J. Bosch
*/
-#include <asm/io.h>
+#include <linux/io.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
@@ -467,13 +467,13 @@ MODULE_DEVICE_TABLE(pci, snd_audiopci_ids);
static unsigned int snd_es1370_fixed_rates[] =
{5512, 11025, 22050, 44100};
static struct snd_pcm_hw_constraint_list snd_es1370_hw_constraints_rates = {
- .count = 4,
+ .count = 4,
.list = snd_es1370_fixed_rates,
.mask = 0,
};
static struct snd_ratnum es1370_clock = {
.num = ES_1370_SRCLOCK,
- .den_min = 29,
+ .den_min = 29,
.den_max = 353,
.den_step = 1,
};
@@ -494,7 +494,7 @@ static struct snd_pcm_hw_constraint_ratdens snd_es1371_hw_constraints_dac_clock
};
static struct snd_ratnum es1371_adc_clock = {
.num = 48000 << 15,
- .den_min = 32768,
+ .den_min = 32768,
.den_max = 393216,
.den_step = 1,
};
@@ -542,7 +542,7 @@ static unsigned int snd_es1371_src_read(struct ensoniq * ensoniq, unsigned short
/* now, wait for busy and the correct time to read */
temp = snd_es1371_wait_src_ready(ensoniq);
-
+
if ((temp & 0x00870000) != 0x00010000) {
/* wait for the right state */
for (i = 0; i < POLL_COUNT; i++) {
@@ -552,12 +552,12 @@ static unsigned int snd_es1371_src_read(struct ensoniq * ensoniq, unsigned short
}
}
- /* hide the state bits */
+ /* hide the state bits */
r = orig & (ES_1371_SRC_DISABLE | ES_1371_DIS_P1 |
ES_1371_DIS_P2 | ES_1371_DIS_R1);
r |= ES_1371_SRC_RAM_ADDRO(reg);
outl(r, ES_REG(ensoniq, 1371_SMPRATE));
-
+
return temp;
}
@@ -648,7 +648,7 @@ static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97,
struct ensoniq *ensoniq = ac97->private_data;
unsigned int t, x, fail = 0;
- __again:
+__again:
mutex_lock(&ensoniq->src_mutex);
for (t = 0; t < POLL_COUNT; t++) {
if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP)) {
@@ -677,7 +677,7 @@ static unsigned short snd_es1371_codec_read(struct snd_ac97 *ac97,
/* wait for WIP again */
for (t = 0; t < POLL_COUNT; t++) {
if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP))
- break;
+ break;
}
/* now wait for the stinkin' data (RDY) */
for (t = 0; t < POLL_COUNT; t++) {
@@ -1053,7 +1053,7 @@ static struct snd_pcm_hardware snd_ensoniq_playback1 =
SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
#else
(SNDRV_PCM_RATE_KNOT | /* 5512Hz rate */
- SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_22050 |
+ SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_22050 |
SNDRV_PCM_RATE_44100),
#endif
.rate_min = 4000,
@@ -1072,7 +1072,7 @@ static struct snd_pcm_hardware snd_ensoniq_playback2 =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
- SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE |
+ SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE |
SNDRV_PCM_INFO_SYNC_START),
.formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
.rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
@@ -1424,7 +1424,7 @@ static int snd_es1371_spdif_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
-
+
spin_lock_irq(&ensoniq->reg_lock);
ucontrol->value.integer.value[0] = ensoniq->ctrl & ES_1373_SPDIF_THRU ? 1 : 0;
spin_unlock_irq(&ensoniq->reg_lock);
@@ -1437,7 +1437,7 @@ static int snd_es1371_spdif_put(struct snd_kcontrol *kcontrol,
struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
unsigned int nval1, nval2;
int change;
-
+
nval1 = ucontrol->value.integer.value[0] ? ES_1373_SPDIF_THRU : 0;
nval2 = ucontrol->value.integer.value[0] ? ES_1373_SPDIF_EN : 0;
spin_lock_irq(&ensoniq->reg_lock);
@@ -1487,7 +1487,7 @@ static int snd_es1373_rear_get(struct snd_kcontrol *kcontrol,
{
struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
int val = 0;
-
+
spin_lock_irq(&ensoniq->reg_lock);
if ((ensoniq->cssr & (ES_1373_REAR_BIT27|ES_1373_REAR_BIT26|
ES_1373_REAR_BIT24)) == ES_1373_REAR_BIT26)
@@ -1503,7 +1503,7 @@ static int snd_es1373_rear_put(struct snd_kcontrol *kcontrol,
struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
unsigned int nval1;
int change;
-
+
nval1 = ucontrol->value.integer.value[0] ?
ES_1373_REAR_BIT26 : (ES_1373_REAR_BIT27|ES_1373_REAR_BIT24);
spin_lock_irq(&ensoniq->reg_lock);
@@ -1532,7 +1532,7 @@ static int snd_es1373_line_get(struct snd_kcontrol *kcontrol,
{
struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
int val = 0;
-
+
spin_lock_irq(&ensoniq->reg_lock);
if ((ensoniq->ctrl & ES_1371_GPIO_OUTM) >= 4)
val = 1;
@@ -1547,7 +1547,7 @@ static int snd_es1373_line_put(struct snd_kcontrol *kcontrol,
struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
int changed;
unsigned int ctrl;
-
+
spin_lock_irq(&ensoniq->reg_lock);
ctrl = ensoniq->ctrl;
if (ucontrol->value.integer.value[0])
@@ -1690,7 +1690,7 @@ static int snd_ensoniq_control_get(struct snd_kcontrol *kcontrol,
{
struct ensoniq *ensoniq = snd_kcontrol_chip(kcontrol);
int mask = kcontrol->private_value;
-
+
spin_lock_irq(&ensoniq->reg_lock);
ucontrol->value.integer.value[0] = ensoniq->ctrl & mask ? 1 : 0;
spin_unlock_irq(&ensoniq->reg_lock);
@@ -1704,7 +1704,7 @@ static int snd_ensoniq_control_put(struct snd_kcontrol *kcontrol,
int mask = kcontrol->private_value;
unsigned int nval;
int change;
-
+
nval = ucontrol->value.integer.value[0] ? mask : 0;
spin_lock_irq(&ensoniq->reg_lock);
change = (ensoniq->ctrl & mask) != nval;
@@ -1864,7 +1864,7 @@ static inline void snd_ensoniq_free_gameport(struct ensoniq *ensoniq) { }
*/
-static void snd_ensoniq_proc_read(struct snd_info_entry *entry,
+static void snd_ensoniq_proc_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
struct ensoniq *ensoniq = entry->private_data;
@@ -1891,7 +1891,7 @@ static void __devinit snd_ensoniq_proc_init(struct ensoniq * ensoniq)
{
struct snd_info_entry *entry;
- if (! snd_card_proc_new(ensoniq->card, "audiopci", &entry))
+ if (!snd_card_proc_new(ensoniq->card, "audiopci", &entry))
snd_info_set_text_ops(entry, ensoniq, snd_ensoniq_proc_read);
}
@@ -1914,7 +1914,7 @@ static int snd_ensoniq_free(struct ensoniq *ensoniq)
if (ensoniq->irq >= 0)
synchronize_irq(ensoniq->irq);
pci_set_power_state(ensoniq->pci, 3);
- __hw_end:
+__hw_end:
#ifdef CHIP1370
if (ensoniq->dma_bug.area)
snd_dma_free_pages(&ensoniq->dma_bug);
@@ -1982,7 +1982,7 @@ static void snd_ensoniq_chip_init(struct ensoniq *ensoniq)
udelay(20);
outl(ensoniq->ctrl, ES_REG(ensoniq, CONTROL));
/* Init the sample rate converter */
- snd_es1371_wait_src_ready(ensoniq);
+ snd_es1371_wait_src_ready(ensoniq);
outl(ES_1371_SRC_DISABLE, ES_REG(ensoniq, 1371_SMPRATE));
for (idx = 0; idx < 0x80; idx++)
snd_es1371_src_write(ensoniq, idx, 0);
@@ -2021,13 +2021,13 @@ static int snd_ensoniq_suspend(struct pci_dev *pci, pm_message_t state)
{
struct snd_card *card = pci_get_drvdata(pci);
struct ensoniq *ensoniq = card->private_data;
-
+
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
snd_pcm_suspend_all(ensoniq->pcm1);
snd_pcm_suspend_all(ensoniq->pcm2);
-
-#ifdef CHIP1371
+
+#ifdef CHIP1371
snd_ac97_suspend(ensoniq->u.es1371.ac97);
#else
/* try to reset AK4531 */
@@ -2038,7 +2038,7 @@ static int snd_ensoniq_suspend(struct pci_dev *pci, pm_message_t state)
inw(ES_REG(ensoniq, 1370_CODEC));
udelay(100);
snd_ak4531_suspend(ensoniq->u.es1370.ak4531);
-#endif
+#endif
pci_disable_device(pci);
pci_save_state(pci);
@@ -2063,11 +2063,11 @@ static int snd_ensoniq_resume(struct pci_dev *pci)
snd_ensoniq_chip_init(ensoniq);
-#ifdef CHIP1371
+#ifdef CHIP1371
snd_ac97_resume(ensoniq->u.es1371.ac97);
#else
snd_ak4531_resume(ensoniq->u.es1370.ak4531);
-#endif
+#endif
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
@@ -2482,7 +2482,7 @@ static struct pci_driver driver = {
.resume = snd_ensoniq_resume,
#endif
};
-
+
static int __init alsa_card_ens137x_init(void)
{
return pci_register_driver(&driver);
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c
index 4cd9a1f..87effdc 100644
--- a/sound/pci/es1938.c
+++ b/sound/pci/es1938.c
@@ -5,7 +5,7 @@
* Thomas Sailer <sailer(a)ife.ee.ethz.ch>,
* Abramo Bagnara <abramo(a)alsa-project.org>,
* Markus Gruber <gruber(a)eikon.tum.de>
- *
+ *
* Rewritten from sonicvibes.c source.
*
* TODO:
@@ -63,7 +63,7 @@
#include <sound/initval.h>
#include <sound/tlv.h>
-#include <asm/io.h>
+#include <linux/io.h>
MODULE_AUTHOR("Jaromir Koutek <miri(a)punknet.cz>");
MODULE_DESCRIPTION("ESS Solo-1");
@@ -167,7 +167,7 @@ MODULE_PARM_DESC(enable, "Enable ESS Solo-1 soundcard.");
#define ESS_CMD_SETFORMAT2 0xb7
#define ESS_CMD_DMACONTROL 0xb8
#define ESS_CMD_DMATYPE 0xb9
-#define ESS_CMD_OFFSETLEFT 0xba
+#define ESS_CMD_OFFSETLEFT 0xba
#define ESS_CMD_OFFSETRIGHT 0xbb
#define ESS_CMD_READREG 0xc0
#define ESS_CMD_ENABLEEXT 0xc6
@@ -418,7 +418,7 @@ static void snd_es1938_reset(struct es1938 *chip)
}
snd_printk(KERN_ERR "ESS Solo-1 reset failed\n");
- __next:
+__next:
snd_es1938_write_cmd(chip, ESS_CMD_ENABLEEXT);
/* Demand transfer DMA: 4 bytes per DMA request */
@@ -426,7 +426,7 @@ static void snd_es1938_reset(struct es1938 *chip)
/* Change behaviour of register A1
4x oversampling
- 2nd channel DAC asynchronous */
+ 2nd channel DAC asynchronous */
snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2MODE, 0x32);
/* enable/select DMA channel and IRQ channel */
snd_es1938_bits(chip, ESS_CMD_IRQCONTROL, 0xf0, 0x50);
@@ -469,7 +469,7 @@ static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = {
};
-static void snd_es1938_rate_set(struct es1938 *chip,
+static void snd_es1938_rate_set(struct es1938 *chip,
struct snd_pcm_substream *substream,
int mode)
{
@@ -482,7 +482,7 @@ static void snd_es1938_rate_set(struct es1938 *chip,
/* set filter register */
div0 = 256 - 7160000*20/(8*82*runtime->rate);
-
+
if (mode == DAC2) {
snd_es1938_mixer_write(chip, 0x70, bits);
snd_es1938_mixer_write(chip, 0x72, div0);
@@ -650,7 +650,7 @@ static int snd_es1938_capture_prepare(struct snd_pcm_substream *substream)
chip->dma1_shift = 2 - mono - is8;
snd_es1938_reset_fifo(chip);
-
+
/* program type */
snd_es1938_bits(chip, ESS_CMD_ANALOGCONTROL, 0x03, (mono ? 2 : 1));
@@ -663,12 +663,12 @@ static int snd_es1938_capture_prepare(struct snd_pcm_substream *substream)
/* initialize and configure ADC */
snd_es1938_write(chip, ESS_CMD_SETFORMAT2, u ? 0x51 : 0x71);
- snd_es1938_write(chip, ESS_CMD_SETFORMAT2, 0x90 |
- (u ? 0x00 : 0x20) |
- (is8 ? 0x00 : 0x04) |
+ snd_es1938_write(chip, ESS_CMD_SETFORMAT2, 0x90 |
+ (u ? 0x00 : 0x20) |
+ (is8 ? 0x00 : 0x04) |
(mono ? 0x40 : 0x08));
- // snd_es1938_reset_fifo(chip);
+ /* snd_es1938_reset_fifo(chip); */
/* 11. configure system interrupt controller and DMA controller */
snd_es1938_capture_setdma(chip);
@@ -713,7 +713,7 @@ static int snd_es1938_playback1_prepare(struct snd_pcm_substream *substream)
/* program DMA */
snd_es1938_playback1_setdma(chip);
-
+
return 0;
}
@@ -735,10 +735,10 @@ static int snd_es1938_playback2_prepare(struct snd_pcm_substream *substream)
chip->dma1_shift = 2 - mono - is8;
count = 0x10000 - count;
-
+
/* reset */
snd_es1938_reset_fifo(chip);
-
+
snd_es1938_bits(chip, ESS_CMD_ANALOGCONTROL, 0x03, (mono ? 2 : 1));
/* set clock and counters */
@@ -749,13 +749,13 @@ static int snd_es1938_playback2_prepare(struct snd_pcm_substream *substream)
/* initialized and configure DAC */
snd_es1938_write(chip, ESS_CMD_SETFORMAT, u ? 0x80 : 0x00);
snd_es1938_write(chip, ESS_CMD_SETFORMAT, u ? 0x51 : 0x71);
- snd_es1938_write(chip, ESS_CMD_SETFORMAT2,
+ snd_es1938_write(chip, ESS_CMD_SETFORMAT2,
0x90 | (mono ? 0x40 : 0x08) |
(is8 ? 0x00 : 0x04) | (u ? 0x00 : 0x20));
/* program DMA */
snd_es1938_playback2_setdma(chip);
-
+
return 0;
}
@@ -1036,7 +1036,7 @@ static int __devinit snd_es1938_new_pcm(struct es1938 *chip, int device)
return err;
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_es1938_playback_ops);
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_es1938_capture_ops);
-
+
pcm->private_data = chip;
pcm->info_flags = 0;
strcpy(pcm->name, "ESS Solo-1");
@@ -1049,7 +1049,7 @@ static int __devinit snd_es1938_new_pcm(struct es1938 *chip, int device)
}
/* -------------------------------------------------------------------
- *
+ *
* *** Mixer part ***
*/
@@ -1083,7 +1083,7 @@ static int snd_es1938_put_mux(struct snd_kcontrol *kcontrol,
{
struct es1938 *chip = snd_kcontrol_chip(kcontrol);
unsigned char val = ucontrol->value.enumerated.item[0];
-
+
if (val > 7)
return -EINVAL;
return snd_es1938_mixer_bits(chip, 0x1c, 0x07, val) != val;
@@ -1207,7 +1207,7 @@ static int snd_es1938_get_single(struct snd_kcontrol *kcontrol,
int mask = (kcontrol->private_value >> 16) & 0xff;
int invert = (kcontrol->private_value >> 24) & 0xff;
int val;
-
+
val = snd_es1938_reg_read(chip, reg);
ucontrol->value.integer.value[0] = (val >> shift) & mask;
if (invert)
@@ -1224,7 +1224,7 @@ static int snd_es1938_put_single(struct snd_kcontrol *kcontrol,
int mask = (kcontrol->private_value >> 16) & 0xff;
int invert = (kcontrol->private_value >> 24) & 0xff;
unsigned char val;
-
+
val = (ucontrol->value.integer.value[0] & mask);
if (invert)
val = mask - val;
@@ -1270,7 +1270,7 @@ static int snd_es1938_get_double(struct snd_kcontrol *kcontrol,
int mask = (kcontrol->private_value >> 24) & 0xff;
int invert = (kcontrol->private_value >> 22) & 1;
unsigned char left, right;
-
+
left = snd_es1938_reg_read(chip, left_reg);
if (left_reg != right_reg)
right = snd_es1938_reg_read(chip, right_reg);
@@ -1297,7 +1297,7 @@ static int snd_es1938_put_double(struct snd_kcontrol *kcontrol,
int invert = (kcontrol->private_value >> 22) & 1;
int change;
unsigned char val1, val2, mask1, mask2;
-
+
val1 = ucontrol->value.integer.value[0] & mask;
val2 = ucontrol->value.integer.value[1] & mask;
if (invert) {
@@ -1315,7 +1315,7 @@ static int snd_es1938_put_double(struct snd_kcontrol *kcontrol,
if (snd_es1938_reg_bits(chip, right_reg, mask2, val2) != val2)
change = 1;
} else {
- change = (snd_es1938_reg_bits(chip, left_reg, mask1 | mask2,
+ change = (snd_es1938_reg_bits(chip, left_reg, mask1 | mask2,
val1 | val2) != (val1 | val2));
}
return change;
@@ -1675,7 +1675,7 @@ static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id)
#if 0
printk("Es1938debug - interrupt status: =0x%x\n", status);
#endif
-
+
/* AUDIO 1 */
if (status & 0x10) {
#if 0
@@ -1695,7 +1695,7 @@ static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id)
else if (chip->active & DAC1)
snd_pcm_period_elapsed(chip->playback2_substream);
}
-
+
/* AUDIO 2 */
if (status & 0x20) {
#if 0
@@ -1731,10 +1731,10 @@ static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id)
/* MPU401 */
if (status & 0x80) {
- // the following line is evil! It switches off MIDI interrupt handling after the first interrupt received.
- // replacing the last 0 by 0x40 works for ESS-Solo1, but just doing nothing works as well!
- // andreas(a)flying-snail.de
- // snd_es1938_mixer_bits(chip, ESSSB_IREG_MPU401CONTROL, 0x40, 0); /* ack? */
+ /* the following line is evil! It switches off MIDI interrupt handling after the first interrupt received. */
+ /* replacing the last 0 by 0x40 works for ESS-Solo1, but just doing nothing works as well! */
+ /* andreas(a)flying-snail.de */
+ /* snd_es1938_mixer_bits(chip, ESSSB_IREG_MPU401CONTROL, 0x40, 0); ack? */
if (chip->rmidi) {
handled = 1;
snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data);
@@ -1781,7 +1781,7 @@ static int __devinit snd_es1938_mixer(struct es1938 *chip)
}
return 0;
}
-
+
static int __devinit snd_es1938_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
@@ -1851,8 +1851,8 @@ static int __devinit snd_es1938_probe(struct pci_dev *pci,
chip->irq, 0, &chip->rmidi) < 0) {
printk(KERN_ERR "es1938: unable to initialize MPU-401\n");
} else {
- // this line is vital for MIDI interrupt handling on ess-solo1
- // andreas(a)flying-snail.de
+ /* this line is vital for MIDI interrupt handling on ess-solo1 */
+ /* andreas(a)flying-snail.de */
snd_es1938_mixer_bits(chip, ESSSB_IREG_MPU401CONTROL, 0x40, 0x40);
}
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index 20ee759..46c383f 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -2,7 +2,7 @@
* Driver for ESS Maestro 1/2/2E Sound Card (started 21.8.99)
* Copyright (c) by Matze Braun <MatzeBraun(a)gmx.de>.
* Takashi Iwai <tiwai(a)suse.de>
- *
+ *
* Most of the driver code comes from Zach Brown(zab(a)redhat.com)
* Alan Cox OSS Driver
* Rewritted from card-es1938.c source.
@@ -29,7 +29,7 @@
*
* Hardware Description
*
- * A working Maestro setup contains the Maestro chip wired to a
+ * A working Maestro setup contains the Maestro chip wired to a
* codec or 2. In the Maestro we have the APUs, the ASSP, and the
* Wavecache. The APUs can be though of as virtual audio routing
* channels. They can take data from a number of sources and perform
@@ -38,7 +38,7 @@
* APUs. The ASSP is a wacky DSP like device that ESS is loth
* to release docs on. Thankfully it isn't required on the Maestro
* until you start doing insane things like FM emulation and surround
- * encoding. The codecs are almost always AC-97 compliant codecs,
+ * encoding. The codecs are almost always AC-97 compliant codecs,
* but it appears that early Maestros may have had PT101 (an ESS
* part?) wired to them. The only real difference in the Maestro
* families is external goop like docking capability, memory for
@@ -76,7 +76,7 @@
* on open time. The sonicvibes OSS routines we inherited really want
* power of 2 buffers, so we have all those next to each other, then
* 512 byte regions for the recording wavecaches. This ends up
- * wasting quite a bit of memory. The only fixes I can see would be
+ * wasting quite a bit of memory. The only fixes I can see would be
* getting a kernel allocator that could work in zones, or figuring out
* just how to coerce the WP into doing what we want.
*
@@ -86,7 +86,7 @@
* like the APU interface that is indirect registers gotten at through
* the main maestro indirection. Ouch. We spinlock around the actual
* ports on a per card basis. This means spinlock activity at each IO
- * operation, but the only IO operation clusters are in non critical
+ * operation, but the only IO operation clusters are in non critical
* paths and it makes the code far easier to follow. Interrupts are
* blocked while holding the locks because the int handler has to
* get at some of them :(. The mixer interface doesn't, however.
@@ -94,7 +94,7 @@
* places.
*/
-#include <asm/io.h>
+#include <linux/io.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
@@ -896,7 +896,7 @@ snd_es1968_calc_bob_rate(struct es1968 *chip, struct esschan *es,
static u32 snd_es1968_compute_rate(struct es1968 *chip, u32 freq)
{
u32 rate = (freq << 16) / chip->clock;
-#if 0 /* XXX: do we need this? */
+#if 0 /* XXX: do we need this? */
if (rate > 0x10000)
rate = 0x10000;
#endif
@@ -971,7 +971,7 @@ static void snd_es1968_program_wavecache(struct es1968 *chip, struct esschan *es
{
u32 tmpval = (addr - 0x10) & 0xFFF8;
- if (! capture) {
+ if (!capture) {
if (!(es->fmt & ESS_FMT_16BIT))
tmpval |= 4; /* 8bit */
if (es->fmt & ESS_FMT_STEREO)
@@ -1059,7 +1059,7 @@ static void snd_es1968_playback_setup(struct es1968 *chip, struct esschan *es,
and not the APU Regs 4-5. */
apu_set_register(chip, apu, 10,
0x8F00 | (channel ? 0 : 0x10));
- es->apu_mode[channel] += 1; /* stereo */
+ es->apu_mode[channel]++; /* stereo */
} else
apu_set_register(chip, apu, 10, 0x8F08);
}
@@ -1255,7 +1255,7 @@ static int snd_es1968_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
- if (! es->running)
+ if (!es->running)
break;
snd_es1968_pcm_stop(chip, es);
es->running = 0;
@@ -1273,7 +1273,7 @@ static snd_pcm_uframes_t snd_es1968_pcm_pointer(struct snd_pcm_substream *substr
unsigned int ptr;
ptr = snd_es1968_get_dma_ptr(chip, es) << es->wav_shift;
-
+
return bytes_to_frames(substream->runtime, ptr % es->dma_size);
}
@@ -1407,7 +1407,7 @@ static void snd_es1968_free_dmabuf(struct es1968 *chip)
{
struct list_head *p;
- if (! chip->dma.area)
+ if (!chip->dma.area)
return;
snd_dma_reserve_buf(&chip->dma, snd_dma_pci_buf_id(chip->pci));
while ((p = chip->buf_list.next) != &chip->buf_list) {
@@ -1425,11 +1425,11 @@ snd_es1968_init_dmabuf(struct es1968 *chip)
chip->dma.dev.type = SNDRV_DMA_TYPE_DEV;
chip->dma.dev.dev = snd_dma_pci_data(chip->pci);
- if (! snd_dma_get_reserved_buf(&chip->dma, snd_dma_pci_buf_id(chip->pci))) {
+ if (!snd_dma_get_reserved_buf(&chip->dma, snd_dma_pci_buf_id(chip->pci))) {
err = snd_dma_alloc_pages_fallback(SNDRV_DMA_TYPE_DEV,
snd_dma_pci_data(chip->pci),
chip->total_bufsize, &chip->dma);
- if (err < 0 || ! chip->dma.area) {
+ if (err < 0 || !chip->dma.area) {
snd_printk(KERN_ERR "es1968: can't allocate dma pages for size %d\n",
chip->total_bufsize);
return -ENOMEM;
@@ -1478,7 +1478,7 @@ static int snd_es1968_hw_params(struct snd_pcm_substream *substream,
}
chan->memory = snd_es1968_new_memory(chip, size);
if (chan->memory == NULL) {
- // snd_printd("cannot allocate dma buffer: size = %d\n", size);
+ /* snd_printd("cannot allocate dma buffer: size = %d\n", size); */
return -ENOMEM;
}
snd_pcm_set_runtime_buffer(substream, &chan->memory->buf);
@@ -1491,7 +1491,7 @@ static int snd_es1968_hw_free(struct snd_pcm_substream *substream)
struct es1968 *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
struct esschan *chan;
-
+
if (runtime->private_data == NULL)
return 0;
chan = runtime->private_data;
@@ -1586,7 +1586,7 @@ static int snd_es1968_capture_open(struct snd_pcm_substream *substream)
snd_es1968_free_apu_pair(chip, apu1);
return apu2;
}
-
+
es = kzalloc(sizeof(*es), GFP_KERNEL);
if (!es) {
snd_es1968_free_apu_pair(chip, apu1);
@@ -1854,7 +1854,7 @@ static void snd_es1968_update_pcm(struct es1968 *chip, struct esschan *es)
unsigned int hwptr;
unsigned int diff;
struct snd_pcm_substream *subs = es->substream;
-
+
if (subs == NULL || !es->running)
return;
@@ -1895,7 +1895,7 @@ static void es1968_update_hw_volume(unsigned long private_data)
if (chip->in_suspend)
return;
- if (! chip->master_switch || ! chip->master_volume)
+ if (!chip->master_switch || ! chip->master_volume)
return;
/* FIXME: we can't call snd_ac97_* functions since here is in tasklet. */
@@ -2038,7 +2038,7 @@ static void snd_es1968_ac97_reset(struct es1968 *chip)
/* save configuration */
save_ringbus_a = inw(ioaddr + 0x36);
- //outw(inw(ioaddr + 0x38) & 0xfffc, ioaddr + 0x38); /* clear second codec id? */
+ /* outw(inw(ioaddr + 0x38) & 0xfffc, ioaddr + 0x38); clear second codec id? */
/* set command/status address i/o to 1st codec */
outw(inw(ioaddr + 0x3a) & 0xfffc, ioaddr + 0x3a);
outw(inw(ioaddr + 0x3c) & 0xfffc, ioaddr + 0x3c);
@@ -2072,7 +2072,7 @@ static void snd_es1968_ac97_reset(struct es1968 *chip)
udelay(20);
outw(0x0009, ioaddr + 0x60); /* write 9 to gpio */
msleep(500);
- //outw(inw(ioaddr + 0x38) & 0xfffc, ioaddr + 0x38);
+ /* outw(inw(ioaddr + 0x38) & 0xfffc, ioaddr + 0x38); */
outw(inw(ioaddr + 0x3a) & 0xfffc, ioaddr + 0x3a);
outw(inw(ioaddr + 0x3c) & 0xfffc, ioaddr + 0x3c);
@@ -2154,15 +2154,15 @@ static void snd_es1968_chip_init(struct es1968 *chip)
/* We used to muck around with pci config space that
* we had no business messing with. We don't know enough
- * about the machine to know which DMA mode is appropriate,
+ * about the machine to know which DMA mode is appropriate,
* etc. We were guessing wrong on some machines and making
* them unhappy. We now trust in the BIOS to do things right,
* which almost certainly means a new host of problems will
- * arise with broken BIOS implementations. screw 'em.
+ * arise with broken BIOS implementations. screw 'em.
* We're already intolerant of machines that don't assign
* IRQs.
*/
-
+
/* Config Reg A */
pci_read_config_word(pci, ESM_CONFIG_A, &w);
@@ -2172,7 +2172,7 @@ static void snd_es1968_chip_init(struct es1968 *chip)
w |= POST_WRITE; /* Posted write */
w |= PCI_TIMING; /* PCI timing on */
/* XXX huh? claims to be reserved.. */
- w &= ~SWAP_LR; /* swap left/right
+ w &= ~SWAP_LR; /* swap left/right
seems to only have effect on SB
Emulation */
w &= ~SUBTR_DECODE; /* Subtractive decode off */
@@ -2223,7 +2223,7 @@ static void snd_es1968_chip_init(struct es1968 *chip)
w|=1<<3; /* Turn on 978 hardware volume control. */
w&=~(1<<11); /* Turn on 978 mixer volume control. */
pci_write_config_word(pci, 0x58, w);
-
+
/* Sound Reset */
snd_es1968_reset(chip);
@@ -2241,14 +2241,14 @@ static void snd_es1968_chip_init(struct es1968 *chip)
/*
* Reset the CODEC
*/
-
+
snd_es1968_ac97_reset(chip);
/* Ring Bus Control B */
n = inl(iobase + ESM_RING_BUS_CONTR_B);
n &= ~RINGB_EN_SPDIF; /* SPDIF off */
- //w |= RINGB_EN_2CODEC; /* enable 2nd codec */
+ /* w |= RINGB_EN_2CODEC; enable 2nd codec */
outl(n, iobase + ESM_RING_BUS_CONTR_B);
/* Set hardware volume control registers to midpoints.
@@ -2306,7 +2306,7 @@ static void snd_es1968_chip_init(struct es1968 *chip)
maestro_write(chip, 0x0D, 0x7632);
- /* Wave cache control on - test off, sg off,
+ /* Wave cache control on - test off, sg off,
enable, enable extra chans 1Mb */
w = inw(iobase + WC_CONTROL);
@@ -2353,7 +2353,7 @@ static int es1968_suspend(struct pci_dev *pci, pm_message_t state)
struct snd_card *card = pci_get_drvdata(pci);
struct es1968 *chip = card->private_data;
- if (! chip->do_pm)
+ if (!chip->do_pm)
return 0;
chip->in_suspend = 1;
@@ -2374,7 +2374,7 @@ static int es1968_resume(struct pci_dev *pci)
struct es1968 *chip = card->private_data;
struct esschan *es;
- if (! chip->do_pm)
+ if (!chip->do_pm)
return 0;
/* restore all our config */
@@ -2390,7 +2390,7 @@ static int es1968_resume(struct pci_dev *pci)
snd_es1968_chip_init(chip);
- /* need to restore the base pointers.. */
+ /* need to restore the base pointers.. */
if (chip->dma.addr) {
/* set PCMBAR */
wave_set_register(chip, 0x01FC, chip->dma.addr >> 12);
@@ -2547,7 +2547,7 @@ static int __devinit snd_es1968_create(struct snd_card *card,
}
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
- if (! chip) {
+ if (!chip) {
pci_disable_device(pci);
return -ENOMEM;
}
@@ -2581,7 +2581,7 @@ static int __devinit snd_es1968_create(struct snd_card *card,
return -EBUSY;
}
chip->irq = pci->irq;
-
+
/* Clear Maestro_map */
for (i = 0; i < 32; i++)
chip->maestro_map[i] = 0;
@@ -2648,14 +2648,14 @@ static int __devinit snd_es1968_probe(struct pci_dev *pci,
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
if (!card)
return -ENOMEM;
-
+
if (total_bufsize[dev] < 128)
total_bufsize[dev] = 128;
if (total_bufsize[dev] > 4096)
total_bufsize[dev] = 4096;
if ((err = snd_es1968_create(card, pci,
total_bufsize[dev] * 1024, /* in bytes */
- pcm_substreams_p[dev],
+ pcm_substreams_p[dev],
pcm_substreams_c[dev],
pci_id->driver_data,
use_pm[dev],
@@ -2716,7 +2716,7 @@ static int __devinit snd_es1968_probe(struct pci_dev *pci,
snd_es1968_start_irq(chip);
chip->clock = clock[dev];
- if (! chip->clock)
+ if (!chip->clock)
es1968_measure_clock(chip);
sprintf(card->longname, "%s at 0x%lx, irq %i",
1
0
09 Sep '08
- <asm/io.h> -> <linux/io.h>
- remove trailing whitespaces
- convert comments
Only compile tested.
Signed-off-by: Alexander Beregalov <a.beregalov(a)gmail.com>
---
sound/pci/ymfpci/ymfpci_main.c | 98 ++++++++++++++++++++--------------------
1 files changed, 49 insertions(+), 49 deletions(-)
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 90d0d62..baf64b9 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -36,7 +36,7 @@
#include <sound/asoundef.h>
#include <sound/mpu401.h>
-#include <asm/io.h>
+#include <linux/io.h>
#include <asm/byteorder.h>
/*
@@ -79,7 +79,7 @@ static int snd_ymfpci_codec_ready(struct snd_ymfpci *chip, int secondary)
{
unsigned long end_time;
u32 reg = secondary ? YDSXGR_SECSTATUSADR : YDSXGR_PRISTATUSADR;
-
+
end_time = jiffies + msecs_to_jiffies(750);
do {
if ((snd_ymfpci_readw(chip, reg) & 0x8000) == 0)
@@ -94,7 +94,7 @@ static void snd_ymfpci_codec_write(struct snd_ac97 *ac97, u16 reg, u16 val)
{
struct snd_ymfpci *chip = ac97->private_data;
u32 cmd;
-
+
snd_ymfpci_codec_ready(chip, 0);
cmd = ((YDSXG_AC97WRITECMD | reg) << 16) | val;
snd_ymfpci_writel(chip, YDSXGR_AC97CMDDATA, cmd);
@@ -145,7 +145,7 @@ static u32 snd_ymfpci_calc_lpfK(u32 rate)
0x00570000, 0x06AA0000, 0x18B20000, 0x20930000,
0x2B9A0000, 0x35A10000, 0x3EAA0000, 0x40000000
};
-
+
if (rate == 44100)
return 0x40000000; /* FIXME: What's the right value? */
for (i = 0; i < 8; i++)
@@ -161,7 +161,7 @@ static u32 snd_ymfpci_calc_lpfQ(u32 rate)
0x35280000, 0x34A70000, 0x32020000, 0x31770000,
0x31390000, 0x31C90000, 0x33D00000, 0x40000000
};
-
+
if (rate == 44100)
return 0x370A0000;
for (i = 0; i < 8; i++)
@@ -184,7 +184,7 @@ static void snd_ymfpci_hw_start(struct snd_ymfpci *chip)
snd_ymfpci_writel(chip, YDSXGR_MODE,
snd_ymfpci_readl(chip, YDSXGR_MODE) | 3);
chip->active_bank = snd_ymfpci_readl(chip, YDSXGR_CTRLSELECT) & 1;
- __end:
+__end:
spin_unlock_irqrestore(&chip->reg_lock, flags);
}
@@ -206,7 +206,7 @@ static void snd_ymfpci_hw_stop(struct snd_ymfpci *chip)
atomic_set(&chip->interrupt_sleep_count, 0);
wake_up(&chip->interrupt_sleep);
}
- __end:
+__end:
spin_unlock_irqrestore(&chip->reg_lock, flags);
}
@@ -220,7 +220,7 @@ static int voice_alloc(struct snd_ymfpci *chip,
{
struct snd_ymfpci_voice *voice, *voice2;
int idx;
-
+
*rvoice = NULL;
for (idx = 0; idx < YDSXG_PLAYBACK_VOICES; idx += pair ? 2 : 1) {
voice = &chip->voices[idx];
@@ -258,12 +258,12 @@ static int snd_ymfpci_voice_alloc(struct snd_ymfpci *chip,
{
unsigned long flags;
int result;
-
+
if (snd_BUG_ON(!rvoice))
return -EINVAL;
if (snd_BUG_ON(pair && type != YMFPCI_PCM))
return -EINVAL;
-
+
spin_lock_irqsave(&chip->voice_lock, flags);
for (;;) {
result = voice_alloc(chip, type, pair, rvoice);
@@ -272,14 +272,14 @@ static int snd_ymfpci_voice_alloc(struct snd_ymfpci *chip,
/* TODO: synth/midi voice deallocation */
break;
}
- spin_unlock_irqrestore(&chip->voice_lock, flags);
- return result;
+ spin_unlock_irqrestore(&chip->voice_lock, flags);
+ return result;
}
static int snd_ymfpci_voice_free(struct snd_ymfpci *chip, struct snd_ymfpci_voice *pvoice)
{
unsigned long flags;
-
+
if (snd_BUG_ON(!pvoice))
return -EINVAL;
snd_ymfpci_hw_stop(chip);
@@ -303,7 +303,7 @@ static void snd_ymfpci_pcm_interrupt(struct snd_ymfpci *chip, struct snd_ymfpci_
{
struct snd_ymfpci_pcm *ypcm;
u32 pos, delta;
-
+
if ((ypcm = voice->ypcm) == NULL)
return;
if (ypcm->substream == NULL)
@@ -318,7 +318,7 @@ static void snd_ymfpci_pcm_interrupt(struct snd_ymfpci *chip, struct snd_ymfpci_
ypcm->period_pos += delta;
ypcm->last_pos = pos;
if (ypcm->period_pos >= ypcm->period_size) {
- // printk("done - active_bank = 0x%x, start = 0x%x\n", chip->active_bank, voice->bank[chip->active_bank].start);
+ /* printk("done - active_bank = 0x%x, start = 0x%x\n", chip->active_bank, voice->bank[chip->active_bank].start); */
ypcm->period_pos %= ypcm->period_size;
spin_unlock(&chip->reg_lock);
snd_pcm_period_elapsed(ypcm->substream);
@@ -330,7 +330,7 @@ static void snd_ymfpci_pcm_interrupt(struct snd_ymfpci *chip, struct snd_ymfpci_
unsigned int next_bank = 1 - chip->active_bank;
struct snd_ymfpci_playback_bank *bank;
u32 volume;
-
+
bank = &voice->bank[next_bank];
volume = cpu_to_le32(chip->pcm_mixer[subs].left << 15);
bank->left_gain_end = volume;
@@ -354,7 +354,7 @@ static void snd_ymfpci_pcm_capture_interrupt(struct snd_pcm_substream *substream
struct snd_ymfpci_pcm *ypcm = runtime->private_data;
struct snd_ymfpci *chip = ypcm->chip;
u32 pos, delta;
-
+
spin_lock(&chip->reg_lock);
if (ypcm->running) {
pos = le32_to_cpu(chip->bank_capture[ypcm->capture_bank_number][chip->active_bank]->start) >> ypcm->shift;
@@ -366,7 +366,7 @@ static void snd_ymfpci_pcm_capture_interrupt(struct snd_pcm_substream *substream
ypcm->last_pos = pos;
if (ypcm->period_pos >= ypcm->period_size) {
ypcm->period_pos %= ypcm->period_size;
- // printk("done - active_bank = 0x%x, start = 0x%x\n", chip->active_bank, voice->bank[chip->active_bank].start);
+ /* printk("done - active_bank = 0x%x, start = 0x%x\n", chip->active_bank, voice->bank[chip->active_bank].start); */
spin_unlock(&chip->reg_lock);
snd_pcm_period_elapsed(substream);
spin_lock(&chip->reg_lock);
@@ -414,7 +414,7 @@ static int snd_ymfpci_playback_trigger(struct snd_pcm_substream *substream,
result = -EINVAL;
break;
}
- __unlock:
+__unlock:
spin_unlock(&chip->reg_lock);
if (kctl)
snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_INFO, &kctl->id);
@@ -468,7 +468,7 @@ static int snd_ymfpci_pcm_voice_alloc(struct snd_ymfpci_pcm *ypcm, int voices)
if (ypcm->voices[0] != NULL && ypcm->voices[1] == NULL) {
snd_ymfpci_voice_free(ypcm->chip, ypcm->voices[0]);
ypcm->voices[0] = NULL;
- }
+ }
}
err = snd_ymfpci_voice_alloc(ypcm->chip, YMFPCI_PCM, voices > 1, &ypcm->voices[0]);
if (err < 0)
@@ -615,7 +615,7 @@ static int snd_ymfpci_ac3_done(struct snd_ymfpci *chip)
snd_ymfpci_writel(chip, YDSXGR_MAPOFEFFECT,
snd_ymfpci_readl(chip, YDSXGR_MAPOFEFFECT) & ~(3 << 3));
spin_unlock_irq(&chip->reg_lock);
- // snd_ymfpci_irq_wait(chip);
+ /* snd_ymfpci_irq_wait(chip); */
if (chip->ac3_tmp_base.area) {
snd_dma_free_pages(&chip->ac3_tmp_base);
chip->ac3_tmp_base.area = NULL;
@@ -642,7 +642,7 @@ static int snd_ymfpci_playback_hw_free(struct snd_pcm_substream *substream)
struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_ymfpci_pcm *ypcm;
-
+
if (runtime->private_data == NULL)
return 0;
ypcm = runtime->private_data;
@@ -836,7 +836,7 @@ static irqreturn_t snd_ymfpci_interrupt(int irq, void *dev_id)
static struct snd_pcm_hardware snd_ymfpci_playback =
{
.info = (SNDRV_PCM_INFO_MMAP |
- SNDRV_PCM_INFO_MMAP_VALID |
+ SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_PAUSE |
@@ -905,8 +905,8 @@ static int snd_ymfpci_playback_open_1(struct snd_pcm_substream *substream)
/* call with spinlock held */
static void ymfpci_open_extension(struct snd_ymfpci *chip)
{
- if (! chip->rear_opened) {
- if (! chip->spdif_opened) /* set AC3 */
+ if (!chip->rear_opened) {
+ if (!chip->spdif_opened) /* set AC3 */
snd_ymfpci_writel(chip, YDSXGR_MODE,
snd_ymfpci_readl(chip, YDSXGR_MODE) | (1 << 30));
/* enable second codec (4CHEN) */
@@ -918,8 +918,8 @@ static void ymfpci_open_extension(struct snd_ymfpci *chip)
/* call with spinlock held */
static void ymfpci_close_extension(struct snd_ymfpci *chip)
{
- if (! chip->rear_opened) {
- if (! chip->spdif_opened)
+ if (!chip->rear_opened) {
+ if (!chip->spdif_opened)
snd_ymfpci_writel(chip, YDSXGR_MODE,
snd_ymfpci_readl(chip, YDSXGR_MODE) & ~(1 << 30));
snd_ymfpci_writew(chip, YDSXGR_SECCONFIG,
@@ -933,7 +933,7 @@ static int snd_ymfpci_playback_open(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_ymfpci_pcm *ypcm;
int err;
-
+
if ((err = snd_ymfpci_playback_open_1(substream)) < 0)
return err;
ypcm = runtime->private_data;
@@ -955,7 +955,7 @@ static int snd_ymfpci_playback_spdif_open(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_ymfpci_pcm *ypcm;
int err;
-
+
if ((err = snd_ymfpci_playback_open_1(substream)) < 0)
return err;
ypcm = runtime->private_data;
@@ -983,7 +983,7 @@ static int snd_ymfpci_playback_4ch_open(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_ymfpci_pcm *ypcm;
int err;
-
+
if ((err = snd_ymfpci_playback_open_1(substream)) < 0)
return err;
ypcm = runtime->private_data;
@@ -1009,7 +1009,7 @@ static int snd_ymfpci_capture_open(struct snd_pcm_substream *substream,
return -ENOMEM;
ypcm->chip = chip;
ypcm->type = capture_bank_number + CAPTURE_REC;
- ypcm->substream = substream;
+ ypcm->substream = substream;
ypcm->capture_bank_number = capture_bank_number;
chip->capture_substream[capture_bank_number] = substream;
runtime->hw = snd_ymfpci_capture;
@@ -1449,7 +1449,7 @@ static int snd_ymfpci_get_single(struct snd_kcontrol *kcontrol,
int reg = kcontrol->private_value & 0xffff;
unsigned int shift = (kcontrol->private_value >> 16) & 0xff;
unsigned int mask = 1;
-
+
switch (reg) {
case YDSXGR_SPDIFOUTCTRL: break;
case YDSXGR_SPDIFINCTRL: break;
@@ -1469,7 +1469,7 @@ static int snd_ymfpci_put_single(struct snd_kcontrol *kcontrol,
unsigned int mask = 1;
int change;
unsigned int val, oval;
-
+
switch (reg) {
case YDSXGR_SPDIFOUTCTRL: break;
case YDSXGR_SPDIFINCTRL: break;
@@ -1515,7 +1515,7 @@ static int snd_ymfpci_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_e
unsigned int reg = kcontrol->private_value;
unsigned int shift_left = 0, shift_right = 16, mask = 16383;
unsigned int val;
-
+
if (reg < 0x80 || reg >= 0xc0)
return -EINVAL;
spin_lock_irq(&chip->reg_lock);
@@ -1533,7 +1533,7 @@ static int snd_ymfpci_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_e
unsigned int shift_left = 0, shift_right = 16, mask = 16383;
int change;
unsigned int val1, val2, oval;
-
+
if (reg < 0x80 || reg >= 0xc0)
return -EINVAL;
val1 = ucontrol->value.integer.value[0] & mask;
@@ -1557,7 +1557,7 @@ static int snd_ymfpci_put_nativedacvol(struct snd_kcontrol *kcontrol,
unsigned int reg2 = YDSXGR_BUF441OUTVOL;
int change;
unsigned int value, oval;
-
+
value = ucontrol->value.integer.value[0] & 0x3fff;
value |= (ucontrol->value.integer.value[1] & 0x3fff) << 16;
spin_lock_irq(&chip->reg_lock);
@@ -1937,12 +1937,12 @@ int __devinit snd_ymfpci_timer(struct snd_ymfpci *chip, int device)
* proc interface
*/
-static void snd_ymfpci_proc_read(struct snd_info_entry *entry,
+static void snd_ymfpci_proc_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
struct snd_ymfpci *chip = entry->private_data;
int i;
-
+
snd_iprintf(buffer, "YMFPCI\n\n");
for (i = 0; i <= YDSXGR_WORKBASE; i += 4)
snd_iprintf(buffer, "%04x: %04x\n", i, snd_ymfpci_readl(chip, i));
@@ -1951,8 +1951,8 @@ static void snd_ymfpci_proc_read(struct snd_info_entry *entry,
static int __devinit snd_ymfpci_proc_init(struct snd_card *card, struct snd_ymfpci *chip)
{
struct snd_info_entry *entry;
-
- if (! snd_card_proc_new(card, "ymfpci", &entry))
+
+ if (!snd_card_proc_new(card, "ymfpci", &entry))
snd_info_set_text_ops(entry, chip, snd_ymfpci_proc_read);
return 0;
}
@@ -1966,7 +1966,7 @@ static void snd_ymfpci_aclink_reset(struct pci_dev * pci)
u8 cmd;
pci_read_config_byte(pci, PCIR_DSXG_CTRL, &cmd);
-#if 0 // force to reset
+#if 0 /* force to reset */
if (cmd & 0x03) {
#endif
pci_write_config_byte(pci, PCIR_DSXG_CTRL, cmd & 0xfc);
@@ -2082,7 +2082,7 @@ static int __devinit snd_ymfpci_memalloc(struct snd_ymfpci *chip)
chip->bank_size_capture = snd_ymfpci_readl(chip, YDSXGR_RECCTRLSIZE) << 2;
chip->bank_size_effect = snd_ymfpci_readl(chip, YDSXGR_EFFCTRLSIZE) << 2;
chip->work_size = YDSXG_DEFAULT_WORK_SIZE;
-
+
size = ALIGN(playback_ctrl_size, 0x100) +
ALIGN(chip->bank_size_playback * 2 * YDSXG_PLAYBACK_VOICES, 0x100) +
ALIGN(chip->bank_size_capture * 2 * YDSXG_CAPTURE_VOICES, 0x100) +
@@ -2091,7 +2091,7 @@ static int __devinit snd_ymfpci_memalloc(struct snd_ymfpci *chip)
/* work_ptr must be aligned to 256 bytes, but it's already
covered with the kernel page allocation mechanism */
if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
- size, &chip->work_ptr) < 0)
+ size, &chip->work_ptr) < 0)
return -ENOMEM;
ptr = chip->work_ptr.area;
ptr_addr = chip->work_ptr.addr;
@@ -2137,7 +2137,7 @@ static int __devinit snd_ymfpci_memalloc(struct snd_ymfpci *chip)
ptr_addr = ALIGN(ptr_addr, 0x100);
chip->work_base = ptr;
chip->work_base_addr = ptr_addr;
-
+
snd_BUG_ON(ptr + chip->work_size !=
chip->work_ptr.area + chip->work_ptr.bytes);
@@ -2166,7 +2166,7 @@ static int __devinit snd_ymfpci_memalloc(struct snd_ymfpci *chip)
snd_ymfpci_writel(chip, YDSXGR_NATIVEDACINVOL, 0x3fff3fff);
snd_ymfpci_writel(chip, YDSXGR_PRIADCLOOPVOL, 0x3fff3fff);
snd_ymfpci_writel(chip, YDSXGR_LEGACYOUTVOL, 0x3fff3fff);
-
+
return 0;
}
@@ -2214,11 +2214,11 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip)
iounmap(chip->reg_area_virt);
if (chip->work_ptr.area)
snd_dma_free_pages(&chip->work_ptr);
-
+
release_and_free_resource(chip->res_reg_area);
pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl);
-
+
pci_disable_device(chip->pci);
release_firmware(chip->dsp_microcode);
release_firmware(chip->controller_microcode);
@@ -2267,7 +2267,7 @@ int snd_ymfpci_suspend(struct pci_dev *pci, pm_message_t state)
struct snd_card *card = pci_get_drvdata(pci);
struct snd_ymfpci *chip = card->private_data;
unsigned int i;
-
+
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
snd_pcm_suspend_all(chip->pcm);
snd_pcm_suspend_all(chip->pcm2);
@@ -2333,7 +2333,7 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
static struct snd_device_ops ops = {
.dev_free = snd_ymfpci_dev_free,
};
-
+
*rchip = NULL;
/* enable PCI device */
1
0
09 Sep '08
- <asm/io.h> -> <linux/io.h>
- remove trailing whitespaces
- convert comments
Only compile tested.
Signed-off-by: Alexander Beregalov <a.beregalov(a)gmail.com>
---
sound/pci/vx222/vx222.c | 2 +-
sound/pci/vx222/vx222_ops.c | 330 +++++++++++++++++++++---------------------
2 files changed, 166 insertions(+), 166 deletions(-)
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c
index acc352f..ec7c743 100644
--- a/sound/pci/vx222/vx222.c
+++ b/sound/pci/vx222/vx222.c
@@ -154,7 +154,7 @@ static int __devinit snd_vx222_create(struct snd_card *card, struct pci_dev *pci
vx_ops = hw->type == VX_TYPE_BOARD ? &vx222_old_ops : &vx222_ops;
chip = snd_vx_create(card, hw, vx_ops,
sizeof(struct snd_vx222) - sizeof(struct vx_core));
- if (! chip) {
+ if (!chip) {
pci_disable_device(pci);
return -ENOMEM;
}
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c
index 7e87f39..7d1350a 100644
--- a/sound/pci/vx222/vx222_ops.c
+++ b/sound/pci/vx222/vx222_ops.c
@@ -28,7 +28,7 @@
#include <sound/core.h>
#include <sound/control.h>
#include <sound/tlv.h>
-#include <asm/io.h>
+#include <linux/io.h>
#include "vx222.h"
@@ -50,12 +50,12 @@ static int vx2_reg_offset[VX_REG_MAX] = {
[VX_HIFREQ] = 0x38,
[VX_CSUER] = 0x3c,
[VX_SELMIC] = 0x40,
- [VX_COMPOT] = 0x44, // Write: POTENTIOMETER ; Read: COMPRESSION LEVEL activate
- [VX_SCOMPR] = 0x48, // Read: COMPRESSION THRESHOLD activate
- [VX_GLIMIT] = 0x4c, // Read: LEVEL LIMITATION activate
- [VX_INTCSR] = 0x4c, // VX_INTCSR_REGISTER_OFFSET
- [VX_CNTRL] = 0x50, // VX_CNTRL_REGISTER_OFFSET
- [VX_GPIOC] = 0x54, // VX_GPIOC (new with PLX9030)
+ [VX_COMPOT] = 0x44, /* Write: POTENTIOMETER; Read: COMPRESSION LEVEL activate */
+ [VX_SCOMPR] = 0x48, /* Read: COMPRESSION THRESHOLD activate */
+ [VX_GLIMIT] = 0x4c, /* Read: LEVEL LIMITATION activate */
+ [VX_INTCSR] = 0x4c, /* VX_INTCSR_REGISTER_OFFSET */
+ [VX_CNTRL] = 0x50, /* VX_CNTRL_REGISTER_OFFSET */
+ [VX_GPIOC] = 0x54, /* VX_GPIOC (new with PLX9030) */
};
static int vx2_reg_index[VX_REG_MAX] = {
@@ -107,7 +107,7 @@ static unsigned char vx2_inb(struct vx_core *chip, int offset)
static void vx2_outb(struct vx_core *chip, int offset, unsigned char val)
{
outb(val, vx2_reg_addr(chip, offset));
- //printk("outb: %x -> %x\n", val, vx2_reg_addr(chip, offset));
+ /* printk("outb: %x -> %x\n", val, vx2_reg_addr(chip, offset)); */
}
/**
@@ -126,7 +126,7 @@ static unsigned int vx2_inl(struct vx_core *chip, int offset)
*/
static void vx2_outl(struct vx_core *chip, int offset, unsigned int val)
{
- // printk("outl: %x -> %x\n", val, vx2_reg_addr(chip, offset));
+ /* printk("outl: %x -> %x\n", val, vx2_reg_addr(chip, offset)); */
outl(val, vx2_reg_addr(chip, offset));
}
@@ -187,7 +187,7 @@ static int vx2_test_xilinx(struct vx_core *_chip)
vx_outl(chip, CDSP, chip->regCDSP & ~VX_CDSP_TEST0_MASK);
vx_inl(chip, ISR);
data = vx_inl(chip, STATUS);
- if (! (data & VX_STATUS_VAL_TEST0_MASK)) {
+ if (!(data & VX_STATUS_VAL_TEST0_MASK)) {
snd_printdd("bad! #2\n");
return -ENODEV;
}
@@ -207,7 +207,7 @@ static int vx2_test_xilinx(struct vx_core *_chip)
vx_outl(chip, CDSP, chip->regCDSP & ~VX_CDSP_TEST1_MASK);
vx_inl(chip, ISR);
data = vx_inl(chip, STATUS);
- if (! (data & VX_STATUS_VAL_TEST1_MASK)) {
+ if (!(data & VX_STATUS_VAL_TEST1_MASK)) {
snd_printdd("bad! #4\n");
return -ENODEV;
}
@@ -400,7 +400,7 @@ static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *x
return 0;
}
-
+
/*
* load the boot/dsp images
*/
@@ -439,12 +439,12 @@ static int vx2_load_dsp(struct vx_core *vx, int index, const struct firmware *ds
static int vx2_test_and_ack(struct vx_core *chip)
{
/* not booted yet? */
- if (! (chip->chip_status & VX_STAT_XILINX_LOADED))
+ if (!(chip->chip_status & VX_STAT_XILINX_LOADED))
return -ENXIO;
- if (! (vx_inl(chip, STATUS) & VX_STATUS_MEMIRQ_MASK))
+ if (!(vx_inl(chip, STATUS) & VX_STATUS_MEMIRQ_MASK))
return -EIO;
-
+
/* ok, interrupts generated, now ack it */
/* set ACQUIT bit up and down */
vx_outl(chip, STATUS, 0);
@@ -512,154 +512,154 @@ static void vx2_write_codec_reg(struct vx_core *chip, unsigned int data)
#define AKM_CODEC_RIGHT_LEVEL_CMD 0xA500
static const u8 vx2_akm_gains_lut[VX2_AKM_LEVEL_MAX+1] = {
- 0x7f, // [000] = +0.000 dB -> AKM(0x7f) = +0.000 dB error(+0.000 dB)
- 0x7d, // [001] = -0.500 dB -> AKM(0x7d) = -0.572 dB error(-0.072 dB)
- 0x7c, // [002] = -1.000 dB -> AKM(0x7c) = -0.873 dB error(+0.127 dB)
- 0x7a, // [003] = -1.500 dB -> AKM(0x7a) = -1.508 dB error(-0.008 dB)
- 0x79, // [004] = -2.000 dB -> AKM(0x79) = -1.844 dB error(+0.156 dB)
- 0x77, // [005] = -2.500 dB -> AKM(0x77) = -2.557 dB error(-0.057 dB)
- 0x76, // [006] = -3.000 dB -> AKM(0x76) = -2.937 dB error(+0.063 dB)
- 0x75, // [007] = -3.500 dB -> AKM(0x75) = -3.334 dB error(+0.166 dB)
- 0x73, // [008] = -4.000 dB -> AKM(0x73) = -4.188 dB error(-0.188 dB)
- 0x72, // [009] = -4.500 dB -> AKM(0x72) = -4.648 dB error(-0.148 dB)
- 0x71, // [010] = -5.000 dB -> AKM(0x71) = -5.134 dB error(-0.134 dB)
- 0x70, // [011] = -5.500 dB -> AKM(0x70) = -5.649 dB error(-0.149 dB)
- 0x6f, // [012] = -6.000 dB -> AKM(0x6f) = -6.056 dB error(-0.056 dB)
- 0x6d, // [013] = -6.500 dB -> AKM(0x6d) = -6.631 dB error(-0.131 dB)
- 0x6c, // [014] = -7.000 dB -> AKM(0x6c) = -6.933 dB error(+0.067 dB)
- 0x6a, // [015] = -7.500 dB -> AKM(0x6a) = -7.571 dB error(-0.071 dB)
- 0x69, // [016] = -8.000 dB -> AKM(0x69) = -7.909 dB error(+0.091 dB)
- 0x67, // [017] = -8.500 dB -> AKM(0x67) = -8.626 dB error(-0.126 dB)
- 0x66, // [018] = -9.000 dB -> AKM(0x66) = -9.008 dB error(-0.008 dB)
- 0x65, // [019] = -9.500 dB -> AKM(0x65) = -9.407 dB error(+0.093 dB)
- 0x64, // [020] = -10.000 dB -> AKM(0x64) = -9.826 dB error(+0.174 dB)
- 0x62, // [021] = -10.500 dB -> AKM(0x62) = -10.730 dB error(-0.230 dB)
- 0x61, // [022] = -11.000 dB -> AKM(0x61) = -11.219 dB error(-0.219 dB)
- 0x60, // [023] = -11.500 dB -> AKM(0x60) = -11.738 dB error(-0.238 dB)
- 0x5f, // [024] = -12.000 dB -> AKM(0x5f) = -12.149 dB error(-0.149 dB)
- 0x5e, // [025] = -12.500 dB -> AKM(0x5e) = -12.434 dB error(+0.066 dB)
- 0x5c, // [026] = -13.000 dB -> AKM(0x5c) = -13.033 dB error(-0.033 dB)
- 0x5b, // [027] = -13.500 dB -> AKM(0x5b) = -13.350 dB error(+0.150 dB)
- 0x59, // [028] = -14.000 dB -> AKM(0x59) = -14.018 dB error(-0.018 dB)
- 0x58, // [029] = -14.500 dB -> AKM(0x58) = -14.373 dB error(+0.127 dB)
- 0x56, // [030] = -15.000 dB -> AKM(0x56) = -15.130 dB error(-0.130 dB)
- 0x55, // [031] = -15.500 dB -> AKM(0x55) = -15.534 dB error(-0.034 dB)
- 0x54, // [032] = -16.000 dB -> AKM(0x54) = -15.958 dB error(+0.042 dB)
- 0x53, // [033] = -16.500 dB -> AKM(0x53) = -16.404 dB error(+0.096 dB)
- 0x52, // [034] = -17.000 dB -> AKM(0x52) = -16.874 dB error(+0.126 dB)
- 0x51, // [035] = -17.500 dB -> AKM(0x51) = -17.371 dB error(+0.129 dB)
- 0x50, // [036] = -18.000 dB -> AKM(0x50) = -17.898 dB error(+0.102 dB)
- 0x4e, // [037] = -18.500 dB -> AKM(0x4e) = -18.605 dB error(-0.105 dB)
- 0x4d, // [038] = -19.000 dB -> AKM(0x4d) = -18.905 dB error(+0.095 dB)
- 0x4b, // [039] = -19.500 dB -> AKM(0x4b) = -19.538 dB error(-0.038 dB)
- 0x4a, // [040] = -20.000 dB -> AKM(0x4a) = -19.872 dB error(+0.128 dB)
- 0x48, // [041] = -20.500 dB -> AKM(0x48) = -20.583 dB error(-0.083 dB)
- 0x47, // [042] = -21.000 dB -> AKM(0x47) = -20.961 dB error(+0.039 dB)
- 0x46, // [043] = -21.500 dB -> AKM(0x46) = -21.356 dB error(+0.144 dB)
- 0x44, // [044] = -22.000 dB -> AKM(0x44) = -22.206 dB error(-0.206 dB)
- 0x43, // [045] = -22.500 dB -> AKM(0x43) = -22.664 dB error(-0.164 dB)
- 0x42, // [046] = -23.000 dB -> AKM(0x42) = -23.147 dB error(-0.147 dB)
- 0x41, // [047] = -23.500 dB -> AKM(0x41) = -23.659 dB error(-0.159 dB)
- 0x40, // [048] = -24.000 dB -> AKM(0x40) = -24.203 dB error(-0.203 dB)
- 0x3f, // [049] = -24.500 dB -> AKM(0x3f) = -24.635 dB error(-0.135 dB)
- 0x3e, // [050] = -25.000 dB -> AKM(0x3e) = -24.935 dB error(+0.065 dB)
- 0x3c, // [051] = -25.500 dB -> AKM(0x3c) = -25.569 dB error(-0.069 dB)
- 0x3b, // [052] = -26.000 dB -> AKM(0x3b) = -25.904 dB error(+0.096 dB)
- 0x39, // [053] = -26.500 dB -> AKM(0x39) = -26.615 dB error(-0.115 dB)
- 0x38, // [054] = -27.000 dB -> AKM(0x38) = -26.994 dB error(+0.006 dB)
- 0x37, // [055] = -27.500 dB -> AKM(0x37) = -27.390 dB error(+0.110 dB)
- 0x36, // [056] = -28.000 dB -> AKM(0x36) = -27.804 dB error(+0.196 dB)
- 0x34, // [057] = -28.500 dB -> AKM(0x34) = -28.699 dB error(-0.199 dB)
- 0x33, // [058] = -29.000 dB -> AKM(0x33) = -29.183 dB error(-0.183 dB)
- 0x32, // [059] = -29.500 dB -> AKM(0x32) = -29.696 dB error(-0.196 dB)
- 0x31, // [060] = -30.000 dB -> AKM(0x31) = -30.241 dB error(-0.241 dB)
- 0x31, // [061] = -30.500 dB -> AKM(0x31) = -30.241 dB error(+0.259 dB)
- 0x30, // [062] = -31.000 dB -> AKM(0x30) = -30.823 dB error(+0.177 dB)
- 0x2e, // [063] = -31.500 dB -> AKM(0x2e) = -31.610 dB error(-0.110 dB)
- 0x2d, // [064] = -32.000 dB -> AKM(0x2d) = -31.945 dB error(+0.055 dB)
- 0x2b, // [065] = -32.500 dB -> AKM(0x2b) = -32.659 dB error(-0.159 dB)
- 0x2a, // [066] = -33.000 dB -> AKM(0x2a) = -33.038 dB error(-0.038 dB)
- 0x29, // [067] = -33.500 dB -> AKM(0x29) = -33.435 dB error(+0.065 dB)
- 0x28, // [068] = -34.000 dB -> AKM(0x28) = -33.852 dB error(+0.148 dB)
- 0x27, // [069] = -34.500 dB -> AKM(0x27) = -34.289 dB error(+0.211 dB)
- 0x25, // [070] = -35.000 dB -> AKM(0x25) = -35.235 dB error(-0.235 dB)
- 0x24, // [071] = -35.500 dB -> AKM(0x24) = -35.750 dB error(-0.250 dB)
- 0x24, // [072] = -36.000 dB -> AKM(0x24) = -35.750 dB error(+0.250 dB)
- 0x23, // [073] = -36.500 dB -> AKM(0x23) = -36.297 dB error(+0.203 dB)
- 0x22, // [074] = -37.000 dB -> AKM(0x22) = -36.881 dB error(+0.119 dB)
- 0x21, // [075] = -37.500 dB -> AKM(0x21) = -37.508 dB error(-0.008 dB)
- 0x20, // [076] = -38.000 dB -> AKM(0x20) = -38.183 dB error(-0.183 dB)
- 0x1f, // [077] = -38.500 dB -> AKM(0x1f) = -38.726 dB error(-0.226 dB)
- 0x1e, // [078] = -39.000 dB -> AKM(0x1e) = -39.108 dB error(-0.108 dB)
- 0x1d, // [079] = -39.500 dB -> AKM(0x1d) = -39.507 dB error(-0.007 dB)
- 0x1c, // [080] = -40.000 dB -> AKM(0x1c) = -39.926 dB error(+0.074 dB)
- 0x1b, // [081] = -40.500 dB -> AKM(0x1b) = -40.366 dB error(+0.134 dB)
- 0x1a, // [082] = -41.000 dB -> AKM(0x1a) = -40.829 dB error(+0.171 dB)
- 0x19, // [083] = -41.500 dB -> AKM(0x19) = -41.318 dB error(+0.182 dB)
- 0x18, // [084] = -42.000 dB -> AKM(0x18) = -41.837 dB error(+0.163 dB)
- 0x17, // [085] = -42.500 dB -> AKM(0x17) = -42.389 dB error(+0.111 dB)
- 0x16, // [086] = -43.000 dB -> AKM(0x16) = -42.978 dB error(+0.022 dB)
- 0x15, // [087] = -43.500 dB -> AKM(0x15) = -43.610 dB error(-0.110 dB)
- 0x14, // [088] = -44.000 dB -> AKM(0x14) = -44.291 dB error(-0.291 dB)
- 0x14, // [089] = -44.500 dB -> AKM(0x14) = -44.291 dB error(+0.209 dB)
- 0x13, // [090] = -45.000 dB -> AKM(0x13) = -45.031 dB error(-0.031 dB)
- 0x12, // [091] = -45.500 dB -> AKM(0x12) = -45.840 dB error(-0.340 dB)
- 0x12, // [092] = -46.000 dB -> AKM(0x12) = -45.840 dB error(+0.160 dB)
- 0x11, // [093] = -46.500 dB -> AKM(0x11) = -46.731 dB error(-0.231 dB)
- 0x11, // [094] = -47.000 dB -> AKM(0x11) = -46.731 dB error(+0.269 dB)
- 0x10, // [095] = -47.500 dB -> AKM(0x10) = -47.725 dB error(-0.225 dB)
- 0x10, // [096] = -48.000 dB -> AKM(0x10) = -47.725 dB error(+0.275 dB)
- 0x0f, // [097] = -48.500 dB -> AKM(0x0f) = -48.553 dB error(-0.053 dB)
- 0x0e, // [098] = -49.000 dB -> AKM(0x0e) = -49.152 dB error(-0.152 dB)
- 0x0d, // [099] = -49.500 dB -> AKM(0x0d) = -49.796 dB error(-0.296 dB)
- 0x0d, // [100] = -50.000 dB -> AKM(0x0d) = -49.796 dB error(+0.204 dB)
- 0x0c, // [101] = -50.500 dB -> AKM(0x0c) = -50.491 dB error(+0.009 dB)
- 0x0b, // [102] = -51.000 dB -> AKM(0x0b) = -51.247 dB error(-0.247 dB)
- 0x0b, // [103] = -51.500 dB -> AKM(0x0b) = -51.247 dB error(+0.253 dB)
- 0x0a, // [104] = -52.000 dB -> AKM(0x0a) = -52.075 dB error(-0.075 dB)
- 0x0a, // [105] = -52.500 dB -> AKM(0x0a) = -52.075 dB error(+0.425 dB)
- 0x09, // [106] = -53.000 dB -> AKM(0x09) = -52.990 dB error(+0.010 dB)
- 0x09, // [107] = -53.500 dB -> AKM(0x09) = -52.990 dB error(+0.510 dB)
- 0x08, // [108] = -54.000 dB -> AKM(0x08) = -54.013 dB error(-0.013 dB)
- 0x08, // [109] = -54.500 dB -> AKM(0x08) = -54.013 dB error(+0.487 dB)
- 0x07, // [110] = -55.000 dB -> AKM(0x07) = -55.173 dB error(-0.173 dB)
- 0x07, // [111] = -55.500 dB -> AKM(0x07) = -55.173 dB error(+0.327 dB)
- 0x06, // [112] = -56.000 dB -> AKM(0x06) = -56.512 dB error(-0.512 dB)
- 0x06, // [113] = -56.500 dB -> AKM(0x06) = -56.512 dB error(-0.012 dB)
- 0x06, // [114] = -57.000 dB -> AKM(0x06) = -56.512 dB error(+0.488 dB)
- 0x05, // [115] = -57.500 dB -> AKM(0x05) = -58.095 dB error(-0.595 dB)
- 0x05, // [116] = -58.000 dB -> AKM(0x05) = -58.095 dB error(-0.095 dB)
- 0x05, // [117] = -58.500 dB -> AKM(0x05) = -58.095 dB error(+0.405 dB)
- 0x05, // [118] = -59.000 dB -> AKM(0x05) = -58.095 dB error(+0.905 dB)
- 0x04, // [119] = -59.500 dB -> AKM(0x04) = -60.034 dB error(-0.534 dB)
- 0x04, // [120] = -60.000 dB -> AKM(0x04) = -60.034 dB error(-0.034 dB)
- 0x04, // [121] = -60.500 dB -> AKM(0x04) = -60.034 dB error(+0.466 dB)
- 0x04, // [122] = -61.000 dB -> AKM(0x04) = -60.034 dB error(+0.966 dB)
- 0x03, // [123] = -61.500 dB -> AKM(0x03) = -62.532 dB error(-1.032 dB)
- 0x03, // [124] = -62.000 dB -> AKM(0x03) = -62.532 dB error(-0.532 dB)
- 0x03, // [125] = -62.500 dB -> AKM(0x03) = -62.532 dB error(-0.032 dB)
- 0x03, // [126] = -63.000 dB -> AKM(0x03) = -62.532 dB error(+0.468 dB)
- 0x03, // [127] = -63.500 dB -> AKM(0x03) = -62.532 dB error(+0.968 dB)
- 0x03, // [128] = -64.000 dB -> AKM(0x03) = -62.532 dB error(+1.468 dB)
- 0x02, // [129] = -64.500 dB -> AKM(0x02) = -66.054 dB error(-1.554 dB)
- 0x02, // [130] = -65.000 dB -> AKM(0x02) = -66.054 dB error(-1.054 dB)
- 0x02, // [131] = -65.500 dB -> AKM(0x02) = -66.054 dB error(-0.554 dB)
- 0x02, // [132] = -66.000 dB -> AKM(0x02) = -66.054 dB error(-0.054 dB)
- 0x02, // [133] = -66.500 dB -> AKM(0x02) = -66.054 dB error(+0.446 dB)
- 0x02, // [134] = -67.000 dB -> AKM(0x02) = -66.054 dB error(+0.946 dB)
- 0x02, // [135] = -67.500 dB -> AKM(0x02) = -66.054 dB error(+1.446 dB)
- 0x02, // [136] = -68.000 dB -> AKM(0x02) = -66.054 dB error(+1.946 dB)
- 0x02, // [137] = -68.500 dB -> AKM(0x02) = -66.054 dB error(+2.446 dB)
- 0x02, // [138] = -69.000 dB -> AKM(0x02) = -66.054 dB error(+2.946 dB)
- 0x01, // [139] = -69.500 dB -> AKM(0x01) = -72.075 dB error(-2.575 dB)
- 0x01, // [140] = -70.000 dB -> AKM(0x01) = -72.075 dB error(-2.075 dB)
- 0x01, // [141] = -70.500 dB -> AKM(0x01) = -72.075 dB error(-1.575 dB)
- 0x01, // [142] = -71.000 dB -> AKM(0x01) = -72.075 dB error(-1.075 dB)
- 0x01, // [143] = -71.500 dB -> AKM(0x01) = -72.075 dB error(-0.575 dB)
- 0x01, // [144] = -72.000 dB -> AKM(0x01) = -72.075 dB error(-0.075 dB)
- 0x01, // [145] = -72.500 dB -> AKM(0x01) = -72.075 dB error(+0.425 dB)
- 0x01, // [146] = -73.000 dB -> AKM(0x01) = -72.075 dB error(+0.925 dB)
- 0x00}; // [147] = -73.500 dB -> AKM(0x00) = mute error(+infini)
+ 0x7f, /* [000] = +0.000 dB -> AKM(0x7f) = +0.000 dB error(+0.000 dB) */
+ 0x7d, /* [001] = -0.500 dB -> AKM(0x7d) = -0.572 dB error(-0.072 dB) */
+ 0x7c, /* [002] = -1.000 dB -> AKM(0x7c) = -0.873 dB error(+0.127 dB) */
+ 0x7a, /* [003] = -1.500 dB -> AKM(0x7a) = -1.508 dB error(-0.008 dB) */
+ 0x79, /* [004] = -2.000 dB -> AKM(0x79) = -1.844 dB error(+0.156 dB) */
+ 0x77, /* [005] = -2.500 dB -> AKM(0x77) = -2.557 dB error(-0.057 dB) */
+ 0x76, /* [006] = -3.000 dB -> AKM(0x76) = -2.937 dB error(+0.063 dB) */
+ 0x75, /* [007] = -3.500 dB -> AKM(0x75) = -3.334 dB error(+0.166 dB) */
+ 0x73, /* [008] = -4.000 dB -> AKM(0x73) = -4.188 dB error(-0.188 dB) */
+ 0x72, /* [009] = -4.500 dB -> AKM(0x72) = -4.648 dB error(-0.148 dB) */
+ 0x71, /* [010] = -5.000 dB -> AKM(0x71) = -5.134 dB error(-0.134 dB) */
+ 0x70, /* [011] = -5.500 dB -> AKM(0x70) = -5.649 dB error(-0.149 dB) */
+ 0x6f, /* [012] = -6.000 dB -> AKM(0x6f) = -6.056 dB error(-0.056 dB) */
+ 0x6d, /* [013] = -6.500 dB -> AKM(0x6d) = -6.631 dB error(-0.131 dB) */
+ 0x6c, /* [014] = -7.000 dB -> AKM(0x6c) = -6.933 dB error(+0.067 dB) */
+ 0x6a, /* [015] = -7.500 dB -> AKM(0x6a) = -7.571 dB error(-0.071 dB) */
+ 0x69, /* [016] = -8.000 dB -> AKM(0x69) = -7.909 dB error(+0.091 dB) */
+ 0x67, /* [017] = -8.500 dB -> AKM(0x67) = -8.626 dB error(-0.126 dB) */
+ 0x66, /* [018] = -9.000 dB -> AKM(0x66) = -9.008 dB error(-0.008 dB) */
+ 0x65, /* [019] = -9.500 dB -> AKM(0x65) = -9.407 dB error(+0.093 dB) */
+ 0x64, /* [020] = -10.000 dB -> AKM(0x64) = -9.826 dB error(+0.174 dB) */
+ 0x62, /* [021] = -10.500 dB -> AKM(0x62) = -10.730 dB error(-0.230 dB) */
+ 0x61, /* [022] = -11.000 dB -> AKM(0x61) = -11.219 dB error(-0.219 dB) */
+ 0x60, /* [023] = -11.500 dB -> AKM(0x60) = -11.738 dB error(-0.238 dB) */
+ 0x5f, /* [024] = -12.000 dB -> AKM(0x5f) = -12.149 dB error(-0.149 dB) */
+ 0x5e, /* [025] = -12.500 dB -> AKM(0x5e) = -12.434 dB error(+0.066 dB) */
+ 0x5c, /* [026] = -13.000 dB -> AKM(0x5c) = -13.033 dB error(-0.033 dB) */
+ 0x5b, /* [027] = -13.500 dB -> AKM(0x5b) = -13.350 dB error(+0.150 dB) */
+ 0x59, /* [028] = -14.000 dB -> AKM(0x59) = -14.018 dB error(-0.018 dB) */
+ 0x58, /* [029] = -14.500 dB -> AKM(0x58) = -14.373 dB error(+0.127 dB) */
+ 0x56, /* [030] = -15.000 dB -> AKM(0x56) = -15.130 dB error(-0.130 dB) */
+ 0x55, /* [031] = -15.500 dB -> AKM(0x55) = -15.534 dB error(-0.034 dB) */
+ 0x54, /* [032] = -16.000 dB -> AKM(0x54) = -15.958 dB error(+0.042 dB) */
+ 0x53, /* [033] = -16.500 dB -> AKM(0x53) = -16.404 dB error(+0.096 dB) */
+ 0x52, /* [034] = -17.000 dB -> AKM(0x52) = -16.874 dB error(+0.126 dB) */
+ 0x51, /* [035] = -17.500 dB -> AKM(0x51) = -17.371 dB error(+0.129 dB) */
+ 0x50, /* [036] = -18.000 dB -> AKM(0x50) = -17.898 dB error(+0.102 dB) */
+ 0x4e, /* [037] = -18.500 dB -> AKM(0x4e) = -18.605 dB error(-0.105 dB) */
+ 0x4d, /* [038] = -19.000 dB -> AKM(0x4d) = -18.905 dB error(+0.095 dB) */
+ 0x4b, /* [039] = -19.500 dB -> AKM(0x4b) = -19.538 dB error(-0.038 dB) */
+ 0x4a, /* [040] = -20.000 dB -> AKM(0x4a) = -19.872 dB error(+0.128 dB) */
+ 0x48, /* [041] = -20.500 dB -> AKM(0x48) = -20.583 dB error(-0.083 dB) */
+ 0x47, /* [042] = -21.000 dB -> AKM(0x47) = -20.961 dB error(+0.039 dB) */
+ 0x46, /* [043] = -21.500 dB -> AKM(0x46) = -21.356 dB error(+0.144 dB) */
+ 0x44, /* [044] = -22.000 dB -> AKM(0x44) = -22.206 dB error(-0.206 dB) */
+ 0x43, /* [045] = -22.500 dB -> AKM(0x43) = -22.664 dB error(-0.164 dB) */
+ 0x42, /* [046] = -23.000 dB -> AKM(0x42) = -23.147 dB error(-0.147 dB) */
+ 0x41, /* [047] = -23.500 dB -> AKM(0x41) = -23.659 dB error(-0.159 dB) */
+ 0x40, /* [048] = -24.000 dB -> AKM(0x40) = -24.203 dB error(-0.203 dB) */
+ 0x3f, /* [049] = -24.500 dB -> AKM(0x3f) = -24.635 dB error(-0.135 dB) */
+ 0x3e, /* [050] = -25.000 dB -> AKM(0x3e) = -24.935 dB error(+0.065 dB) */
+ 0x3c, /* [051] = -25.500 dB -> AKM(0x3c) = -25.569 dB error(-0.069 dB) */
+ 0x3b, /* [052] = -26.000 dB -> AKM(0x3b) = -25.904 dB error(+0.096 dB) */
+ 0x39, /* [053] = -26.500 dB -> AKM(0x39) = -26.615 dB error(-0.115 dB) */
+ 0x38, /* [054] = -27.000 dB -> AKM(0x38) = -26.994 dB error(+0.006 dB) */
+ 0x37, /* [055] = -27.500 dB -> AKM(0x37) = -27.390 dB error(+0.110 dB) */
+ 0x36, /* [056] = -28.000 dB -> AKM(0x36) = -27.804 dB error(+0.196 dB) */
+ 0x34, /* [057] = -28.500 dB -> AKM(0x34) = -28.699 dB error(-0.199 dB) */
+ 0x33, /* [058] = -29.000 dB -> AKM(0x33) = -29.183 dB error(-0.183 dB) */
+ 0x32, /* [059] = -29.500 dB -> AKM(0x32) = -29.696 dB error(-0.196 dB) */
+ 0x31, /* [060] = -30.000 dB -> AKM(0x31) = -30.241 dB error(-0.241 dB) */
+ 0x31, /* [061] = -30.500 dB -> AKM(0x31) = -30.241 dB error(+0.259 dB) */
+ 0x30, /* [062] = -31.000 dB -> AKM(0x30) = -30.823 dB error(+0.177 dB) */
+ 0x2e, /* [063] = -31.500 dB -> AKM(0x2e) = -31.610 dB error(-0.110 dB) */
+ 0x2d, /* [064] = -32.000 dB -> AKM(0x2d) = -31.945 dB error(+0.055 dB) */
+ 0x2b, /* [065] = -32.500 dB -> AKM(0x2b) = -32.659 dB error(-0.159 dB) */
+ 0x2a, /* [066] = -33.000 dB -> AKM(0x2a) = -33.038 dB error(-0.038 dB) */
+ 0x29, /* [067] = -33.500 dB -> AKM(0x29) = -33.435 dB error(+0.065 dB) */
+ 0x28, /* [068] = -34.000 dB -> AKM(0x28) = -33.852 dB error(+0.148 dB) */
+ 0x27, /* [069] = -34.500 dB -> AKM(0x27) = -34.289 dB error(+0.211 dB) */
+ 0x25, /* [070] = -35.000 dB -> AKM(0x25) = -35.235 dB error(-0.235 dB) */
+ 0x24, /* [071] = -35.500 dB -> AKM(0x24) = -35.750 dB error(-0.250 dB) */
+ 0x24, /* [072] = -36.000 dB -> AKM(0x24) = -35.750 dB error(+0.250 dB) */
+ 0x23, /* [073] = -36.500 dB -> AKM(0x23) = -36.297 dB error(+0.203 dB) */
+ 0x22, /* [074] = -37.000 dB -> AKM(0x22) = -36.881 dB error(+0.119 dB) */
+ 0x21, /* [075] = -37.500 dB -> AKM(0x21) = -37.508 dB error(-0.008 dB) */
+ 0x20, /* [076] = -38.000 dB -> AKM(0x20) = -38.183 dB error(-0.183 dB) */
+ 0x1f, /* [077] = -38.500 dB -> AKM(0x1f) = -38.726 dB error(-0.226 dB) */
+ 0x1e, /* [078] = -39.000 dB -> AKM(0x1e) = -39.108 dB error(-0.108 dB) */
+ 0x1d, /* [079] = -39.500 dB -> AKM(0x1d) = -39.507 dB error(-0.007 dB) */
+ 0x1c, /* [080] = -40.000 dB -> AKM(0x1c) = -39.926 dB error(+0.074 dB) */
+ 0x1b, /* [081] = -40.500 dB -> AKM(0x1b) = -40.366 dB error(+0.134 dB) */
+ 0x1a, /* [082] = -41.000 dB -> AKM(0x1a) = -40.829 dB error(+0.171 dB) */
+ 0x19, /* [083] = -41.500 dB -> AKM(0x19) = -41.318 dB error(+0.182 dB) */
+ 0x18, /* [084] = -42.000 dB -> AKM(0x18) = -41.837 dB error(+0.163 dB) */
+ 0x17, /* [085] = -42.500 dB -> AKM(0x17) = -42.389 dB error(+0.111 dB) */
+ 0x16, /* [086] = -43.000 dB -> AKM(0x16) = -42.978 dB error(+0.022 dB) */
+ 0x15, /* [087] = -43.500 dB -> AKM(0x15) = -43.610 dB error(-0.110 dB) */
+ 0x14, /* [088] = -44.000 dB -> AKM(0x14) = -44.291 dB error(-0.291 dB) */
+ 0x14, /* [089] = -44.500 dB -> AKM(0x14) = -44.291 dB error(+0.209 dB) */
+ 0x13, /* [090] = -45.000 dB -> AKM(0x13) = -45.031 dB error(-0.031 dB) */
+ 0x12, /* [091] = -45.500 dB -> AKM(0x12) = -45.840 dB error(-0.340 dB) */
+ 0x12, /* [092] = -46.000 dB -> AKM(0x12) = -45.840 dB error(+0.160 dB) */
+ 0x11, /* [093] = -46.500 dB -> AKM(0x11) = -46.731 dB error(-0.231 dB) */
+ 0x11, /* [094] = -47.000 dB -> AKM(0x11) = -46.731 dB error(+0.269 dB) */
+ 0x10, /* [095] = -47.500 dB -> AKM(0x10) = -47.725 dB error(-0.225 dB) */
+ 0x10, /* [096] = -48.000 dB -> AKM(0x10) = -47.725 dB error(+0.275 dB) */
+ 0x0f, /* [097] = -48.500 dB -> AKM(0x0f) = -48.553 dB error(-0.053 dB) */
+ 0x0e, /* [098] = -49.000 dB -> AKM(0x0e) = -49.152 dB error(-0.152 dB) */
+ 0x0d, /* [099] = -49.500 dB -> AKM(0x0d) = -49.796 dB error(-0.296 dB) */
+ 0x0d, /* [100] = -50.000 dB -> AKM(0x0d) = -49.796 dB error(+0.204 dB) */
+ 0x0c, /* [101] = -50.500 dB -> AKM(0x0c) = -50.491 dB error(+0.009 dB) */
+ 0x0b, /* [102] = -51.000 dB -> AKM(0x0b) = -51.247 dB error(-0.247 dB) */
+ 0x0b, /* [103] = -51.500 dB -> AKM(0x0b) = -51.247 dB error(+0.253 dB) */
+ 0x0a, /* [104] = -52.000 dB -> AKM(0x0a) = -52.075 dB error(-0.075 dB) */
+ 0x0a, /* [105] = -52.500 dB -> AKM(0x0a) = -52.075 dB error(+0.425 dB) */
+ 0x09, /* [106] = -53.000 dB -> AKM(0x09) = -52.990 dB error(+0.010 dB) */
+ 0x09, /* [107] = -53.500 dB -> AKM(0x09) = -52.990 dB error(+0.510 dB) */
+ 0x08, /* [108] = -54.000 dB -> AKM(0x08) = -54.013 dB error(-0.013 dB) */
+ 0x08, /* [109] = -54.500 dB -> AKM(0x08) = -54.013 dB error(+0.487 dB) */
+ 0x07, /* [110] = -55.000 dB -> AKM(0x07) = -55.173 dB error(-0.173 dB) */
+ 0x07, /* [111] = -55.500 dB -> AKM(0x07) = -55.173 dB error(+0.327 dB) */
+ 0x06, /* [112] = -56.000 dB -> AKM(0x06) = -56.512 dB error(-0.512 dB) */
+ 0x06, /* [113] = -56.500 dB -> AKM(0x06) = -56.512 dB error(-0.012 dB) */
+ 0x06, /* [114] = -57.000 dB -> AKM(0x06) = -56.512 dB error(+0.488 dB) */
+ 0x05, /* [115] = -57.500 dB -> AKM(0x05) = -58.095 dB error(-0.595 dB) */
+ 0x05, /* [116] = -58.000 dB -> AKM(0x05) = -58.095 dB error(-0.095 dB) */
+ 0x05, /* [117] = -58.500 dB -> AKM(0x05) = -58.095 dB error(+0.405 dB) */
+ 0x05, /* [118] = -59.000 dB -> AKM(0x05) = -58.095 dB error(+0.905 dB) */
+ 0x04, /* [119] = -59.500 dB -> AKM(0x04) = -60.034 dB error(-0.534 dB) */
+ 0x04, /* [120] = -60.000 dB -> AKM(0x04) = -60.034 dB error(-0.034 dB) */
+ 0x04, /* [121] = -60.500 dB -> AKM(0x04) = -60.034 dB error(+0.466 dB) */
+ 0x04, /* [122] = -61.000 dB -> AKM(0x04) = -60.034 dB error(+0.966 dB) */
+ 0x03, /* [123] = -61.500 dB -> AKM(0x03) = -62.532 dB error(-1.032 dB) */
+ 0x03, /* [124] = -62.000 dB -> AKM(0x03) = -62.532 dB error(-0.532 dB) */
+ 0x03, /* [125] = -62.500 dB -> AKM(0x03) = -62.532 dB error(-0.032 dB) */
+ 0x03, /* [126] = -63.000 dB -> AKM(0x03) = -62.532 dB error(+0.468 dB) */
+ 0x03, /* [127] = -63.500 dB -> AKM(0x03) = -62.532 dB error(+0.968 dB) */
+ 0x03, /* [128] = -64.000 dB -> AKM(0x03) = -62.532 dB error(+1.468 dB) */
+ 0x02, /* [129] = -64.500 dB -> AKM(0x02) = -66.054 dB error(-1.554 dB) */
+ 0x02, /* [130] = -65.000 dB -> AKM(0x02) = -66.054 dB error(-1.054 dB) */
+ 0x02, /* [131] = -65.500 dB -> AKM(0x02) = -66.054 dB error(-0.554 dB) */
+ 0x02, /* [132] = -66.000 dB -> AKM(0x02) = -66.054 dB error(-0.054 dB) */
+ 0x02, /* [133] = -66.500 dB -> AKM(0x02) = -66.054 dB error(+0.446 dB) */
+ 0x02, /* [134] = -67.000 dB -> AKM(0x02) = -66.054 dB error(+0.946 dB) */
+ 0x02, /* [135] = -67.500 dB -> AKM(0x02) = -66.054 dB error(+1.446 dB) */
+ 0x02, /* [136] = -68.000 dB -> AKM(0x02) = -66.054 dB error(+1.946 dB) */
+ 0x02, /* [137] = -68.500 dB -> AKM(0x02) = -66.054 dB error(+2.446 dB) */
+ 0x02, /* [138] = -69.000 dB -> AKM(0x02) = -66.054 dB error(+2.946 dB) */
+ 0x01, /* [139] = -69.500 dB -> AKM(0x01) = -72.075 dB error(-2.575 dB) */
+ 0x01, /* [140] = -70.000 dB -> AKM(0x01) = -72.075 dB error(-2.075 dB) */
+ 0x01, /* [141] = -70.500 dB -> AKM(0x01) = -72.075 dB error(-1.575 dB) */
+ 0x01, /* [142] = -71.000 dB -> AKM(0x01) = -72.075 dB error(-1.075 dB) */
+ 0x01, /* [143] = -71.500 dB -> AKM(0x01) = -72.075 dB error(-0.575 dB) */
+ 0x01, /* [144] = -72.000 dB -> AKM(0x01) = -72.075 dB error(-0.075 dB) */
+ 0x01, /* [145] = -72.500 dB -> AKM(0x01) = -72.075 dB error(+0.425 dB) */
+ 0x01, /* [146] = -73.000 dB -> AKM(0x01) = -72.075 dB error(+0.925 dB) */
+ 0x00}; /* [147] = -73.500 dB -> AKM(0x00) = mute error(+infini) */
/*
* pseudo-codec write entry
@@ -738,7 +738,7 @@ static void vx2_reset_codec(struct vx_core *_chip)
msleep(5); /* additionnel wait time for AKM's */
vx2_write_codec_reg(_chip, AKM_CODEC_POWER_CONTROL_CMD); /* DAC power up, ADC power up, Vref power down */
-
+
vx2_write_codec_reg(_chip, AKM_CODEC_CLOCK_FORMAT_CMD); /* default */
vx2_write_codec_reg(_chip, AKM_CODEC_MUTE_CMD); /* Mute = ON ,Deemphasis = OFF */
vx2_write_codec_reg(_chip, AKM_CODEC_RESET_OFF_CMD); /* DAC and ADC normal operation */
@@ -798,7 +798,7 @@ static void vx2_reset_board(struct vx_core *_chip, int cold_reset)
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
/* initialize the register values */
- chip->regCDSP = VX_CDSP_CODEC_RESET_MASK | VX_CDSP_DSP_RESET_MASK ;
+ chip->regCDSP = VX_CDSP_CODEC_RESET_MASK | VX_CDSP_DSP_RESET_MASK;
chip->regCFG = 0;
}
1
0
09 Sep '08
- <asm/io.h> -> <linux/io.h>
- remove trailing whitespaces
- convert comments
Only compile tested.
Signed-off-by: Alexander Beregalov <a.beregalov(a)gmail.com>
---
sound/pci/via82xx.c | 76 ++++++++++++++++++++++----------------------
sound/pci/via82xx_modem.c | 60 ++++++++++++++++++------------------
2 files changed, 68 insertions(+), 68 deletions(-)
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 1aafe95..8a84cb2 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -43,10 +43,10 @@
* routines for each chipset.
*
* Sep. 26, 2005 Karsten Wiese <annabellesgarden(a)yahoo.de>
- * - Optimize position calculation for the 823x chips.
+ * - Optimize position calculation for the 823x chips.
*/
-#include <asm/io.h>
+#include <linux/io.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
@@ -146,7 +146,7 @@ module_param(enable, bool, 0444);
#define VIA_REG_CTRL_TERMINATE 0x40 /* WO */
#define VIA_REG_CTRL_AUTOSTART 0x20
#define VIA_REG_CTRL_PAUSE 0x08 /* RW */
-#define VIA_REG_CTRL_INT_STOP 0x04
+#define VIA_REG_CTRL_INT_STOP 0x04
#define VIA_REG_CTRL_INT_EOL 0x02
#define VIA_REG_CTRL_INT_FLAG 0x01
#define VIA_REG_CTRL_RESET 0x01 /* RW - probably reset? undocumented */
@@ -310,7 +310,7 @@ DEFINE_VIA_REGSET(CAPTURE_8233, 0x60);
struct snd_via_sg_table {
unsigned int offset;
unsigned int size;
-} ;
+};
#define VIA_TABLE_SIZE 255
#define VIA_MAX_BUFSIZE (1<<24)
@@ -431,9 +431,9 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
&dev->table) < 0)
return -ENOMEM;
}
- if (! dev->idx_table) {
+ if (!dev->idx_table) {
dev->idx_table = kmalloc(sizeof(*dev->idx_table) * VIA_TABLE_SIZE, GFP_KERNEL);
- if (! dev->idx_table)
+ if (!dev->idx_table)
return -ENOMEM;
}
@@ -459,14 +459,14 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
((u32 *)dev->table.area)[idx << 1] = cpu_to_le32(addr);
r = snd_pcm_sgbuf_get_chunk_size(substream, ofs, rest);
rest -= r;
- if (! rest) {
+ if (!rest) {
if (i == periods - 1)
flag = VIA_TBL_BIT_EOL; /* buffer boundary */
else
flag = VIA_TBL_BIT_FLAG; /* period boundary */
} else
flag = 0; /* period continues to the next */
- // printk("via: tbl %d: at %d size %d (rest %d)\n", idx, ofs, r, rest);
+ /* printk("via: tbl %d: at %d size %d (rest %d)\n", idx, ofs, r, rest); */
((u32 *)dev->table.area)[(idx<<1) + 1] = cpu_to_le32(r | flag);
dev->idx_table[idx].offset = ofs;
dev->idx_table[idx].size = r;
@@ -502,17 +502,17 @@ static inline unsigned int snd_via82xx_codec_xread(struct via82xx *chip)
{
return inl(VIAREG(chip, AC97));
}
-
+
static inline void snd_via82xx_codec_xwrite(struct via82xx *chip, unsigned int val)
{
outl(val, VIAREG(chip, AC97));
}
-
+
static int snd_via82xx_codec_ready(struct via82xx *chip, int secondary)
{
unsigned int timeout = 1000; /* 1ms */
unsigned int val;
-
+
while (timeout-- > 0) {
udelay(1);
if (!((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY))
@@ -522,14 +522,14 @@ static int snd_via82xx_codec_ready(struct via82xx *chip, int secondary)
secondary, snd_via82xx_codec_xread(chip));
return -EIO;
}
-
+
static int snd_via82xx_codec_valid(struct via82xx *chip, int secondary)
{
unsigned int timeout = 1000; /* 1ms */
unsigned int val, val1;
unsigned int stat = !secondary ? VIA_REG_AC97_PRIMARY_VALID :
VIA_REG_AC97_SECONDARY_VALID;
-
+
while (timeout-- > 0) {
val = snd_via82xx_codec_xread(chip);
val1 = val & (VIA_REG_AC97_BUSY | stat);
@@ -539,7 +539,7 @@ static int snd_via82xx_codec_valid(struct via82xx *chip, int secondary)
}
return -EIO;
}
-
+
static void snd_via82xx_codec_wait(struct snd_ac97 *ac97)
{
struct via82xx *chip = ac97->private_data;
@@ -602,7 +602,7 @@ static void snd_via82xx_channel_reset(struct via82xx *chip, struct viadev *viade
/* clear interrupts */
outb(0x03, VIADEV_REG(viadev, OFFSET_STATUS));
outb(0x00, VIADEV_REG(viadev, OFFSET_TYPE)); /* for via686 */
- // outl(0, VIADEV_REG(viadev, OFFSET_CURR_PTR));
+ /* outl(0, VIADEV_REG(viadev, OFFSET_CURR_PTR)); */
viadev->lastpos = 0;
viadev->hwptr_done = 0;
}
@@ -619,7 +619,7 @@ static irqreturn_t snd_via686_interrupt(int irq, void *dev_id)
unsigned int i;
status = inl(VIAREG(chip, SGD_SHADOW));
- if (! (status & chip->intr_mask)) {
+ if (!(status & chip->intr_mask)) {
if (chip->rmidi)
/* check mpu401 interrupt */
return snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data);
@@ -631,12 +631,12 @@ static irqreturn_t snd_via686_interrupt(int irq, void *dev_id)
for (i = 0; i < chip->num_devs; i++) {
struct viadev *viadev = &chip->devs[i];
unsigned char c_status = inb(VIADEV_REG(viadev, OFFSET_STATUS));
- if (! (c_status & (VIA_REG_STAT_EOL|VIA_REG_STAT_FLAG|VIA_REG_STAT_STOPPED)))
+ if (!(c_status & (VIA_REG_STAT_EOL|VIA_REG_STAT_FLAG|VIA_REG_STAT_STOPPED)))
continue;
if (viadev->substream && viadev->running) {
/*
* Update hwptr_done based on 'period elapsed'
- * interrupts. We'll use it, when the chip returns 0
+ * interrupts. We'll use it, when the chip returns 0
* for OFFSET_CURR_COUNT.
*/
if (c_status & VIA_REG_STAT_EOL)
@@ -685,7 +685,7 @@ static irqreturn_t snd_via8233_interrupt(int irq, void *dev_id)
if (substream && viadev->running) {
/*
* Update hwptr_done based on 'period elapsed'
- * interrupts. We'll use it, when the chip returns 0
+ * interrupts. We'll use it, when the chip returns 0
* for OFFSET_CURR_COUNT.
*/
if (c_status & VIA_REG_STAT_EOL)
@@ -783,7 +783,7 @@ static inline unsigned int calc_linear_pos(struct viadev *viadev, unsigned int i
(int)size, (int)count);
res = viadev->lastpos;
} else {
- if (! count) {
+ if (!count) {
/* Some mobos report count = 0 on the DMA boundary,
* i.e. count = size indeed.
* Let's check whether this step is above the expected size.
@@ -855,7 +855,7 @@ static snd_pcm_uframes_t snd_via8233_pcm_pointer(struct snd_pcm_substream *subst
struct viadev *viadev = substream->runtime->private_data;
unsigned int idx, count, res;
int status;
-
+
if (snd_BUG_ON(!viadev->tbl_entries))
return 0;
@@ -865,7 +865,7 @@ static snd_pcm_uframes_t snd_via8233_pcm_pointer(struct snd_pcm_substream *subst
if (!status)
status = inb(VIADEV_REG(viadev, OFFSET_STATUS));
- /* An apparent bug in the 8251 is worked around by sending a
+ /* An apparent bug in the 8251 is worked around by sending a
* REG_CTRL_START. */
if (chip->revision == VIA_REV_8251 && (status & VIA_REG_STAT_EOL))
snd_via82xx_pcm_trigger(substream, SNDRV_PCM_TRIGGER_START);
@@ -896,7 +896,7 @@ static snd_pcm_uframes_t snd_via8233_pcm_pointer(struct snd_pcm_substream *subst
res += viadev->fragsize;
}
}
- }
+ }
unlock:
viadev->lastpos = res;
spin_unlock(&chip->reg_lock);
@@ -1166,7 +1166,7 @@ static int snd_via82xx_pcm_open(struct via82xx *chip, struct viadev *viadev,
struct via_rate_lock *ratep;
runtime->hw = snd_via82xx_hw;
-
+
/* set the hw rate condition */
ratep = &chip->rates[viadev->direction];
spin_lock_irq(&ratep->lock);
@@ -1185,7 +1185,7 @@ static int snd_via82xx_pcm_open(struct via82xx *chip, struct viadev *viadev,
SNDRV_PCM_RATE_8000_48000);
runtime->hw.rate_min = 8000;
runtime->hw.rate_max = 48000;
- } else if (! ratep->rate) {
+ } else if (!ratep->rate) {
int idx = viadev->direction ? AC97_RATES_ADC : AC97_RATES_FRONT_DAC;
runtime->hw.rates = chip->ac97->rates[idx];
snd_pcm_limit_hw_rates(runtime);
@@ -1276,11 +1276,11 @@ static int snd_via82xx_pcm_close(struct snd_pcm_substream *substream)
ratep = &chip->rates[viadev->direction];
spin_lock_irq(&ratep->lock);
ratep->used--;
- if (! ratep->used)
+ if (!ratep->used)
ratep->rate = 0;
spin_unlock_irq(&ratep->lock);
- if (! ratep->rate) {
- if (! viadev->direction) {
+ if (!ratep->rate) {
+ if (!viadev->direction) {
snd_ac97_update_power(chip->ac97,
AC97_PCM_FRONT_DAC_RATE, 0);
snd_ac97_update_power(chip->ac97,
@@ -1457,7 +1457,7 @@ static int __devinit snd_via8233a_pcm_new(struct via82xx *chip)
64*1024, VIA_MAX_BUFSIZE);
/* SPDIF supported? */
- if (! ac97_can_spdif(chip->ac97))
+ if (!ac97_can_spdif(chip->ac97))
return 0;
/* PCM #1: DXS3 playback (for spdif) */
@@ -1921,7 +1921,7 @@ static int __devinit snd_via8233_init_misc(struct via82xx *chip)
memset(&sid, 0, sizeof(sid));
strcpy(sid.name, "PCM Playback Volume");
sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
- if (! snd_ctl_find_id(chip->card, &sid)) {
+ if (!snd_ctl_find_id(chip->card, &sid)) {
snd_printd(KERN_INFO "Using DXS as PCM Playback\n");
err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_pcmdxs_volume_control, chip));
if (err < 0)
@@ -2026,7 +2026,7 @@ static void snd_via82xx_proc_read(struct snd_info_entry *entry,
{
struct via82xx *chip = entry->private_data;
int i;
-
+
snd_iprintf(buffer, "%s\n\n", chip->card->longname);
for (i = 0; i < 0xa0; i += 4) {
snd_iprintf(buffer, "%02x: %08x\n", i, inl(chip->port + i));
@@ -2037,7 +2037,7 @@ static void __devinit snd_via82xx_proc_init(struct via82xx *chip)
{
struct snd_info_entry *entry;
- if (! snd_card_proc_new(chip->card, "via82xx", &entry))
+ if (!snd_card_proc_new(chip->card, "via82xx", &entry))
snd_info_set_text_ops(entry, chip, snd_via82xx_proc_read);
}
@@ -2057,7 +2057,7 @@ static int snd_via82xx_chip_init(struct via82xx *chip)
pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, 0);
#endif
pci_read_config_byte(chip->pci, VIA_ACLINK_STAT, &pval);
- if (! (pval & VIA_ACLINK_C00_READY)) { /* codec not ready? */
+ if (!(pval & VIA_ACLINK_C00_READY)) { /* codec not ready? */
/* deassert ACLink reset, force SYNC */
pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL,
VIA_ACLINK_CTRL_ENABLE |
@@ -2078,7 +2078,7 @@ static int snd_via82xx_chip_init(struct via82xx *chip)
pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL, VIA_ACLINK_CTRL_INIT);
udelay(100);
}
-
+
/* Make sure VRA is enabled, in case we didn't do a
* complete codec reset, above */
pci_read_config_byte(chip->pci, VIA_ACLINK_CTRL, &pval);
@@ -2239,7 +2239,7 @@ static int snd_via82xx_free(struct via82xx *chip)
if (chip->irq >= 0)
free_irq(chip->irq, chip);
- __end_hw:
+__end_hw:
release_and_free_resource(chip->mpu_res);
pci_release_regions(chip->pci);
@@ -2477,7 +2477,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
err = -EINVAL;
goto __error;
}
-
+
if ((err = snd_via82xx_create(card, pci, chip_type, pci->revision,
ac97_clock, &chip)) < 0)
goto __error;
@@ -2493,7 +2493,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
if (chip_type == TYPE_VIA8233A) {
if ((err = snd_via8233a_pcm_new(chip)) < 0)
goto __error;
- // chip->dxs_fixed = 1; /* FIXME: use 48k for DXS #3? */
+ /* chip->dxs_fixed = 1; FIXME: use 48k for DXS #3? */
} else {
if ((err = snd_via8233_pcm_new(chip)) < 0)
goto __error;
@@ -2527,7 +2527,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
pci_set_drvdata(pci, card);
return 0;
- __error:
+__error:
snd_card_free(card);
return err;
}
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c
index 5bd79d2..833f56e 100644
--- a/sound/pci/via82xx_modem.c
+++ b/sound/pci/via82xx_modem.c
@@ -31,7 +31,7 @@
* modems.
*/
-#include <asm/io.h>
+#include <linux/io.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
@@ -90,7 +90,7 @@ module_param(enable, bool, 0444);
#define VIA_REG_CTRL_TERMINATE 0x40 /* WO */
#define VIA_REG_CTRL_AUTOSTART 0x20
#define VIA_REG_CTRL_PAUSE 0x08 /* RW */
-#define VIA_REG_CTRL_INT_STOP 0x04
+#define VIA_REG_CTRL_INT_STOP 0x04
#define VIA_REG_CTRL_INT_EOL 0x02
#define VIA_REG_CTRL_INT_FLAG 0x01
#define VIA_REG_CTRL_RESET 0x01 /* RW - probably reset? undocumented */
@@ -212,7 +212,7 @@ DEFINE_VIA_REGSET(MI, 0x50);
struct snd_via_sg_table {
unsigned int offset;
unsigned int size;
-} ;
+};
#define VIA_TABLE_SIZE 255
@@ -291,9 +291,9 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
&dev->table) < 0)
return -ENOMEM;
}
- if (! dev->idx_table) {
+ if (!dev->idx_table) {
dev->idx_table = kmalloc(sizeof(*dev->idx_table) * VIA_TABLE_SIZE, GFP_KERNEL);
- if (! dev->idx_table)
+ if (!dev->idx_table)
return -ENOMEM;
}
@@ -321,14 +321,14 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
if (rest < r)
r = rest;
rest -= r;
- if (! rest) {
+ if (!rest) {
if (i == periods - 1)
flag = VIA_TBL_BIT_EOL; /* buffer boundary */
else
flag = VIA_TBL_BIT_FLAG; /* period boundary */
} else
flag = 0; /* period continues to the next */
- // printk("via: tbl %d: at %d size %d (rest %d)\n", idx, ofs, r, rest);
+ /* printk("via: tbl %d: at %d size %d (rest %d)\n", idx, ofs, r, rest); */
((u32 *)dev->table.area)[(idx<<1) + 1] = cpu_to_le32(r | flag);
dev->idx_table[idx].offset = ofs;
dev->idx_table[idx].size = r;
@@ -363,17 +363,17 @@ static inline unsigned int snd_via82xx_codec_xread(struct via82xx_modem *chip)
{
return inl(VIAREG(chip, AC97));
}
-
+
static inline void snd_via82xx_codec_xwrite(struct via82xx_modem *chip, unsigned int val)
{
outl(val, VIAREG(chip, AC97));
}
-
+
static int snd_via82xx_codec_ready(struct via82xx_modem *chip, int secondary)
{
unsigned int timeout = 1000; /* 1ms */
unsigned int val;
-
+
while (timeout-- > 0) {
udelay(1);
if (!((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY))
@@ -383,14 +383,14 @@ static int snd_via82xx_codec_ready(struct via82xx_modem *chip, int secondary)
secondary, snd_via82xx_codec_xread(chip));
return -EIO;
}
-
+
static int snd_via82xx_codec_valid(struct via82xx_modem *chip, int secondary)
{
unsigned int timeout = 1000; /* 1ms */
unsigned int val, val1;
unsigned int stat = !secondary ? VIA_REG_AC97_PRIMARY_VALID :
VIA_REG_AC97_SECONDARY_VALID;
-
+
while (timeout-- > 0) {
val = snd_via82xx_codec_xread(chip);
val1 = val & (VIA_REG_AC97_BUSY | stat);
@@ -400,7 +400,7 @@ static int snd_via82xx_codec_valid(struct via82xx_modem *chip, int secondary)
}
return -EIO;
}
-
+
static void snd_via82xx_codec_wait(struct snd_ac97 *ac97)
{
struct via82xx_modem *chip = ac97->private_data;
@@ -416,10 +416,10 @@ static void snd_via82xx_codec_write(struct snd_ac97 *ac97,
{
struct via82xx_modem *chip = ac97->private_data;
unsigned int xval;
- if(reg == AC97_GPIO_STATUS) {
+ if (reg == AC97_GPIO_STATUS) {
outl(val, VIAREG(chip, GPI_STATUS));
return;
- }
+ }
xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY;
xval <<= VIA_REG_AC97_CODEC_ID_SHIFT;
xval |= reg << VIA_REG_AC97_CMD_SHIFT;
@@ -466,7 +466,7 @@ static void snd_via82xx_channel_reset(struct via82xx_modem *chip, struct viadev
/* clear interrupts */
outb(0x03, VIADEV_REG(viadev, OFFSET_STATUS));
outb(0x00, VIADEV_REG(viadev, OFFSET_TYPE)); /* for via686 */
- // outl(0, VIADEV_REG(viadev, OFFSET_CURR_PTR));
+ /* outl(0, VIADEV_REG(viadev, OFFSET_CURR_PTR)); */
viadev->lastpos = 0;
}
@@ -482,7 +482,7 @@ static irqreturn_t snd_via82xx_interrupt(int irq, void *dev_id)
unsigned int i;
status = inl(VIAREG(chip, SGD_SHADOW));
- if (! (status & chip->intr_mask)) {
+ if (!(status & chip->intr_mask)) {
return IRQ_NONE;
}
// _skip_sgd:
@@ -493,7 +493,7 @@ static irqreturn_t snd_via82xx_interrupt(int irq, void *dev_id)
struct viadev *viadev = &chip->devs[i];
unsigned char c_status = inb(VIADEV_REG(viadev, OFFSET_STATUS));
c_status &= (VIA_REG_STAT_EOL|VIA_REG_STAT_FLAG|VIA_REG_STAT_STOPPED);
- if (! c_status)
+ if (!c_status)
continue;
if (viadev->substream && viadev->running) {
spin_unlock(&chip->reg_lock);
@@ -583,7 +583,7 @@ static inline unsigned int calc_linear_pos(struct viadev *viadev, unsigned int i
"using last valid pointer\n");
res = viadev->lastpos;
} else {
- if (! count)
+ if (!count)
/* bogus count 0 on the DMA boundary? */
res = viadev->idx_table[idx].offset;
else
@@ -744,7 +744,7 @@ static int snd_via82xx_modem_pcm_open(struct via82xx_modem *chip, struct viadev
};
runtime->hw = snd_via82xx_hw;
-
+
if ((err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&hw_constraints_rates)) < 0)
return err;
@@ -918,7 +918,7 @@ static void snd_via82xx_proc_read(struct snd_info_entry *entry, struct snd_info_
{
struct via82xx_modem *chip = entry->private_data;
int i;
-
+
snd_iprintf(buffer, "%s\n\n", chip->card->longname);
for (i = 0; i < 0xa0; i += 4) {
snd_iprintf(buffer, "%02x: %08x\n", i, inl(chip->port + i));
@@ -929,7 +929,7 @@ static void __devinit snd_via82xx_proc_init(struct via82xx_modem *chip)
{
struct snd_info_entry *entry;
- if (! snd_card_proc_new(chip->card, "via82xx", &entry))
+ if (!snd_card_proc_new(chip->card, "via82xx", &entry))
snd_info_set_text_ops(entry, chip, snd_via82xx_proc_read);
}
@@ -944,13 +944,13 @@ static int snd_via82xx_chip_init(struct via82xx_modem *chip)
unsigned char pval;
pci_read_config_byte(chip->pci, VIA_MC97_CTRL, &pval);
- if((pval & VIA_MC97_CTRL_INIT) != VIA_MC97_CTRL_INIT) {
+ if ((pval & VIA_MC97_CTRL_INIT) != VIA_MC97_CTRL_INIT) {
pci_write_config_byte(chip->pci, 0x44, pval|VIA_MC97_CTRL_INIT);
udelay(100);
}
pci_read_config_byte(chip->pci, VIA_ACLINK_STAT, &pval);
- if (! (pval & VIA_ACLINK_C00_READY)) { /* codec not ready? */
+ if (!(pval & VIA_ACLINK_C00_READY)) { /* codec not ready? */
/* deassert ACLink reset, force SYNC */
pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL,
VIA_ACLINK_CTRL_ENABLE |
@@ -970,7 +970,7 @@ static int snd_via82xx_chip_init(struct via82xx_modem *chip)
pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL, VIA_ACLINK_CTRL_INIT);
udelay(100);
}
-
+
pci_read_config_byte(chip->pci, VIA_ACLINK_CTRL, &pval);
if ((pval & VIA_ACLINK_CTRL_INIT) != VIA_ACLINK_CTRL_INIT) {
/* ACLink on, deassert ACLink reset, VSR, SGD data out */
@@ -1009,7 +1009,7 @@ static int snd_via82xx_chip_init(struct via82xx_modem *chip)
__ac97_ok2:
/* route FM trap to IRQ, disable FM trap */
- // pci_write_config_byte(chip->pci, VIA_FM_NMI_CTRL, 0);
+ /* pci_write_config_byte(chip->pci, VIA_FM_NMI_CTRL, 0); */
/* disable all GPI interrupts */
outl(0, VIAREG(chip, GPI_INTR));
@@ -1078,7 +1078,7 @@ static int snd_via82xx_free(struct via82xx_modem *chip)
for (i = 0; i < chip->num_devs; i++)
snd_via82xx_channel_reset(chip, &chip->devs[i]);
- __end_hw:
+__end_hw:
if (chip->irq >= 0)
free_irq(chip->irq, chip);
pci_release_regions(chip->pci);
@@ -1182,7 +1182,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
err = -EINVAL;
goto __error;
}
-
+
if ((err = snd_via82xx_create(card, pci, chip_type, pci->revision,
ac97_clock, &chip)) < 0)
goto __error;
@@ -1190,7 +1190,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
if ((err = snd_via82xx_mixer_new(chip)) < 0)
goto __error;
- if ((err = snd_via686_pcm_new(chip)) < 0 )
+ if ((err = snd_via686_pcm_new(chip)) < 0)
goto __error;
/* disable interrupts */
@@ -1209,7 +1209,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci,
pci_set_drvdata(pci, card);
return 0;
- __error:
+__error:
snd_card_free(card);
return err;
}
1
0
09 Sep '08
- <asm/io.h> -> <linux/io.h>
- remove trailing whitespaces
- convert comments
Only compile tested.
Signed-off-by: Alexander Beregalov <a.beregalov(a)gmail.com>
---
sound/pci/trident/trident.c | 4 +-
sound/pci/trident/trident_main.c | 478 ++++++++++++++++++------------------
sound/pci/trident/trident_memory.c | 12 +-
3 files changed, 247 insertions(+), 247 deletions(-)
diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c
index d94b16f..11b49f7 100644
--- a/sound/pci/trident/trident.c
+++ b/sound/pci/trident/trident.c
@@ -63,9 +63,9 @@ module_param_array(wavetable_size, int, NULL, 0444);
MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth.");
static struct pci_device_id snd_trident_ids[] = {
- {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX),
+ {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX),
PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0},
- {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX),
+ {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX),
0, 0, 0},
{PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7018), 0, 0, 0},
{ 0, }
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index c612b43..863f34f 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -43,7 +43,7 @@
#include <sound/trident.h>
#include <sound/asoundef.h>
-#include <asm/io.h>
+#include <linux/io.h>
static int snd_trident_pcm_mixer_build(struct snd_trident *trident,
struct snd_trident_voice * voice,
@@ -87,7 +87,7 @@ static void snd_trident_print_voice_regs(struct snd_trident *trident, int voice)
printk("ESO: 0x%x\n", val >> 16);
printk("Delta: 0x%x\n", val & 0xffff);
val = inl(TRID_REG(trident, CH_DX_FMC_RVOL_CVOL));
- } else { // TRIDENT_DEVICE_ID_NX
+ } else { /* TRIDENT_DEVICE_ID_NX */
val = inl(TRID_REG(trident, CH_NX_DELTA_CSO));
tmp = (val >> 24) & 0xff;
printk("CSO: 0x%x\n", val & 0x00ffffff);
@@ -107,15 +107,15 @@ static void snd_trident_print_voice_regs(struct snd_trident *trident, int voice)
/*---------------------------------------------------------------------------
unsigned short snd_trident_codec_read(struct snd_ac97 *ac97, unsigned short reg)
-
+
Description: This routine will do all of the reading from the external
CODEC (AC97).
-
+
Parameters: ac97 - ac97 codec structure
reg - CODEC register index, from AC97 Hal.
-
+
returns: 16 bit value read from the AC97.
-
+
---------------------------------------------------------------------------*/
static unsigned short snd_trident_codec_read(struct snd_ac97 *ac97, unsigned short reg)
{
@@ -167,16 +167,16 @@ static unsigned short snd_trident_codec_read(struct snd_ac97 *ac97, unsigned sho
/*---------------------------------------------------------------------------
void snd_trident_codec_write(struct snd_ac97 *ac97, unsigned short reg,
unsigned short wdata)
-
+
Description: This routine will do all of the writing to the external
CODEC (AC97).
-
+
Parameters: ac97 - ac97 codec structure
reg - CODEC register index, from AC97 Hal.
data - Lower 16 bits are the data to write to CODEC.
-
+
returns: TRUE if everything went ok, else FALSE.
-
+
---------------------------------------------------------------------------*/
static void snd_trident_codec_write(struct snd_ac97 *ac97, unsigned short reg,
unsigned short wdata)
@@ -236,14 +236,14 @@ static void snd_trident_codec_write(struct snd_ac97 *ac97, unsigned short reg,
/*---------------------------------------------------------------------------
void snd_trident_enable_eso(struct snd_trident *trident)
-
+
Description: This routine will enable end of loop interrupts.
End of loop interrupts will occur when a running
channel reaches ESO.
Also enables middle of loop interrupts.
-
+
Parameters: trident - pointer to target device class for 4DWave.
-
+
---------------------------------------------------------------------------*/
static void snd_trident_enable_eso(struct snd_trident * trident)
@@ -260,17 +260,17 @@ static void snd_trident_enable_eso(struct snd_trident * trident)
/*---------------------------------------------------------------------------
void snd_trident_disable_eso(struct snd_trident *trident)
-
+
Description: This routine will disable end of loop interrupts.
End of loop interrupts will occur when a running
channel reaches ESO.
Also disables middle of loop interrupts.
-
- Parameters:
+
+ Parameters:
trident - pointer to target device class for 4DWave.
-
+
returns: TRUE if everything went ok, else FALSE.
-
+
---------------------------------------------------------------------------*/
static void snd_trident_disable_eso(struct snd_trident * trident)
@@ -333,13 +333,13 @@ EXPORT_SYMBOL(snd_trident_stop_voice);
/*---------------------------------------------------------------------------
int snd_trident_allocate_pcm_channel(struct snd_trident *trident)
-
+
Description: Allocate hardware channel in Bank B (32-63).
-
+
Parameters : trident - pointer to target device class for 4DWave.
-
+
Return Value: hardware channel - 32-63 or -1 when no channel is available
-
+
---------------------------------------------------------------------------*/
static int snd_trident_allocate_pcm_channel(struct snd_trident * trident)
@@ -360,14 +360,14 @@ static int snd_trident_allocate_pcm_channel(struct snd_trident * trident)
/*---------------------------------------------------------------------------
void snd_trident_free_pcm_channel(int channel)
-
+
Description: Free hardware channel in Bank B (32-63)
-
+
Parameters : trident - pointer to target device class for 4DWave.
channel - hardware channel number 0-63
-
+
Return Value: none
-
+
---------------------------------------------------------------------------*/
static void snd_trident_free_pcm_channel(struct snd_trident *trident, int channel)
@@ -383,13 +383,13 @@ static void snd_trident_free_pcm_channel(struct snd_trident *trident, int channe
/*---------------------------------------------------------------------------
unsigned int snd_trident_allocate_synth_channel(void)
-
+
Description: Allocate hardware channel in Bank A (0-31).
-
+
Parameters : trident - pointer to target device class for 4DWave.
-
+
Return Value: hardware channel - 0-31 or -1 when no channel is available
-
+
---------------------------------------------------------------------------*/
static int snd_trident_allocate_synth_channel(struct snd_trident * trident)
@@ -407,15 +407,15 @@ static int snd_trident_allocate_synth_channel(struct snd_trident * trident)
}
/*---------------------------------------------------------------------------
- void snd_trident_free_synth_channel( int channel )
-
+ void snd_trident_free_synth_channel( int channel)
+
Description: Free hardware channel in Bank B (0-31).
-
+
Parameters : trident - pointer to target device class for 4DWave.
channel - hardware channel number 0-63
-
+
Return Value: none
-
+
---------------------------------------------------------------------------*/
static void snd_trident_free_synth_channel(struct snd_trident *trident, int channel)
@@ -431,14 +431,14 @@ static void snd_trident_free_synth_channel(struct snd_trident *trident, int chan
/*---------------------------------------------------------------------------
snd_trident_write_voice_regs
-
+
Description: This routine will complete and write the 5 hardware channel
registers to hardware.
-
+
Parameters: trident - pointer to target device class for 4DWave.
voice - synthesizer voice structure
Each register field.
-
+
---------------------------------------------------------------------------*/
void snd_trident_write_voice_regs(struct snd_trident * trident,
@@ -509,14 +509,14 @@ EXPORT_SYMBOL(snd_trident_write_voice_regs);
/*---------------------------------------------------------------------------
snd_trident_write_cso_reg
-
+
Description: This routine will write the new CSO offset
register to hardware.
-
+
Parameters: trident - pointer to target device class for 4DWave.
voice - synthesizer voice structure
CSO - new CSO value
-
+
---------------------------------------------------------------------------*/
static void snd_trident_write_cso_reg(struct snd_trident * trident,
@@ -535,14 +535,14 @@ static void snd_trident_write_cso_reg(struct snd_trident * trident,
/*---------------------------------------------------------------------------
snd_trident_write_eso_reg
-
+
Description: This routine will write the new ESO offset
register to hardware.
-
+
Parameters: trident - pointer to target device class for 4DWave.
voice - synthesizer voice structure
ESO - new ESO value
-
+
---------------------------------------------------------------------------*/
static void snd_trident_write_eso_reg(struct snd_trident * trident,
@@ -561,14 +561,14 @@ static void snd_trident_write_eso_reg(struct snd_trident * trident,
/*---------------------------------------------------------------------------
snd_trident_write_vol_reg
-
+
Description: This routine will write the new voice volume
register to hardware.
-
+
Parameters: trident - pointer to target device class for 4DWave.
voice - synthesizer voice structure
Vol - new voice volume
-
+
---------------------------------------------------------------------------*/
static void snd_trident_write_vol_reg(struct snd_trident * trident,
@@ -583,7 +583,7 @@ static void snd_trident_write_vol_reg(struct snd_trident * trident,
outb(voice->Vol >> 2, TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC + 2));
break;
case TRIDENT_DEVICE_ID_SI7018:
- // printk("voice->Vol = 0x%x\n", voice->Vol);
+ /* printk("voice->Vol = 0x%x\n", voice->Vol); */
outw((voice->CTRL << 12) | voice->Vol,
TRID_REG(trident, CH_GVSEL_PAN_VOL_CTRL_EC));
break;
@@ -592,14 +592,14 @@ static void snd_trident_write_vol_reg(struct snd_trident * trident,
/*---------------------------------------------------------------------------
snd_trident_write_pan_reg
-
+
Description: This routine will write the new voice pan
register to hardware.
-
+
Parameters: trident - pointer to target device class for 4DWave.
voice - synthesizer voice structure
Pan - new pan value
-
+
---------------------------------------------------------------------------*/
static void snd_trident_write_pan_reg(struct snd_trident * trident,
@@ -614,14 +614,14 @@ static void snd_trident_write_pan_reg(struct snd_trident * trident,
/*---------------------------------------------------------------------------
snd_trident_write_rvol_reg
-
+
Description: This routine will write the new reverb volume
register to hardware.
-
+
Parameters: trident - pointer to target device class for 4DWave.
voice - synthesizer voice structure
RVol - new reverb volume
-
+
---------------------------------------------------------------------------*/
static void snd_trident_write_rvol_reg(struct snd_trident * trident,
@@ -638,14 +638,14 @@ static void snd_trident_write_rvol_reg(struct snd_trident * trident,
/*---------------------------------------------------------------------------
snd_trident_write_cvol_reg
-
+
Description: This routine will write the new chorus volume
register to hardware.
-
+
Parameters: trident - pointer to target device class for 4DWave.
voice - synthesizer voice structure
CVol - new chorus volume
-
+
---------------------------------------------------------------------------*/
static void snd_trident_write_cvol_reg(struct snd_trident * trident,
@@ -664,21 +664,21 @@ static void snd_trident_write_cvol_reg(struct snd_trident * trident,
snd_trident_convert_rate
Description: This routine converts rate in HZ to hardware delta value.
-
+
Parameters: trident - pointer to target device class for 4DWave.
rate - Real or Virtual channel number.
-
+
Returns: Delta value.
-
+
---------------------------------------------------------------------------*/
static unsigned int snd_trident_convert_rate(unsigned int rate)
{
unsigned int delta;
- // We special case 44100 and 8000 since rounding with the equation
- // does not give us an accurate enough value. For 11025 and 22050
- // the equation gives us the best answer. All other frequencies will
- // also use the equation. JDW
+ /* We special case 44100 and 8000 since rounding with the equation */
+ /* does not give us an accurate enough value. For 11025 and 22050 */
+ /* the equation gives us the best answer. All other frequencies will */
+ /* also use the equation. JDW */
if (rate == 44100)
delta = 0xeb3;
else if (rate == 8000)
@@ -694,21 +694,21 @@ static unsigned int snd_trident_convert_rate(unsigned int rate)
snd_trident_convert_adc_rate
Description: This routine converts rate in HZ to hardware delta value.
-
+
Parameters: trident - pointer to target device class for 4DWave.
rate - Real or Virtual channel number.
-
+
Returns: Delta value.
-
+
---------------------------------------------------------------------------*/
static unsigned int snd_trident_convert_adc_rate(unsigned int rate)
{
unsigned int delta;
- // We special case 44100 and 8000 since rounding with the equation
- // does not give us an accurate enough value. For 11025 and 22050
- // the equation gives us the best answer. All other frequencies will
- // also use the equation. JDW
+ /* We special case 44100 and 8000 since rounding with the equation */
+ /* does not give us an accurate enough value. For 11025 and 22050 */
+ /* the equation gives us the best answer. All other frequencies will */
+ /* also use the equation. JDW */
if (rate == 44100)
delta = 0x116a;
else if (rate == 8000)
@@ -724,12 +724,12 @@ static unsigned int snd_trident_convert_adc_rate(unsigned int rate)
snd_trident_spurious_threshold
Description: This routine converts rate in HZ to spurious threshold.
-
+
Parameters: trident - pointer to target device class for 4DWave.
rate - Real or Virtual channel number.
-
+
Returns: Delta value.
-
+
---------------------------------------------------------------------------*/
static unsigned int snd_trident_spurious_threshold(unsigned int rate,
unsigned int period_size)
@@ -746,12 +746,12 @@ static unsigned int snd_trident_spurious_threshold(unsigned int rate,
snd_trident_control_mode
Description: This routine returns a control mode for a PCM channel.
-
+
Parameters: trident - pointer to target device class for 4DWave.
substream - PCM substream
-
+
Returns: Control value.
-
+
---------------------------------------------------------------------------*/
static unsigned int snd_trident_control_mode(struct snd_pcm_substream *substream)
{
@@ -763,11 +763,11 @@ static unsigned int snd_trident_control_mode(struct snd_pcm_substream *substream
*/
CTRL = 0x00000001;
if (snd_pcm_format_width(runtime->format) == 16)
- CTRL |= 0x00000008; // 16-bit data
+ CTRL |= 0x00000008; /* 16-bit data */
if (snd_pcm_format_signed(runtime->format))
- CTRL |= 0x00000002; // signed data
+ CTRL |= 0x00000002; /* signed data */
if (runtime->channels > 1)
- CTRL |= 0x00000004; // stereo data
+ CTRL |= 0x00000004; /* stereo data */
return CTRL;
}
@@ -777,15 +777,15 @@ static unsigned int snd_trident_control_mode(struct snd_pcm_substream *substream
/*---------------------------------------------------------------------------
snd_trident_ioctl
-
+
Description: Device I/O control handler for playback/capture parameters.
-
+
Parameters: substream - PCM substream class
cmd - what ioctl message to process
- arg - additional message infoarg
-
+ arg - additional message infoarg
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_ioctl(struct snd_pcm_substream *substream,
@@ -800,14 +800,14 @@ static int snd_trident_ioctl(struct snd_pcm_substream *substream,
/*---------------------------------------------------------------------------
snd_trident_allocate_pcm_mem
-
+
Description: Allocate PCM ring buffer for given substream
-
+
Parameters: substream - PCM substream class
hw_params - hardware parameters
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_allocate_pcm_mem(struct snd_pcm_substream *substream,
@@ -834,14 +834,14 @@ static int snd_trident_allocate_pcm_mem(struct snd_pcm_substream *substream,
/*---------------------------------------------------------------------------
snd_trident_allocate_evoice
-
+
Description: Allocate extra voice as interrupt generator
-
+
Parameters: substream - PCM substream class
hw_params - hardware parameters
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_allocate_evoice(struct snd_pcm_substream *substream,
@@ -874,14 +874,14 @@ static int snd_trident_allocate_evoice(struct snd_pcm_substream *substream,
/*---------------------------------------------------------------------------
snd_trident_hw_params
-
+
Description: Set the hardware parameters for the playback device.
-
+
Parameters: substream - PCM substream class
hw_params - hardware parameters
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_hw_params(struct snd_pcm_substream *substream,
@@ -897,13 +897,13 @@ static int snd_trident_hw_params(struct snd_pcm_substream *substream,
/*---------------------------------------------------------------------------
snd_trident_playback_hw_free
-
+
Description: Release the hardware resources for the playback device.
-
+
Parameters: substream - PCM substream class
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_hw_free(struct snd_pcm_substream *substream)
@@ -929,13 +929,13 @@ static int snd_trident_hw_free(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_playback_prepare
-
+
Description: Prepare playback device for playback.
-
+
Parameters: substream - PCM substream class
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_playback_prepare(struct snd_pcm_substream *substream)
@@ -946,7 +946,7 @@ static int snd_trident_playback_prepare(struct snd_pcm_substream *substream)
struct snd_trident_voice *evoice = voice->extra;
struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[substream->number];
- spin_lock_irq(&trident->reg_lock);
+ spin_lock_irq(&trident->reg_lock);
/* set delta (rate) value */
voice->Delta = snd_trident_convert_rate(runtime->rate);
@@ -957,7 +957,7 @@ static int snd_trident_playback_prepare(struct snd_pcm_substream *substream)
voice->LBA = voice->memblk->offset;
else
voice->LBA = runtime->dma_addr;
-
+
voice->CSO = 0;
voice->ESO = runtime->buffer_size - 1; /* in samples */
voice->CTRL = snd_trident_control_mode(substream);
@@ -1014,14 +1014,14 @@ static int snd_trident_playback_prepare(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_capture_hw_params
-
+
Description: Set the hardware parameters for the capture device.
-
+
Parameters: substream - PCM substream class
hw_params - hardware parameters
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_capture_hw_params(struct snd_pcm_substream *substream,
@@ -1032,13 +1032,13 @@ static int snd_trident_capture_hw_params(struct snd_pcm_substream *substream,
/*---------------------------------------------------------------------------
snd_trident_capture_prepare
-
+
Description: Prepare capture device for playback.
-
+
Parameters: substream - PCM substream class
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_capture_prepare(struct snd_pcm_substream *substream)
@@ -1050,29 +1050,29 @@ static int snd_trident_capture_prepare(struct snd_pcm_substream *substream)
spin_lock_irq(&trident->reg_lock);
- // Initilize the channel and set channel Mode
+ /* Initilize the channel and set channel Mode */
outb(0, TRID_REG(trident, LEGACY_DMAR15));
- // Set DMA channel operation mode register
+ /* Set DMA channel operation mode register */
outb(0x54, TRID_REG(trident, LEGACY_DMAR11));
- // Set channel buffer Address, DMAR0 expects contiguous PCI memory area
+ /* Set channel buffer Address, DMAR0 expects contiguous PCI memory area */
voice->LBA = runtime->dma_addr;
outl(voice->LBA, TRID_REG(trident, LEGACY_DMAR0));
if (voice->memblk)
voice->LBA = voice->memblk->offset;
- // set ESO
+ /* set ESO */
ESO_bytes = snd_pcm_lib_buffer_bytes(substream) - 1;
outb((ESO_bytes & 0x00ff0000) >> 16, TRID_REG(trident, LEGACY_DMAR6));
outw((ESO_bytes & 0x0000ffff), TRID_REG(trident, LEGACY_DMAR4));
ESO_bytes++;
- // Set channel sample rate, 4.12 format
+ /* Set channel sample rate, 4.12 format */
val = (((unsigned int) 48000L << 12) + (runtime->rate/2)) / runtime->rate;
outw(val, TRID_REG(trident, T4D_SBDELTA_DELTA_R));
- // Set channel interrupt blk length
+ /* Set channel interrupt blk length */
if (snd_pcm_format_width(runtime->format) == 16) {
val = (unsigned short) ((ESO_bytes >> 1) - 1);
} else {
@@ -1081,9 +1081,9 @@ static int snd_trident_capture_prepare(struct snd_pcm_substream *substream)
outl((val << 16) | val, TRID_REG(trident, T4D_SBBL_SBCL));
- // Right now, set format and start to run captureing,
- // continuous run loop enable.
- trident->bDMAStart = 0x19; // 0001 1001b
+ /* Right now, set format and start to run captureing, */
+ /* continuous run loop enable. */
+ trident->bDMAStart = 0x19; /* 0001 1001b */
if (snd_pcm_format_width(runtime->format) == 16)
trident->bDMAStart |= 0x80;
@@ -1092,7 +1092,7 @@ static int snd_trident_capture_prepare(struct snd_pcm_substream *substream)
if (runtime->channels > 1)
trident->bDMAStart |= 0x40;
- // Prepare capture intr channel
+ /* Prepare capture intr channel */
voice->Delta = snd_trident_convert_rate(runtime->rate);
voice->spurious_threshold = snd_trident_spurious_threshold(runtime->rate, runtime->period_size);
@@ -1100,7 +1100,7 @@ static int snd_trident_capture_prepare(struct snd_pcm_substream *substream)
voice->isync_mark = runtime->period_size;
voice->isync_max = runtime->buffer_size;
- // Set voice parameters
+ /* Set voice parameters */
voice->CSO = 0;
voice->ESO = voice->isync_ESO = (runtime->period_size * 2) + 6 - 1;
voice->CTRL = snd_trident_control_mode(substream);
@@ -1123,14 +1123,14 @@ static int snd_trident_capture_prepare(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_si7018_capture_hw_params
-
+
Description: Set the hardware parameters for the capture device.
-
+
Parameters: substream - PCM substream class
hw_params - hardware parameters
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_si7018_capture_hw_params(struct snd_pcm_substream *substream,
@@ -1146,13 +1146,13 @@ static int snd_trident_si7018_capture_hw_params(struct snd_pcm_substream *substr
/*---------------------------------------------------------------------------
snd_trident_si7018_capture_hw_free
-
+
Description: Release the hardware resources for the capture device.
-
+
Parameters: substream - PCM substream class
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_si7018_capture_hw_free(struct snd_pcm_substream *substream)
@@ -1172,13 +1172,13 @@ static int snd_trident_si7018_capture_hw_free(struct snd_pcm_substream *substrea
/*---------------------------------------------------------------------------
snd_trident_si7018_capture_prepare
-
+
Description: Prepare capture device for playback.
-
+
Parameters: substream - PCM substream class
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_si7018_capture_prepare(struct snd_pcm_substream *substream)
@@ -1194,7 +1194,7 @@ static int snd_trident_si7018_capture_prepare(struct snd_pcm_substream *substrea
voice->Delta = snd_trident_convert_adc_rate(runtime->rate);
voice->spurious_threshold = snd_trident_spurious_threshold(runtime->rate, runtime->period_size);
- // Set voice parameters
+ /* Set voice parameters */
voice->CSO = 0;
voice->ESO = runtime->buffer_size - 1; /* in samples */
voice->CTRL = snd_trident_control_mode(substream);
@@ -1236,20 +1236,20 @@ static int snd_trident_si7018_capture_prepare(struct snd_pcm_substream *substrea
evoice->isync_mark = runtime->period_size;
evoice->ESO = (runtime->period_size * 2) - 1;
}
-
+
spin_unlock_irq(&trident->reg_lock);
return 0;
}
/*---------------------------------------------------------------------------
snd_trident_foldback_prepare
-
+
Description: Prepare foldback capture device for playback.
-
+
Parameters: substream - PCM substream class
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_foldback_prepare(struct snd_pcm_substream *substream)
@@ -1320,14 +1320,14 @@ static int snd_trident_foldback_prepare(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_spdif_hw_params
-
+
Description: Set the hardware parameters for the spdif device.
-
+
Parameters: substream - PCM substream class
hw_params - hardware parameters
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_spdif_hw_params(struct snd_pcm_substream *substream,
@@ -1355,21 +1355,21 @@ static int snd_trident_spdif_hw_params(struct snd_pcm_substream *substream,
else
trident->spdif_pcm_bits &= ~(IEC958_AES3_CON_FS << 24);
if (params_rate(hw_params) >= 48000) {
- trident->spdif_pcm_ctrl = 0x3c; // 48000 Hz
+ trident->spdif_pcm_ctrl = 0x3c; /* 48000 Hz */
trident->spdif_pcm_bits |=
trident->spdif_bits & IEC958_AES0_PROFESSIONAL ?
IEC958_AES0_PRO_FS_48000 :
(IEC958_AES3_CON_FS_48000 << 24);
}
else if (params_rate(hw_params) >= 44100) {
- trident->spdif_pcm_ctrl = 0x3e; // 44100 Hz
+ trident->spdif_pcm_ctrl = 0x3e; /* 44100 Hz */
trident->spdif_pcm_bits |=
trident->spdif_bits & IEC958_AES0_PROFESSIONAL ?
IEC958_AES0_PRO_FS_44100 :
(IEC958_AES3_CON_FS_44100 << 24);
}
else {
- trident->spdif_pcm_ctrl = 0x3d; // 32000 Hz
+ trident->spdif_pcm_ctrl = 0x3d; /* 32000 Hz */
trident->spdif_pcm_bits |=
trident->spdif_bits & IEC958_AES0_PROFESSIONAL ?
IEC958_AES0_PRO_FS_32000 :
@@ -1386,13 +1386,13 @@ static int snd_trident_spdif_hw_params(struct snd_pcm_substream *substream,
/*---------------------------------------------------------------------------
snd_trident_spdif_prepare
-
+
Description: Prepare SPDIF device for playback.
-
+
Parameters: substream - PCM substream class
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_spdif_prepare(struct snd_pcm_substream *substream)
@@ -1458,7 +1458,7 @@ static int snd_trident_spdif_prepare(struct snd_pcm_substream *substream)
outl(trident->spdif_pcm_bits, TRID_REG(trident, NX_SPCSTATUS));
} else { /* SiS */
-
+
/* set delta (rate) value */
voice->Delta = 0x800;
voice->spurious_threshold = snd_trident_spurious_threshold(48000, runtime->period_size);
@@ -1524,19 +1524,19 @@ static int snd_trident_spdif_prepare(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_trigger
-
+
Description: Start/stop devices
-
+
Parameters: substream - PCM substream class
cmd - trigger command (STOP, GO)
-
+
Returns: Error status
-
+
---------------------------------------------------------------------------*/
static int snd_trident_trigger(struct snd_pcm_substream *substream,
int cmd)
-
+
{
struct snd_trident *trident = snd_pcm_substream_chip(substream);
struct snd_pcm_substream *s;
@@ -1624,13 +1624,13 @@ static int snd_trident_trigger(struct snd_pcm_substream *substream,
/*---------------------------------------------------------------------------
snd_trident_playback_pointer
-
+
Description: This routine return the playback position
-
+
Parameters: substream - PCM substream class
Returns: position of buffer
-
+
---------------------------------------------------------------------------*/
static snd_pcm_uframes_t snd_trident_playback_pointer(struct snd_pcm_substream *substream)
@@ -1649,7 +1649,7 @@ static snd_pcm_uframes_t snd_trident_playback_pointer(struct snd_pcm_substream *
if (trident->device != TRIDENT_DEVICE_ID_NX) {
cso = inw(TRID_REG(trident, CH_DX_CSO_ALPHA_FMS + 2));
- } else { // ID_4DWAVE_NX
+ } else { /* ID_4DWAVE_NX */
cso = (unsigned int) inl(TRID_REG(trident, CH_NX_DELTA_CSO)) & 0x00ffffff;
}
@@ -1663,13 +1663,13 @@ static snd_pcm_uframes_t snd_trident_playback_pointer(struct snd_pcm_substream *
/*---------------------------------------------------------------------------
snd_trident_capture_pointer
-
+
Description: This routine return the capture position
-
+
Parameters: pcm1 - PCM device class
Returns: position of buffer
-
+
---------------------------------------------------------------------------*/
static snd_pcm_uframes_t snd_trident_capture_pointer(struct snd_pcm_substream *substream)
@@ -1693,13 +1693,13 @@ static snd_pcm_uframes_t snd_trident_capture_pointer(struct snd_pcm_substream *s
/*---------------------------------------------------------------------------
snd_trident_spdif_pointer
-
+
Description: This routine return the SPDIF playback position
-
+
Parameters: substream - PCM substream class
Returns: position of buffer
-
+
---------------------------------------------------------------------------*/
static snd_pcm_uframes_t snd_trident_spdif_pointer(struct snd_pcm_substream *substream)
@@ -1868,10 +1868,10 @@ static int snd_trident_playback_open(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_playback_close
-
- Description: This routine will close the 4DWave playback device. For now
+
+ Description: This routine will close the 4DWave playback device. For now
we will simply free the dma transfer buffer.
-
+
Parameters: substream - PCM substream class
---------------------------------------------------------------------------*/
@@ -1887,13 +1887,13 @@ static int snd_trident_playback_close(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_spdif_open
-
+
Description: This routine will open the 4DWave SPDIF device.
Parameters: substream - PCM substream class
Returns: status - success or failure flag
-
+
---------------------------------------------------------------------------*/
static int snd_trident_spdif_open(struct snd_pcm_substream *substream)
@@ -1901,7 +1901,7 @@ static int snd_trident_spdif_open(struct snd_pcm_substream *substream)
struct snd_trident *trident = snd_pcm_substream_chip(substream);
struct snd_trident_voice *voice;
struct snd_pcm_runtime *runtime = substream->runtime;
-
+
voice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0);
if (voice == NULL)
return -EAGAIN;
@@ -1930,9 +1930,9 @@ static int snd_trident_spdif_open(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_spdif_close
-
+
Description: This routine will close the 4DWave SPDIF device.
-
+
Parameters: substream - PCM substream class
---------------------------------------------------------------------------*/
@@ -1943,7 +1943,7 @@ static int snd_trident_spdif_close(struct snd_pcm_substream *substream)
unsigned int temp;
spin_lock_irq(&trident->reg_lock);
- // restore default SPDIF setting
+ /* restore default SPDIF setting */
if (trident->device != TRIDENT_DEVICE_ID_SI7018) {
outb(trident->spdif_ctrl, TRID_REG(trident, NX_SPCTRL_SPCSO + 3));
outl(trident->spdif_bits, TRID_REG(trident, NX_SPCSTATUS));
@@ -1966,7 +1966,7 @@ static int snd_trident_spdif_close(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_capture_open
-
+
Description: This routine will open the 4DWave capture device.
Parameters: substream - PCM substream class
@@ -1996,10 +1996,10 @@ static int snd_trident_capture_open(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_capture_close
-
- Description: This routine will close the 4DWave capture device. For now
+
+ Description: This routine will close the 4DWave capture device. For now
we will simply free the dma transfer buffer.
-
+
Parameters: substream - PCM substream class
---------------------------------------------------------------------------*/
@@ -2010,7 +2010,7 @@ static int snd_trident_capture_close(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_foldback_open
-
+
Description: This routine will open the 4DWave foldback capture device.
Parameters: substream - PCM substream class
@@ -2039,10 +2039,10 @@ static int snd_trident_foldback_open(struct snd_pcm_substream *substream)
/*---------------------------------------------------------------------------
snd_trident_foldback_close
-
- Description: This routine will close the 4DWave foldback capture device.
+
+ Description: This routine will close the 4DWave foldback capture device.
For now we will simply free the dma transfer buffer.
-
+
Parameters: substream - PCM substream class
---------------------------------------------------------------------------*/
@@ -2052,7 +2052,7 @@ static int snd_trident_foldback_close(struct snd_pcm_substream *substream)
struct snd_trident_voice *voice;
struct snd_pcm_runtime *runtime = substream->runtime;
voice = runtime->private_data;
-
+
/* stop capture channel */
spin_lock_irq(&trident->reg_lock);
outb(0x00, TRID_REG(trident, T4D_RCI + voice->foldback_chan));
@@ -2156,13 +2156,13 @@ static struct snd_pcm_ops snd_trident_spdif_7018_ops = {
/*---------------------------------------------------------------------------
snd_trident_pcm
-
+
Description: This routine registers the 4DWave device for PCM support.
-
+
Parameters: trident - pointer to target device class for 4DWave.
Returns: None
-
+
---------------------------------------------------------------------------*/
int __devinit snd_trident_pcm(struct snd_trident * trident,
@@ -2214,13 +2214,13 @@ int __devinit snd_trident_pcm(struct snd_trident * trident,
/*---------------------------------------------------------------------------
snd_trident_foldback_pcm
-
+
Description: This routine registers the 4DWave device for foldback PCM support.
-
+
Parameters: trident - pointer to target device class for 4DWave.
Returns: None
-
+
---------------------------------------------------------------------------*/
int __devinit snd_trident_foldback_pcm(struct snd_trident * trident,
@@ -2271,13 +2271,13 @@ int __devinit snd_trident_foldback_pcm(struct snd_trident * trident,
/*---------------------------------------------------------------------------
snd_trident_spdif
-
+
Description: This routine registers the 4DWave-NX device for SPDIF support.
-
+
Parameters: trident - pointer to target device class for 4DWave-NX.
Returns: None
-
+
---------------------------------------------------------------------------*/
int __devinit snd_trident_spdif_pcm(struct snd_trident * trident,
@@ -2904,7 +2904,7 @@ static void snd_trident_notify_pcm_change1(struct snd_card *card,
{
struct snd_ctl_elem_id id;
- if (! kctl)
+ if (!kctl)
return;
if (activate)
kctl->vd[num].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
@@ -2957,13 +2957,13 @@ static int snd_trident_pcm_mixer_free(struct snd_trident *trident, struct snd_tr
/*---------------------------------------------------------------------------
snd_trident_mixer
-
+
Description: This routine registers the 4DWave device for mixer support.
-
+
Parameters: trident - pointer to target device class for 4DWave.
Returns: None
-
+
---------------------------------------------------------------------------*/
static int __devinit snd_trident_mixer(struct snd_trident * trident, int pcm_spdif_device)
@@ -2989,7 +2989,7 @@ static int __devinit snd_trident_mixer(struct snd_trident * trident, int pcm_spd
_ac97.private_data = trident;
trident->ac97_detect = 1;
- __again:
+__again:
if ((err = snd_ac97_mixer(trident->ac97_bus, &_ac97, &trident->ac97)) < 0) {
if (trident->device == TRIDENT_DEVICE_ID_SI7018) {
if ((err = snd_trident_sis_reset(trident)) < 0)
@@ -3000,7 +3000,7 @@ static int __devinit snd_trident_mixer(struct snd_trident * trident, int pcm_spd
}
goto __out;
}
-
+
/* secondary codec? */
if (trident->device == TRIDENT_DEVICE_ID_SI7018 &&
(inl(TRID_REG(trident, SI_SERIAL_INTF_CTRL)) & SI_AC97_PRIMARY_READY) != 0) {
@@ -3008,7 +3008,7 @@ static int __devinit snd_trident_mixer(struct snd_trident * trident, int pcm_spd
err = snd_ac97_mixer(trident->ac97_bus, &_ac97, &trident->ac97_sec);
if (err < 0)
snd_printk(KERN_ERR "SI7018: the secondary codec - invalid access\n");
-#if 0 // only for my testing purpose --jk
+#if 0 /* only for my testing purpose --jk */
{
struct snd_ac97 *mc97;
err = snd_ac97_modem(trident->card, &_ac97, &mc97);
@@ -3017,7 +3017,7 @@ static int __devinit snd_trident_mixer(struct snd_trident * trident, int pcm_spd
}
#endif
}
-
+
trident->ac97_detect = 0;
if (trident->device != TRIDENT_DEVICE_ID_SI7018) {
@@ -3034,7 +3034,7 @@ static int __devinit snd_trident_mixer(struct snd_trident * trident, int pcm_spd
for (idx = 0; idx < 32; idx++) {
struct snd_trident_pcm_mixer *tmix;
-
+
tmix = &trident->pcm_mixer[idx];
tmix->voice = NULL;
}
@@ -3042,7 +3042,7 @@ static int __devinit snd_trident_mixer(struct snd_trident * trident, int pcm_spd
goto __nomem;
if ((err = snd_ctl_add(card, trident->ctl_vol)))
goto __out;
-
+
if ((trident->ctl_pan = snd_ctl_new1(&snd_trident_pcm_pan_control, trident)) == NULL)
goto __nomem;
if ((err = snd_ctl_add(card, trident->ctl_pan)))
@@ -3114,10 +3114,10 @@ static int __devinit snd_trident_mixer(struct snd_trident * trident, int pcm_spd
err = 0;
goto __out;
- __nomem:
+__nomem:
err = -ENOMEM;
- __out:
+__out:
kfree(uctl);
return err;
@@ -3161,7 +3161,7 @@ static int snd_trident_gameport_cooked_read(struct gameport *gameport, int *axes
axes[i] = inw(TRID_REG(chip, GAMEPORT_AXES + i * 2));
if (axes[i] == 0xffff) axes[i] = -1;
}
-
+
return 0;
}
@@ -3284,11 +3284,11 @@ static int snd_trident_sis_reset(struct snd_trident *trident)
return 0;
}
-/*
+/*
* /proc interface
*/
-static void snd_trident_proc_read(struct snd_info_entry *entry,
+static void snd_trident_proc_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
struct snd_trident *trident = entry->private_data;
@@ -3327,10 +3327,10 @@ static void __devinit snd_trident_proc_init(struct snd_trident * trident)
{
struct snd_info_entry *entry;
const char *s = "trident";
-
+
if (trident->device == TRIDENT_DEVICE_ID_SI7018)
s = "sis7018";
- if (! snd_card_proc_new(trident->card, s, &entry))
+ if (!snd_card_proc_new(trident->card, s, &entry))
snd_info_set_text_ops(entry, trident, snd_trident_proc_read);
}
@@ -3342,14 +3342,14 @@ static int snd_trident_dev_free(struct snd_device *device)
/*---------------------------------------------------------------------------
snd_trident_tlb_alloc
-
+
Description: Allocate and set up the TLB page table on 4D NX.
Each entry has 4 bytes (physical PCI address).
-
+
Parameters: trident - pointer to target device class for 4DWave.
Returns: 0 or negative error code
-
+
---------------------------------------------------------------------------*/
static int __devinit snd_trident_tlb_alloc(struct snd_trident *trident)
@@ -3418,7 +3418,7 @@ static int snd_trident_4d_dx_init(struct snd_trident *trident)
udelay(100);
pci_write_config_byte(pci, 0x46, 0); /* release reset */
udelay(100);
-
+
/* warm reset of the AC'97 codec */
outl(0x00000001, TRID_REG(trident, DX_ACR2_AC97_COM_STAT));
udelay(100);
@@ -3436,7 +3436,7 @@ static int snd_trident_4d_dx_init(struct snd_trident *trident)
snd_printk(KERN_ERR "AC'97 codec ready error\n");
return -EIO;
- __dx_ok:
+__dx_ok:
snd_trident_stop_all_voices(trident);
return 0;
@@ -3474,7 +3474,7 @@ static int snd_trident_4d_nx_init(struct snd_trident *trident)
snd_printk(KERN_ERR "AC'97 codec ready error [0x%x]\n", inl(TRID_REG(trident, NX_ACR0_AC97_COM_STAT)));
return -EIO;
- __nx_ok:
+__nx_ok:
/* DAC on */
trident->ac97_ctrl = 0x00000002;
outl(trident->ac97_ctrl, TRID_REG(trident, NX_ACR0_AC97_COM_STAT));
@@ -3519,10 +3519,10 @@ static int snd_trident_sis_init(struct snd_trident *trident)
/*---------------------------------------------------------------------------
snd_trident_create
-
+
Description: This routine will create the device specific class for
the 4DWave card. It will also perform basic initialization.
-
+
Parameters: card - which card to create
pci - interface to PCI bus resource info
dma1ptr - playback dma buffer
@@ -3530,7 +3530,7 @@ static int snd_trident_sis_init(struct snd_trident *trident)
irqptr - interrupt resource info
Returns: 4DWave device class private data
-
+
---------------------------------------------------------------------------*/
int __devinit snd_trident_create(struct snd_card *card,
@@ -3560,7 +3560,7 @@ int __devinit snd_trident_create(struct snd_card *card,
pci_disable_device(pci);
return -ENXIO;
}
-
+
trident = kzalloc(sizeof(*trident), GFP_KERNEL);
if (trident == NULL) {
pci_disable_device(pci);
@@ -3577,7 +3577,7 @@ int __devinit snd_trident_create(struct snd_card *card,
if (pcm_streams > 32)
pcm_streams = 32;
trident->ChanPCM = pcm_streams;
- if (max_wavetable_size < 0 )
+ if (max_wavetable_size < 0)
max_wavetable_size = 0;
trident->synth.max_size = max_wavetable_size * 1024;
trident->irq = -1;
@@ -3639,7 +3639,7 @@ int __devinit snd_trident_create(struct snd_card *card,
if ((err = snd_trident_mixer(trident, pcm_spdif_device)) < 0)
return err;
-
+
/* initialise synth voices */
for (i = 0; i < 64; i++) {
voice = &trident->synth.voices[i];
@@ -3665,21 +3665,21 @@ int __devinit snd_trident_create(struct snd_card *card,
/*---------------------------------------------------------------------------
snd_trident_free
-
+
Description: This routine will free the device specific class for
- the 4DWave card.
-
+ the 4DWave card.
+
Parameters: trident - device specific private data for 4DWave card
Returns: None.
-
+
---------------------------------------------------------------------------*/
static int snd_trident_free(struct snd_trident *trident)
{
snd_trident_free_gameport(trident);
snd_trident_disable_eso(trident);
- // Disable S/PDIF out
+ /* Disable S/PDIF out */
if (trident->device == TRIDENT_DEVICE_ID_NX)
outb(0x00, TRID_REG(trident, NX_SPCTRL_SPCSO + 3));
else if (trident->device == TRIDENT_DEVICE_ID_SI7018) {
@@ -3704,9 +3704,9 @@ static int snd_trident_free(struct snd_trident *trident)
/*---------------------------------------------------------------------------
snd_trident_interrupt
-
+
Description: ISR for Trident 4DWave device
-
+
Parameters: trident - device specific private data for 4DWave card
Problems: It seems that Trident chips generates interrupts more than
@@ -3717,7 +3717,7 @@ static int snd_trident_free(struct snd_trident *trident)
work on all computers. [jaroslav]
Returns: None.
-
+
---------------------------------------------------------------------------*/
static irqreturn_t snd_trident_interrupt(int irq, void *dev_id)
@@ -3731,7 +3731,7 @@ static irqreturn_t snd_trident_interrupt(int irq, void *dev_id)
if ((audio_int & (ADDRESS_IRQ|MPU401_IRQ)) == 0)
return IRQ_NONE;
if (audio_int & ADDRESS_IRQ) {
- // get interrupt status for all channels
+ /* get interrupt status for all channels */
spin_lock(&trident->reg_lock);
stimer = inl(TRID_REG(trident, T4D_STIMER)) & 0x00ffffff;
chn_int = inl(TRID_REG(trident, T4D_AINT_A));
@@ -3813,7 +3813,7 @@ static irqreturn_t snd_trident_interrupt(int irq, void *dev_id)
inb(TRID_REG(trident, T4D_MPUR0));
}
}
- // outl((ST_TARGET_REACHED | MIXER_OVERFLOW | MIXER_UNDERFLOW), TRID_REG(trident, T4D_MISCINT));
+ /* outl((ST_TARGET_REACHED | MIXER_OVERFLOW | MIXER_UNDERFLOW), TRID_REG(trident, T4D_MISCINT)); */
return IRQ_HANDLED;
}
@@ -3826,7 +3826,7 @@ struct snd_trident_voice *snd_trident_alloc_voice(struct snd_trident * trident,
spin_lock_irqsave(&trident->voice_alloc, flags);
if (type == SNDRV_TRIDENT_VOICE_TYPE_PCM) {
idx = snd_trident_allocate_pcm_channel(trident);
- if(idx < 0) {
+ if (idx < 0) {
spin_unlock_irqrestore(&trident->voice_alloc, flags);
return NULL;
}
@@ -3842,7 +3842,7 @@ struct snd_trident_voice *snd_trident_alloc_voice(struct snd_trident * trident,
}
if (type == SNDRV_TRIDENT_VOICE_TYPE_SYNTH) {
idx = snd_trident_allocate_synth_channel(trident);
- if(idx < 0) {
+ if (idx < 0) {
spin_unlock_irqrestore(&trident->voice_alloc, flags);
return NULL;
}
diff --git a/sound/pci/trident/trident_memory.c b/sound/pci/trident/trident_memory.c
index f9779e2..4bf4bbb 100644
--- a/sound/pci/trident/trident_memory.c
+++ b/sound/pci/trident/trident_memory.c
@@ -23,7 +23,7 @@
*
*/
-#include <asm/io.h>
+#include <linux/io.h>
#include <linux/pci.h>
#include <linux/time.h>
#include <linux/mutex.h>
@@ -203,7 +203,7 @@ snd_trident_alloc_sg_pages(struct snd_trident *trident,
if (snd_BUG_ON(!hdr))
return NULL;
-
+
mutex_lock(&hdr->block_mutex);
blk = search_empty(hdr, runtime->dma_bytes);
@@ -211,7 +211,7 @@ snd_trident_alloc_sg_pages(struct snd_trident *trident,
mutex_unlock(&hdr->block_mutex);
return NULL;
}
-
+
/* set TLB entries */
idx = 0;
for (page = firstpg(blk); page <= lastpg(blk); page++, idx++) {
@@ -219,7 +219,7 @@ snd_trident_alloc_sg_pages(struct snd_trident *trident,
dma_addr_t addr = snd_pcm_sgbuf_get_addr(substream, ofs);
unsigned long ptr = (unsigned long)
snd_pcm_sgbuf_get_ptr(substream, ofs);
- if (! is_valid_page(addr)) {
+ if (!is_valid_page(addr)) {
__snd_util_mem_free(hdr, blk);
mutex_unlock(&hdr->block_mutex);
return NULL;
@@ -258,13 +258,13 @@ snd_trident_alloc_cont_pages(struct snd_trident *trident,
mutex_unlock(&hdr->block_mutex);
return NULL;
}
-
+
/* set TLB entries */
addr = runtime->dma_addr;
ptr = (unsigned long)runtime->dma_area;
for (page = firstpg(blk); page <= lastpg(blk); page++,
ptr += SNDRV_TRIDENT_PAGE_SIZE, addr += SNDRV_TRIDENT_PAGE_SIZE) {
- if (! is_valid_page(addr)) {
+ if (!is_valid_page(addr)) {
__snd_util_mem_free(hdr, blk);
mutex_unlock(&hdr->block_mutex);
return NULL;
1
0