History log of /linux-master/sound/pci/ice1712/delta.c
Revision Date Author Comments
# 3635f862 08-Jun-2021 Takashi Iwai <tiwai@suse.de>

ALSA: ice1712: Fix assignment in if condition

PCI ICE1712 driver code contains a few assignments in if condition,
which is a bad coding style that may confuse readers and occasionally
lead to bugs.

This patch is merely for coding-style fixes, no functional changes.

Link: https://lore.kernel.org/r/20210608140540.17885-43-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c0dbbdad 08-Jul-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

ALSA: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b4e5e707 03-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: pci: Constify snd_kcontrol_new items

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-38-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1a59d1b8 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1334 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3135432e 04-Aug-2017 Bhumika Goyal <bhumirks@gmail.com>

ALSA: ice1712: add const to snd_akm4xxx structures

Declare snd_akm4xxx structures as const as they are only passed
to the function snd_ice1712_akm4xxx_init. This argument is of type
const, so make the structures const.
Done using Coccinelle:

@match disable optional_qualifier@
identifier s;
position p;
@@
static struct snd_akm4xxx s@p={...};

@good1@
identifier match.s;
position p;
@@
snd_ice1712_akm4xxx_init(...,&s@p,...)

@bad@
identifier match.s;
position p!={match.p,good1.p};
@@
s@p

@depends on !bad disable optional_qualifier@
identifier match.s;
@@
static
+const
struct snd_akm4xxx s={...};

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4647e8d5 04-Aug-2017 Bhumika Goyal <bhumirks@gmail.com>

ALSA: ice1712: add const to snd_ak4xxx_private structures

Declare snd_ak4xxx_private structures as const as they are only passed
to the function snd_ice1712_akm4xxx_init. This argument is of type const,
so make the structures const.
Done using Coccinelle:

@match disable optional_qualifier@
identifier s;
position p;
@@
static struct snd_ak4xxx_private s@p={...};

@good1@
identifier match.s;
position p;
@@
snd_ice1712_akm4xxx_init(...,&s@p,...)

@bad@
identifier match.s;
position p!={match.p,good1.p};
@@
s@p

@depends on !bad disable optional_qualifier@
identifier match.s;
@@
static
+const
struct snd_ak4xxx_private s={...};

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f3b827e0 19-Feb-2017 Bhumika Goyal <bhumirks@gmail.com>

ALSA: pci: constify snd_kcontrol_new structures

Declare snd_kcontrol_new structures as const as they are only passed as
an argument to the function snd_ctl_new1. This argument is of type
const, so snd_kcontrol_new structures having the same property can be
made const too.
Done using Coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct snd_kcontrol_new i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1;
@@
snd_ctl_new1(&i@p,e1)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct snd_kcontrol_new i;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5df29bca 29-Nov-2015 Julia Lawall <Julia.Lawall@lip6.fr>

ALSA: i2c: constify snd_i2c_ops structures

The snd_i2c_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6e61246f 03-Apr-2014 Ondrej Zary <linux@rainbow-software.org>

ALSA: ice1712: restore AK4xxx volumes on resume

Also restore AK4xxx mixer volumes on resume for M-Audio ICE1712-based cards.
This fixes incorrect (sound working) zero mixer volumes after resume.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d272ccd0 02-Apr-2014 Ondrej Zary <linux@rainbow-software.org>

ALSA: ice1712: Add S/PDIF suspend support for ICE1712-based M-Audio cards

Add S/PDIF suspend support for M-Audio cards based on ICE1712 chip.
Tested (playback only) on Audiophile 24/96. Capture will probably not work.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8c1d8434 30-Mar-2014 Ondrej Zary <linux@rainbow-software.org>

ALSA: ice1712: Add suspend support for M-Audio ICE1712-based cards

Add suspend support for M-Audio cards based on ICE1712 chip.
Tested with M-Audio Audiophile 24/96. S/PDIF will probably not work.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6dfb5aff 25-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: ice17xx: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e23e7a14 05-Dec-2012 Bill Pemberton <wfp5p@virginia.edu>

ALSA: pci: remove __dev* attributes

CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 02582e9b 22-Aug-2012 Masanari Iida <standby24x7@gmail.com>

treewide: fix typo of "suport" in various comments and Kconfig

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# de3ab850 18-Oct-2012 Takashi Iwai <tiwai@suse.de>

ALSA: ice17xx: Fix inclusion of linux/io.h

Include linux/io.h in ice1712.h since inb() and outb() are used in
inline functions there. Remove the redundant inclusion of that file
in other places at the same time.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b8b1a4cb 18-Jan-2011 Brian Bloniarz <brian.bloniarz@gmail.com>

ALSA: ice1712 delta - initialize SPI clock

The driver was using an initial value for the clock on the SPI bus
which was read from ICE1712 EEPROM,
ice->eeprom.data[ICE_EEP1_GPIO_STATE] & ICE1712_DELTA_AP_CCLK (0x02)

It appears some cards have it default high, some cards
have it default low. On my Delta 66 rev. E:
$ cat /proc/asound/M66/ice1712 | grep 'GPIO state'
GPIO state : 0x70 /* ICE1712_DELTA_AP_CCLK bit is zero */
On my Audiophile 2496:
$ cat /proc/asound/M2496/ice1712 | grep 'GPIO state'
GPIO state : 0xfe /* ICE1712_DELTA_AP_CCLK bit is one */

It must be raised before the first SPI write happens, or the write will
fail, leading to:

[ 23.248721] invalid CS8427 signature 0x0: let me try again...

I theorize that 4eb4550ab37d351ab0973ccec921a5a2d8560ec7
is no longer needed, it was a different way to workaround
the problem.

[fixed variable decleration by tiwai]

Signed-off-by: Brian Bloniarz <brian.bloniarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 93430096 08-Dec-2010 Brian Bloniarz <brian.bloniarz@gmail.com>

ALSA: ice1712 - working M-Audio Delta 66E support

Rev. E of the M-Audio Delta 66 is partially supported (commit
ef2cd2ccad66b4aba518eca7514eface267ee0f3), but the layout of the GPIO
pins was still unclear. This patch adds the GPIO definitions so that
communication to the CS8247 & 2x AK4524 works correctly.

ALSA bug#3327 has more details; users cap & jhunt report there that the
GPIO wiring is similar to the Digigram VX442 (chip select: pin 4 =
CS8427, pin 5 = AK4524 #0, pin 6 = AK4524 #1). There has been a lot of
conflicting information in the bug, but given these definitions, my
Delta 66E works; I tested analog in&out at 44.1kHz & 96kHz, analog gain
settings, S/PDIF clock sync, and S/PDIF in&out at 44.1kHz.

Signed-off-by: Brian Bloniarz <brian.bloniarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23b224d9 21-Aug-2010 Garnet MacPhee <dhubsith@comcast.net>

ALSA: ice1712: Add support for Edirol DA-2496

This device is similar to the M-Audio Delta 1010LT in that it uses the
AK4524VF ADC/DAC, but it does not use the CS8427 for SPDIF.

The SPDIF appears to be set up correctly, but I am not able to test it
as I do not have any devices that use it.

This patch makes the ADC/DAC's and the hardware mixer visible to apps
such as alsamixer and envy24control.

Signed-off-by: Garnet MacPhee <dhubsith@comcast.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cc67b7f7 06-Sep-2008 Vedran Miletic <rivanvx@gmail.com>

ALSA: ice1712/ice1724: Coding style fixes part 1 (more coming up)

Inspired by Alexander Beregalov's patches for wtm and aureon.c,
I decided to run checkpatch on some more files. After some work
checkpatch.pl-0.23 --no-tree --file --strict <file> reports
0 errors, 0 warnings, 0 checks, n lines checked for:
phase.c
phase.h
juli.c (1 check about unused code, maybe we should comment it)
juli.h (no changes necessary)
In other files I have just fixed // comments and long lines along the
way (but not all of them), more coming up.

Signed-off-by: Vedran Miletic <rivanvx@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# ef2cd2cc 06-Feb-2008 Jaroslav Kysela <perex@perex.cz>

[ALSA] ice1712 - added support for M-Audio Delta 66E

See ALSA bug#3327 for more details. Experimental.
Also fix support for M-Audio Delta 1010E - subdevice check.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# a60567d1 06-Feb-2008 Jaroslav Kysela <perex@perex.cz>

[ALSA] Added support for Delta1010E (newer revisions of Delta1010)

For more details, see ALSA bug#3327 .

Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 9004acc7 08-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] Remove sound/driver.h

This header file exists only for some hacks to adapt alsa-driver
tree. It's useless for building in the kernel. Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it. This should be really killed in
future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 1005f66f 27-Nov-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] ice1712 - Fix word clock status control on Delta 1010LT

The 'Word Clock Status' control on Delta 1010LT checks the CS8427
error register too strictly and almost always returns 1 (unlocked).
It should check only the lock status bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# c1017a4c 15-Oct-2007 Jaroslav Kysela <perex@perex.cz>

[ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz


Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# a5ce8890 23-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] Clean up with common snd_ctl_boolean_*_info callbacks

Clean up codes using the new common snd_ctl_boolean_*_info() callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# bf748ed7 13-Mar-2007 Ralf Baechle <ralf@linux-mips.org>

[ALSA] ice1712: build fixes

CC [M] sound/pci/ice1712/ice1712.o
sound/pci/ice1712/ice1712.c:290: error: snd_ice1712_mixer_digmix_route_ac97 causes a section type conflict
sound/pci/ice1712/ice1712.c:1630: error: snd_ice1712_eeprom causes a section type conflict
...
Gcc like its __devinitdata readable not const, it seems. An alternative
fix would be to remove the __devinitdata attribute but that would result
in slight runtime bloat.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 32b47da0 29-Jan-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] Add 'const' to files in pci/ice1712/

Mark a lot of data as 'const'
Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# ecefb192 14-Mar-2006 Adrian Bunk <bunk@stusta.de>

[ALSA] sound/pci/ice1712/delta.c: make 2 functions static

Modules: ICE1712 driver

This patch makes two needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 381e3cda 28-Feb-2006 Doug McLain <doug@nostar.net>

[ALSA] ice1712 - Fix wordclock status on Delta1010LT

Modules: ICE1712 driver

I posted this patch to bug 1806 a while back, and have been awaiting a
reply or commit. It currently reports the Locked/No Signal text
backwards in envy24control, since i was using an older version of
envy24control when I wrote the original code. The Locked/No Signal test
was recently reversed in envy24control cvs, so the test in my code needs
to be reversed as well. Here is the patch, once again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f7004f39 10-Feb-2006 Jaroslav Kysela <perex@suse.cz>

[ALSA] ice1712 - Delta 1010LT S/PDIF fixes

Modules: ICE1712 driver

See ALSA bug#1806 for details.

Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 62932df8 16-Jan-2006 Ingo Molnar <mingo@elte.hu>

[ALSA] semaphore -> mutex (PCI part)

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6ca308d4 17-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Remove xxx_t typedefs: PCI ICE1712

Modules: ICE1712 driver

Remove xxx_t typedefs from the PCI ICE1712 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 99b359ba 20-Oct-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Add missing KERN_* suffix to printk

Add missing KERN_* suffix to printk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 67ed4161 29-Jul-2005 Clemens Ladisch <clemens@ladisch.de>

[ALSA] sound - fix .iface field of mixer control elements

Documentation,CS46xx driver,EMU10K1/EMU10K2 driver,AD1848 driver
SB16/AWE driver,CMIPCI driver,ENS1370/1+ driver,RME32 driver
RME96 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
RME HDSP driver,RME9652 driver
This patch changes .iface to SNDRV_CTL_ELEM_IFACE_MIXER whre _PCM or
_HWDEP was used in controls that are not associated with a specific PCM
(sub)stream or hwdep device, and changes some controls that got
inconsitent .iface values due to copy+paste errors. Furthermore, it
makes sure that all control that do use _PCM or _HWDEP use the correct
number in the .device field.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!