aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emu10k1_main.c
AgeCommit message (Collapse)AuthorFilesLines
2024-04-28ALSA: emu10k1: move code for entering E-MU card FPGA programming modeOswald Buddenhagen1-6/+1
... into snd_emu1010_load_firmware_entry(). This makes it clearer that these steps belong together tightly, as implied by prior commits. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093717.3198716-5-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: move snd_emu1010_load_firmware_entry() to io.cOswald Buddenhagen1-41/+0
It is a low-level I/O access function, so io.c is the natural place for it. While we're moving the code, reduce the scope of some variables, use compound assignment operators, and add/adjust some comments. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093717.3198716-4-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: make snd_emu1010_load_firmware_entry() voidOswald Buddenhagen1-7/+3
There is only one call site, and there we already know that we actually have a firmware. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093717.3198716-3-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: simplify E-MU card FPGA reset sequenceOswald Buddenhagen1-22/+3
Firstly, it is pointless to explicitly disable the power to the dock prior to resetting the FPGA, as the latter will do the former anyway. Secondly, it doesn't make much sense to check whether the FPGA is already programmed. It's much simpler to just presume it is, and issue the self-reset command. If it isn't, the effect isn't worse than the checks themselves. As a side effect, we lose the info if the reset fails, but there is no plausible way how that could happen unless the card burns out while operating, and in that case we'll detect a firmware upload failure a bit later anyway. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093717.3198716-2-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: fix E-MU dock initializationOswald Buddenhagen1-0/+6
A side effect of making the dock monitoring interrupt-driven was that we'd be very quick to program a freshly connected dock. However, for unclear reasons, the dock does not work when we do that - despite the FPGA netlist upload going just fine. We work around this by adding a delay before programming the dock; for safety, the value is several times as much as was determined empirically. Note that a badly timed dock hot-plug would have triggered the problem even before the referenced commit - but now it would happen 100% instead of about 3% of the time, thus making it impossible to work around by re-plugging. Fixes: fbb64eedf5a3 ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584 Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-6-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: use mutex for E-MU FPGA access lockingOswald Buddenhagen1-4/+15
The FPGA access through the GPIO port does not interfere with other sound processor register access, so there is no need to subject it to emu_lock. And after moving all FPGA access out of the interrupt handler, it does not need to be IRQ-safe, either. What's more, attaching the dock causes a firmware upload, which takes several seconds. We really don't want to disable IRQs for this long, and even less also have someone else spin with IRQs disabled waiting for us. Therefore, use a mutex for FPGA access locking. This makes the code somewhat more noisy, as we need to wrap bigger sections into the mutex, as it needs to enclose the spinlocks. The latter has the "side effect" of fixing dock FPGA programming in a corner case: a really badly timed mixer access right between entering FPGA programming mode and uploading the netlist would mess up the protocol. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-5-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: move the whole GPIO event handling to the workqueueOswald Buddenhagen1-28/+28
The actual event processing was already done by workqueue items. We can move the event dispatching there as well, rather than doing it already in the interrupt handler callback. This change has a rather profound "side effect" on the reliability of the FPGA programming: once we enter programming mode, we must not issue any snd_emu1010_fpga_{read,write}() calls until we're done, as these would badly mess up the programming protocol. But exactly that would happen when trying to program the dock, as that triggers GPIO interrupts as a side effect. This is mitigated by deferring the actual interrupt handling, as workqueue items are not re-entrant. To avoid scheduling the dispatcher on non-events, we now explicitly ignore GPIO IRQs triggered by "uninteresting" pins, which happens a lot as a side effect of calling snd_emu1010_fpga_{read,write}(). Fixes: fbb64eedf5a3 ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584 Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-4-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: factor out snd_emu1010_load_dock_firmware()Oswald Buddenhagen1-30/+36
Pulled out of the next patch to improve its legibility. As the function is now available, call it directly from snd_emu10k1_emu1010_init(), thus making the MicroDock firmware loading synchronous - there isn't really a reason not to. Note that this does not affect the AudioDocks of rev1 cards, as these have no independent power supplies, and thus come up only a while after the main card is initialized. As a drive-by, adjust the priorities of two messages to better reflect their impact. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-3-oswald.buddenhagen@gmx.de>
2024-04-28ALSA: emu10k1: fix E-MU card dock presence monitoringOswald Buddenhagen1-7/+10
While there are two separate IRQ status bits for dock attach and detach, the hardware appears to mix them up more or less randomly, making them useless for tracking what actually happened. It is much safer to check the dock status separately and proceed based on that, as the old polling code did. Note that the code assumes that only the dock can be hot-plugged - if other option card bits changed, the logic would break. Fixes: fbb64eedf5a3 ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584 Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240428093716.3198666-2-oswald.buddenhagen@gmx.de>
2023-07-17ALSA: emu10k1: rework copyright statementsOswald Buddenhagen1-5/+3
- Remove the "log-like" parts, following the same logic as the previous commit - Unify format - Add missing major contributors, including myself - Sort entries in order of first contribution (Creative comes last for optical reasons; they don't appear to have directly contributed anyway) Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230715160839.326978-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-07-17ALSA: emu10k1: clean up driver status commentsOswald Buddenhagen1-6/+0
Empty BUGS and TODO sections don't really help anyone, so remove them. Version information is chronically outdated, and not really useful in a git world anyway, so remove it as well. Also remove duplicated (and outdated, of course) status section from p16v.h (the one in p16v.c is in better shape). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230715160839.326978-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-07-17ALSA: emu10k1: track loss of external clock on E-MU cardsOswald Buddenhagen1-1/+29
85;95;0c This uses IRQs to track spontaneous changes to the word clock source register. FWIW, that this can happen in the first place is the reason why it is futile to lock the clock source mixer setting while the device is open - we can't consistently control the rate anyway. Though arguably, we should reset any open streams when that happens, as they become corrupted anyway. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230715160738.326832-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-07-13ALSA: emu10k1: remove superfluous IRQ enable state savingOswald Buddenhagen1-3/+2
The mixer, PCM prepare, MIDI, synth driver, and procfs callbacks are all always invoked with IRQs enabled, so there is no point in saving the state. snd_emu1010_load_firmware_entry() is called from emu1010_firmware_work() and snd_emu10k1_emu1010_init(); the latter from snd_emu10k1_create() and snd_emu10k1_resume(), all of which have IRQs enabled. The voice and memory functions are called from mixed contexts, so they keep the state saving. The low-level functions all keep the state saving, because it's not feasible to keep track of what is called where. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230712145750.125086-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-07-10ALSA: emu10k1: make E-MU dock monitoring interrupt-drivenOswald Buddenhagen1-23/+28
... instead of using a one-second polling timer. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230710065956.1246364-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-13ALSA: emu10k1: make available E-MU clock sources card-specificOswald Buddenhagen1-2/+2
The actually available clock sources depend on the available audio input ports and dedicated clock input ports. This includes refactoring the code to be data-driven to remain manageable. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230612191325.1315854-3-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-13ALSA: emu10k1: split off E-MU fallback clock from clock sourceOswald Buddenhagen1-1/+2
So far, we set the fallback as a side effect of setting the source. But the fallback makes no sense at all when an internal clock is selected. Defaulting to 48k for S/PDIF & ADAT makes sense, but as that is the global default and we're not changing it automatically any more, it's just fine to leave it entirely to the explicit setting. This changes the name of the pre-existing control to something more appropriate (regardless of the split), so users will need to adjust their mixer settings. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230612191325.1315854-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-05-18ALSA: emu10k1: introduce and use snd_emu10k1_ptr_write_multiple()Oswald Buddenhagen1-75/+93
While this nicely denoises the code, the real intent is being able to write many registers pseudo-atomically, which will come in handy later. Idea stolen from kX-project. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230518093134.3697955-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-05-17ALSA: emu10k1: add explicit support for E-MU 0404Oswald Buddenhagen1-6/+14
Unlike the other models, this is actually a distinct card, rather than an E-MU 1010 with different "dongles". It is stereo only, and supports no ADAT (there is no trace of ADAT in the manual, switching the output mode to ADAT has no effect, and switching the input mode to ADAT just breaks input (presumably ... my only ADAT source is the card's output)). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230516093612.3536508-10-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-05-17ALSA: emu10k1: make E-MU I/O routing init data-drivenOswald Buddenhagen1-246/+2
... and move it to the mixer init, as it's logically part of it. As a side effect, this fixes the initial values of the input destination mixer controls, which would have previously remained at "Silent" despite different defaults. This didn't really matter, though, as ALSA state restoration would hide that bug beyond first use. Note that this completely does away with clearing the output routing registers, as it was rather pointless - we just programmed the FPGA (resetting it first if necessary), so everything is zeroed anyway (that's documented by Xilinx, and as further evidence, some of the loops terminated too early, and we didn't bother clearing the high channels of the input routes at all, all with no observed adverse effects). As a drive-by, this also fixes some capture channel defaults - any EMU_SRC_*2 isn't a sensible value in 1x clock mode. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230516093612.3536508-7-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-05-17ALSA: emu10k1: cleanup envelope register initOswald Buddenhagen1-6/+4
We (rightfully) don't enable the envelope engine for PCM voices, so any related setup is entirely pointless - the EMU8K documentation makes that very clear, and the fact that the various open drivers all use different values to no observable detriment pretty much confirms it. The remaining initializations are regrouped for clarity. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230516093612.3536451-3-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-05-17ALSA: emu10k1: straighten out FX send initOswald Buddenhagen1-1/+1
The mixer structures were filled in two places: on driver init, and when the devices are opened. The latter made the former pointless, so we remove the former. This implies that mixer dumps may now return all zeroes, which is OK, as restoring them is meaningless as well. Things were even weirder for the (generally unused) secondary sends: Some of the initialization loops were forgotten when support for Audigy was added, thus creating the technically illegal state of multiple sends being routed to the same FX accumulator (though it apparently doesn't matter when the amount is zero). The global multi-channel init used some rather bizarre values for the secondary sends, and the init on open actually forgot to re-initialize them. We now use a not really more useful, but simpler formula. The direct register init was also bogus. This doesn't really matter, as the value is overwritten when a voice comes into use, but still. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230516093612.3536451-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-05-08ALSA: emu10k1: minor E-MU naming fixupsOswald Buddenhagen1-8/+8
- Fix mixer source port names. These will require some users to re-adjust their mixer settings, which seems acceptable: - The S/PDIF port is on the main 1010 card, not the 0202 daughter card - The 1616m CardBus card has all inputs on the dock, so there is no point in specifying it - Conversely, the 1010 card has "dispersed" inputs, so say where the ADAT port is, consistently with the S/PDIF port - The 1616m CardBus card is actually named E-MU 02 (due to the headphone output jack it has) - Fix capitalization of "E-MU" Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230428095941.1706335-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-28ALSA: emu10k1: use more existing defines instead of open-coded numbersOswald Buddenhagen1-23/+23
Using the *_MASK defines for "maximal value" is debatable. I got the idea from FreeBSD, and it sorta makes sense to me. Some hunks look a bit incomplete, because code that is going to be subsequently removed is not touched here. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230428080732.1697695-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-23ALSA: emu10k1: use high-level I/O functions also during initOswald Buddenhagen1-14/+6
... and also use more pre-defined constants on the way (some of which required adjustment). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1143967-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-23ALSA: emu10k1: skip Sound Blaster-specific hacks for E-MU cardsOswald Buddenhagen1-3/+3
The rev2 cards use CA0108, but the embedded P17V goes entirely unused. Also, A_IOCTL (which is really the GPIO port) is actually the FPGA control port, so messing with it is no good idea. The hacks are actually mutually exclusive, so make that explicit while we're at it. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1143888-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-23ALSA: emu10k1: pull in some register definitions from kX-projectOswald Buddenhagen1-1/+1
For documentation purposes and later use. Some pre-existing but (mostly) unused definitions were renamed for consistency. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1143903-6-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-23ALSA: emu10k1: comment updatesOswald Buddenhagen1-33/+44
Move comments to better locations, de-duplicate, fix/remove incorrect/ outdated ones, add new ones, and unify spacing somewhat. While at it, also add testing credits for Jonathan Dowland (SB Live! Platinum) and myself (E-MU 0404b). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1143903-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-22ALSA: emu10k1: remove unused `resume` parameter from snd_emu10k1_init()Oswald Buddenhagen1-3/+3
This was unnecessarily added in commit 09668b441da ("emu10k1 - Add PM support"). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422132430.1057468-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-22ALSA: emu10k1: remove remaining cruft from snd_emu10k1_emu1010_init()Oswald Buddenhagen1-26/+1
Various redundant FPGA writes which were presumably also cargo-culted from the Windows driver. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-7-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-22ALSA: emu10k1: remove apparently pointless EMU_HANA_OPTION_CARDS readsOswald Buddenhagen1-7/+0
These seem to be another instance of cargo-culting from the Windows driver. It presumably queries the register to decide about the followup actions, but we don't do that. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-6-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-22ALSA: emu10k1: remove apparently pointless FPGA readsOswald Buddenhagen1-7/+0
These seem to be simply cargo-culted from the Windows driver's behavior. However, the original reason were presumably read-modify-write cycles, which we don't do. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-5-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-22ALSA: emu10k1: stop doing weird things with HCFG in snd_emu10k1_emu1010_init()Oswald Buddenhagen1-29/+4
This doesn't do anything snd_emu10k1_init() wouldn't do later, and none of the things it does seem relevant for the function itself (which is pretty much about setting up the FPGA). It was probably a Windows driver behavior cargo-culting artifact. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-4-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-22ALSA: emu10k1: fix access to Audigy GPIO portOswald Buddenhagen1-31/+31
As the register definition clearly states, this is a 16-bit register, yet we did all accesses as 32-bit. The writes in particular would have the potential to clear the TIMER register (depending on how the bus/card actually handles the too long writes). This commit also introduces a separate define A_GPIO which aliases A_IOCFG, which better reflects the distinct usage on E-MU cards. This is done in the same commit to keep the churn down, as we're touching all involved lines anyway. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-22ALSA: emu10k1: remove unused snd_emu10k1_voice.emu fieldOswald Buddenhagen1-3/+1
It was written, but never read from. Its value is available via the epcm field. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005452-5-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-04-21ALSA: emu10k1: clarify various fx8010.*_mask fieldsOswald Buddenhagen1-3/+4
extin_mask and extout_mask are used only by the SbLive! microcode, so they have no effect on Audigy. Eliminate fxbus_mask entirely, as it wasn't actually used for anything. As a drive-by, remove the pointless pad1 field from struct snd_emu10k1_fx8010 - it is not visible to user space, so it has no binary compatibility constraints. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005509-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-04-05ALSA: emu10k1: Stop using iommu_present()Robin Murphy1-4/+1
iommu_get_domain_for_dev() is already perfectly happy to return NULL if the given device has no IOMMU. Drop the unnecessary check in favour of just handling that condition appropriately. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/9b506b4a4fe8a7f40aa8bad1aafc82426cf3dd92.1649165210.git.robin.murphy@arm.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-19ALSA: emu10k1: Allocate resources with device-managed APIsTakashi Iwai1-77/+25
This patch converts the resource management in PCI emu10k1 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper, the page allocations are done with the devres helper, and the card object release is managed now via card->private_free instead of a lowlevel snd_device. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-34-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-01-08ALSA: Convert strlcpy to strscpy when return value is unusedJoe Perches1-1/+1
strlcpy is deprecated. see: Documentation/process/deprecated.rst Change the calls that do not use the strlcpy return value to the preferred strscpy. Done with cocci script: @@ expression e1, e2, e3; @@ - strlcpy( + strscpy( e1, e2, e3); This cocci script leaves the instances where the return value is used unchanged. After this patch, sound/ has 3 uses of strlcpy() that need to be manually inspected for conversion and changed one day. $ git grep -w strlcpy sound/ sound/usb/card.c: len = strlcpy(card->longname, s, sizeof(card->longname)); sound/usb/mixer.c: return strlcpy(buf, p->name, buflen); sound/usb/mixer.c: return strlcpy(buf, p->names[index], buflen); Miscellenea: o Remove trailing whitespace in conversion of sound/core/hwdep.c Link: https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/22b393d1790bb268769d0bab7bacf0866dcb0c14.camel@perches.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-07-07ASoC: pci/emu10k1: remove "set but not used' warningsPierre-Louis Bossart1-2/+2
Fix W=1 warnings. Mark variables used for reads as __always_unused. sound/pci/emu10k1/emu10k1_main.c: In function ‘snd_emu10k1_cardbus_init’: sound/pci/emu10k1/emu10k1_main.c:626:15: warning: variable ‘value’ set but not used [-Wunused-but-set-variable] 626 | unsigned int value; | ^~~~~ sound/pci/emu10k1/emu10k1_main.c: In function ‘snd_emu1010_load_firmware_entry’: sound/pci/emu10k1/emu10k1_main.c:656:15: warning: variable ‘write_post’ set but not used [-Wunused-but-set-variable] 656 | unsigned int write_post; | ^~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-02-10ALSA: emu10k1: Fix endianness annotationsTakashi Iwai1-1/+3
The internal page tables are little endian, hence they should be __le32 type. This fixes the relevant sparse warning: sound/pci/emu10k1/emu10k1_main.c:2013:51: warning: incorrect type in assignment (different base types) sound/pci/emu10k1/emu10k1_main.c:2013:51: expected unsigned int [usertype] sound/pci/emu10k1/emu10k1_main.c:2013:51: got restricted __le32 [usertype] No functional changes, just sparse warning fixes. Link: https://lore.kernel.org/r/20200206163152.6073-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-05ALSA: emu10k1: More constificationsTakashi Iwai1-6/+6
Apply const prefix to the remaining possible places: the static tables for init verbs and registers, the string arrays, the conversion tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-15-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-03ALSA: emu10k1: Constify snd_emu_chip_detailsTakashi Iwai1-1/+1
The snd_emu_chip_details definitions are referred as read-only, hence they can be declared as const gracefully. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-55-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-03ALSA: pci: Constify snd_device_ops definitionsTakashi Iwai1-1/+1
Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-10-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: emu10k1: Support PCM sync_stopTakashi Iwai1-0/+1
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-17-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156Thomas Gleixner1-16/+1
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>
2019-04-17ALSA: emu10k1: Drop superfluous id-uniquification behaviorTakashi Iwai1-15/+1
The emu10k1 driver tries to create a unique id string by itself when it's copied from the card list, but it's rather superfluous, as the same thing will be done in ALSA core side at the card registration. Let's drop the code. This allows us removing snd_cards export. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-12treewide: Use array_size() in vmalloc()Kees Cook1-4/+5
The vmalloc() function has no 2-factor argument form, so multiplication factors need to be wrapped in array_size(). This patch replaces cases of: vmalloc(a * b) with: vmalloc(array_size(a, b)) as well as handling cases of: vmalloc(a * b * c) with: vmalloc(array3_size(a, b, c)) This does, however, attempt to ignore constant size factors like: vmalloc(4 * 1024) though any constants defined via macros get caught up in the conversion. Any factors with a sizeof() of "unsigned char", "char", and "u8" were dropped, since they're redundant. The Coccinelle script used for this was: // Fix redundant parens around sizeof(). @@ type TYPE; expression THING, E; @@ ( vmalloc( - (sizeof(TYPE)) * E + sizeof(TYPE) * E , ...) | vmalloc( - (sizeof(THING)) * E + sizeof(THING) * E , ...) ) // Drop single-byte sizes and redundant parens. @@ expression COUNT; typedef u8; typedef __u8; @@ ( vmalloc( - sizeof(u8) * (COUNT) + COUNT , ...) | vmalloc( - sizeof(__u8) * (COUNT) + COUNT , ...) | vmalloc( - sizeof(char) * (COUNT) + COUNT , ...) | vmalloc( - sizeof(unsigned char) * (COUNT) + COUNT , ...) | vmalloc( - sizeof(u8) * COUNT + COUNT , ...) | vmalloc( - sizeof(__u8) * COUNT + COUNT , ...) | vmalloc( - sizeof(char) * COUNT + COUNT , ...) | vmalloc( - sizeof(unsigned char) * COUNT + COUNT , ...) ) // 2-factor product with sizeof(type/expression) and identifier or constant. @@ type TYPE; expression THING; identifier COUNT_ID; constant COUNT_CONST; @@ ( vmalloc( - sizeof(TYPE) * (COUNT_ID) + array_size(COUNT_ID, sizeof(TYPE)) , ...) | vmalloc( - sizeof(TYPE) * COUNT_ID + array_size(COUNT_ID, sizeof(TYPE)) , ...) | vmalloc( - sizeof(TYPE) * (COUNT_CONST) + array_size(COUNT_CONST, sizeof(TYPE)) , ...) | vmalloc( - sizeof(TYPE) * COUNT_CONST + array_size(COUNT_CONST, sizeof(TYPE)) , ...) | vmalloc( - sizeof(THING) * (COUNT_ID) + array_size(COUNT_ID, sizeof(THING)) , ...) | vmalloc( - sizeof(THING) * COUNT_ID + array_size(COUNT_ID, sizeof(THING)) , ...) | vmalloc( - sizeof(THING) * (COUNT_CONST) + array_size(COUNT_CONST, sizeof(THING)) , ...) | vmalloc( - sizeof(THING) * COUNT_CONST + array_size(COUNT_CONST, sizeof(THING)) , ...) ) // 2-factor product, only identifiers. @@ identifier SIZE, COUNT; @@ vmalloc( - SIZE * COUNT + array_size(COUNT, SIZE) , ...) // 3-factor product with 1 sizeof(type) or sizeof(expression), with // redundant parens removed. @@ expression THING; identifier STRIDE, COUNT; type TYPE; @@ ( vmalloc( - sizeof(TYPE) * (COUNT) * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | vmalloc( - sizeof(TYPE) * (COUNT) * STRIDE + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | vmalloc( - sizeof(TYPE) * COUNT * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | vmalloc( - sizeof(TYPE) * COUNT * STRIDE + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | vmalloc( - sizeof(THING) * (COUNT) * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | vmalloc( - sizeof(THING) * (COUNT) * STRIDE + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | vmalloc( - sizeof(THING) * COUNT * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | vmalloc( - sizeof(THING) * COUNT * STRIDE + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) ) // 3-factor product with 2 sizeof(variable), with redundant parens removed. @@ expression THING1, THING2; identifier COUNT; type TYPE1, TYPE2; @@ ( vmalloc( - sizeof(TYPE1) * sizeof(TYPE2) * COUNT + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2)) , ...) | vmalloc( - sizeof(TYPE1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2)) , ...) | vmalloc( - sizeof(THING1) * sizeof(THING2) * COUNT + array3_size(COUNT, sizeof(THING1), sizeof(THING2)) , ...) | vmalloc( - sizeof(THING1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(THING1), sizeof(THING2)) , ...) | vmalloc( - sizeof(TYPE1) * sizeof(THING2) * COUNT + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2)) , ...) | vmalloc( - sizeof(TYPE1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2)) , ...) ) // 3-factor product, only identifiers, with redundant parens removed. @@ identifier STRIDE, SIZE, COUNT; @@ ( vmalloc( - (COUNT) * STRIDE * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | vmalloc( - COUNT * (STRIDE) * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | vmalloc( - COUNT * STRIDE * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | vmalloc( - (COUNT) * (STRIDE) * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | vmalloc( - COUNT * (STRIDE) * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | vmalloc( - (COUNT) * STRIDE * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | vmalloc( - (COUNT) * (STRIDE) * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | vmalloc( - COUNT * STRIDE * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) ) // Any remaining multi-factor products, first at least 3-factor products // when they're not all constants... @@ expression E1, E2, E3; constant C1, C2, C3; @@ ( vmalloc(C1 * C2 * C3, ...) | vmalloc( - E1 * E2 * E3 + array3_size(E1, E2, E3) , ...) ) // And then all remaining 2 factors products when they're not all constants. @@ expression E1, E2; constant C1, C2; @@ ( vmalloc(C1 * C2, ...) | vmalloc( - E1 * E2 + array_size(E1, E2) , ...) ) Signed-off-by: Kees Cook <keescook@chromium.org>
2018-02-14ALSA: emu10k1: add a IOMMU workaroundMaciej S. Szmigiero1-5/+44
The Audigy 2 CA0102 chip (but most likely others from the emu10k1 family, too) has a problem that from time to time it likes to do few DMA reads a bit beyond its normal allocation and gets very confused if these reads get blocked by a IOMMU. For the first (reserved) page this happens multiple times at every playback, for various synth pages it happens randomly, rarely for PCM playback buffers and the page table memory itself. All these reads seem to follow a similar pattern, observed read offsets beyond the allocation end were 0x00, 0x40, 0x80 and 0xc0 (PCI cache line multiples), so it looks like the device tries to accesses up to 256 extra bytes. As a workaround let's widen these DMA allocations by an extra page if we detect that the device is behind a non-passthrough IOMMU (the DMA memory should be relatively plenty on IOMMU systems). Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-02-14ALSA: emu10k1: add optional debug printouts with DMA addressesMaciej S. Szmigiero1-0/+8
When we get a IOMMU page fault for a emu10k1 device it is very hard to discover which of chip many DMA allocations triggered it (since on a IOMMU system the DMA address space is often very different from the CPU one). Let's add optional debug printouts providing this information. These debug printouts are only enabled on an explicit request via the kernel dynamic debug mechanism. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-02-14ALSA: emu10k1: use dma_set_mask_and_coherent()Maciej S. Szmigiero1-2/+1
We have been calling dma_set_mask() and then dma_set_coherent_mask() with the same value, but there is a dma_set_mask_and_coherent() function that does exactly that so let's use it instead. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-02-14ALSA: emu10k1: remove reserved_pageMaciej S. Szmigiero1-11/+0
The emu10k1-family chips need the first page (index 0) reserved in their page tables for some reason (every emu10k1 driver I've checked does this without much of an explanation). Using the first page for normal samples results in a broken playback. However, we already have a dummy page allocated - so called "silent page" and, in fact, had always been setting it as the first page in the chip page table because an initialization of every entry of the page table to point to a silent page happens after and overwrites the reserved_page allocation. So the only thing remaining to remove the reserved_page allocation is a trivial change to the page allocation logic to ignore the first page entry and start its allocations from the second entry (index 1). Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-15ALSA: emu10k1: Use workqueue instead of kthread for emu1010 fw pollingTakashi Iwai1-76/+56
This patch is a cleanup of EMU1010 dock probing code in emu10k1 driver to use work instead of kthread in a loop. The work is lighter and easier to control than kthread, in general. Instead of a loop with the explicit sleep, we do simply delayed-schedule the work. At suspend/resume callbacks, the work is canceled and restarted, respectively. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-15ALSA: emu10k1: Simplify firmware loader codeTakashi Iwai1-62/+40
The EMU1010 support in emu10k1 driver has two request_firmware() calls, one for the main board and one for the dock. Both call patterns are fairly similar, and we can simplify it by introducing a helper function and a table instead of the open switch/case. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-15ALSA: emu10k1: Fix emu1010 dock attach checkTakashi Iwai1-6/+6
The emu1010_firmware_thread() checks the previous dock status, but a wrong register is recorded as the last status when the dock is plugged in. Usually this isn't a big issue since this value gets overwritten by the next loop after one second. But when a dock is unplugged immediately after plugging, it means essentially missing undock handling. This patch addresses it by remembering the correct register value. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-01-29ALSA: emu10k1: correctly handling failed thread creationInsu Yun1-0/+8
Since kthread_create can be failed, it needs to check whether error occurred and return error code. Signed-off-by: Insu Yun <wuninsu@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-29ALSA: emu10k1: Fix/cleanup ifdef CONFIG_PROC_FSTakashi Iwai1-1/+1
Build emuproc.o conditionally and drop the unneeded ifdefs. Some are replaced with the new CONFIG_SND_PROC_FS. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-29Merge branch 'for-linus' into for-nextTakashi Iwai1-5/+12
Conflicts: sound/pci/emu10k1/emu10k1_main.c Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-29ALSA: emu10k1: Emu10k2 32 bit DMA modePeter Zubaj1-5/+12
Looks like audigy emu10k2 (probably emu10k1 - sb live too) support two modes for DMA. Second mode is useful for 64 bit os with more then 2 GB of ram (fixes problems with big soundfont loading) 1) 32MB from 2 GB address space using 8192 pages (used now as default) 2) 16MB from 4 GB address space using 4096 pages Mode is set using HCFG_EXPANDED_MEM flag in HCFG register. Also format of emu10k2 page table is then different. Signed-off-by: Peter Zubaj <pzubaj@marticonet.sk> Tested-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27Merge branch 'for-4.2' into for-nextTakashi Iwai1-2/+2
2015-04-27ALSA: emu10k1: Fix card shortname string buffer overflowTakashi Iwai1-2/+2
Some models provide too long string for the shortname that has 32bytes including the terminator, and it results in a non-terminated string exposed to the user-space. This isn't too critical, though, as the string is stopped at the succeeding longname string. This patch fixes such entries by dropping "SB" prefix (it's enough to fit within 32 bytes, so far). Meanwhile, it also changes strcpy() with strlcpy() to make sure that this kind of problem won't happen in future, too. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-16ALSA: remove deprecated use of pci apiQuentin Lambert1-2/+2
Replace occurences of the pci api by appropriate call to the dma api. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @deprecated@ idexpression id; position p; @@ ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @bad1@ idexpression id; position deprecated.p; @@ ...when != &id->dev when != pci_get_drvdata ( id ) when != pci_enable_device ( id ) ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @depends on !bad1@ idexpression id; expression direction; position deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_ATOMIC ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_ATOMIC ) ) Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11ALSA: emu10k1: handle dock disconnectsMichael Gernoth1-0/+9
When the dock on an E-mu 1010 card is disconnected, all outputs get muted by the hardware. Add logic to detect a disconnect and unmute. Signed-off-by: Michael Gernoth <michael@gernoth.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-05ALSA: emu10k1: add Audigy 5/RxMichael Gernoth1-0/+16
The Audigy 5/Rx is essentially an Audigy 4 behind a PLX PCIe- bridge with an additional TOSLINK output. Signed-off-by: Michael Gernoth <michael@gernoth.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-03ALSA: emu10k1: Deletion of unnecessary checks before three function callsMarkus Elfring1-6/+3
The functions kfree(), release_firmware() and snd_util_memhdr_free() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-26ALSA: emu10k1: Use standard printk helpersTakashi Iwai1-28/+45
Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-12ALSA: pci: Convert to snd_card_new() with a device pointerTakashi Iwai1-1/+0
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-24ALSA: emu10k1: Fix dock firmware loadingTakashi Iwai1-6/+33
The commit [b209c4df: ALSA: emu10k1: cache emu1010 firmware] broke the firmware loading of the dock, just (mistakenly) ignoring a different firmware for docks on some models. This patch revives them again. Bugzilla: https://bugs.archlinux.org/task/34865 Reported-and-tested-by: Tobias Powalowski <tobias.powalowski@googlemail.com> Cc: <stable@vger.kernel.org> [v3.8+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-25ALSA: emu10k1: Load firmware when it was already cachedFlorian Zeitz1-5/+6
This expands the regression fix from d28215996b0c3a900411769039aa3c54cf7008ab. The firmware also needs to be loaded when it was already cached. Signed-off-by: Florian Zeitz <florob@babelmonkeys.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-22ALSA: emu10k1: Fix regression in emu1010 firmware loadingMihail Zenkov1-0/+5
This patch fix regression in emu1010 firmware loading after http://git.alsa-project.org/?p=alsa-kprivate.git;a=commitdiff;h=b209c4dfcd960ab176d4746ab7dc442a3edb4575 I just revert small part of this commit. Tested on emu1212m pci. Signed-off-by: Mihail Zenkov <mihail.zenkov@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: pci: remove __dev* attributesBill Pemberton1-2/+2
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>
2012-11-22ALSA: emu10k1: Add missing ifdef for emu->suspend referenceTakashi Iwai1-0/+2
It's defined only for PM. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-22ALSA: emu10k1: don't update firmware during suspend/resumeTakashi Iwai1-0/+2
Add a flag to suppress the update in emu1010_firmware_thread() during suspend/resume. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-22ALSA: emu10k1: cache emu1010 firmwareTakashi Iwai1-52/+36
Instead of calling request_firmware() at each time, keep the obtained firmware internally and reuse it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-17ALSA: emu10k1: add chip details for E-mu 1010 PCIe cardMaxim Kachur1-0/+9
Add chip details for E-mu 1010 PCIe card. It has the same chip as found in E-mu 1010b but it uses different PCI id. Signed-off-by: Maxim Kachur <mcdebugger@duganet.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-14ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEPTakashi Iwai1-4/+4
Otherwise we may get compile warnings due to unused functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-31ALSA: emu10k1 - add another Audigy 2 ZS IDTim Yamin1-0/+12
0x20051102 is an Audigy 2 ZS. Signed-off-by: Tim Yamin <plasm@roo.me.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker1-0/+1
Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-14Merge branch 'test/pci-rename' into topic/miscTakashi Iwai1-1/+1
2011-06-12ALSA: emu10k1: Add details for E-mu 0404 PCIe versionFlorian Zeitz1-0/+8
This patch adds the necessary details to support the PCIe version of E-MU's 0404 card. From comparing the PCBs it seems the PCIe version just added a PCIe chipset and left all other components pretty much in place. For anyone intrigued to take a look at the PCB there are pictures I took at <http://babelmonkeys.de/~florob/E-MU%200404/>. Signed-off-by: Florian Zeitz <florob@babelmonkeys.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10ALSA: use KBUILD_MODNAME for request_irq argument in sound/pci/*Takashi Iwai1-1/+1
The name argument of request_irq() appears in /proc/interrupts, and it's quite ugly when the name entry contains a space or special letters. In general, it's simpler and more readable when the module name appears there, so let's replace all entries with KBUILD_MODNAME. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-25ALSA: emu10k1 - emu10k1_main.c remove one to many l's in the word.Justin P. Mattock1-1/+1
The patch below removes an extra "l" in the word. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-16Fix typos in commentsThomas Weber1-1/+1
[Ss]ytem => [Ss]ystem udpate => update paramters => parameters orginal => original Signed-off-by: Thomas Weber <swirl@gmx.li> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-24Merge branch 'topic/emu10k1' into for-linusTakashi Iwai1-6/+5
2009-02-26ALSA: sound/pci/emu10k1: fix sparse warning: different signednessHannes Eder1-6/+4
Fix this sparse warnings: sound/pci/emu10k1/emu10k1_main.c:723:66: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:724:68: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:748:74: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:751:66: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:759:73: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:760:73: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:837:50: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:845:50: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:881:50: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:889:57: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:890:57: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:895:60: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:897:60: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:899:60: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:910:56: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:914:57: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:918:56: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:922:57: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:924:58: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:936:60: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:1073:60: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:1088:60: warning: incorrect type in argument 3 (different signedness) sound/pci/emu10k1/emu10k1_main.c:1093:58: warning: incorrect type in argument 3 (different signedness) Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-24ALSA: emu10k1 - Fix digital/analog switch on audigy2 ZSTakashi Iwai1-0/+1
Fix the inverted logic of shared spdif switch. Reference: Novell bnc#478496 https://bugzilla.novell.com/show_bug.cgi?id=478496 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: emu10k1 - Add missing KERN_* prefix to printkTakashi Iwai1-2/+3
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-07Merge branch 'topic/fix/misc' into topic/miscTakashi Iwai1-0/+3
2008-11-03ALSA: emu10k1 - Add more invert_shared_spdif flag to Audigy modelsTakashi Iwai1-0/+3
Reported in Novell bnc#440862: https://bugzilla.novell.com/show_bug.cgi?id=440862 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-23ALSA: emu10k1: fix coding style for emu10k1_main.cVedran Miletic1-165/+182
I fixed all of coding style errors and some warnings, now it is down to: checkpatch.pl-0.24 --no-tree --file --strict --terse emu10k1_main.c total: 0 errors, 62 warnings, 7 checks, 2075 lines checked Signed-off-by: Vedran Miletic <rivanvx@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-21ALSA: emu10k1: fix faulty commit 18c71092Vedran Miletic1-2/+1
Commit 18c7109289625106cdc810b20b628cd13b46d6dd had #endif leftoff from compilation. This patch fixes it. Also, I replaced a misplaced comment by a useful one, that explains why are here #ifdef and #endif added in compilation. Signed-off-by: Vedran Miletic <rivanvx@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-21ALSA: emu10k1: fix device names for Live!/Audigy1/2/4/E-muVedran Miletic1-70/+76
* added missing SBxxxx, CTxxxx, PCxxx and MAEMxxxx where they were missing, and fixed some of them which were wrong (according to kx.inf, which is pretty accurate compared to anything out there) * fixed device names to make them more consistent across various cards * fixed order of devices where appropriate Signed-off-by: Vedran Miletic <rivanvx@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-02[ALSA] emu10k1 - Fix inverted Analog/Digital mixer switch on Audigy2Takashi Iwai1-0/+1
On Audigy2 Platinum, the Analog/Digital mixer switch is inverted. https://bugzilla.novell.com/show_bug.cgi?id=396204 The patch adds a simple workaround. There might be another device requiring a similar fix, too (or fix for audigy2 generically), but right now I fix only the known broken one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06sound: emu10k1 - fix system hang with Audigy2 ZS Notebook PCMCIA cardJaroslav Franek1-7/+8
When the Linux kernel is compiled with CONFIG_DEBUG_SHIRQ=y, the Soundblaster Audigy2 ZS Notebook PCMCIA card causes the system hang during boot (udev stage) or when the card is hot-plug. The CONFIG_DEBUG_SHIRQ flag is by default 'y' with all Fedora kernels since 2.6.23. The problem was reported as https://bugzilla.redhat.com/show_bug.cgi?id=326411 The issue was hunted down to the snd_emu10k1_create() routine: /* pseudo-code */ snd_emu10k1_create(...) { ... request_irq(... IRQF_SHARED ...) { register the irq handler #ifdef CONFIG_DEBUG_SHIRQ call the irq handler: snd_emu10k1_interrupt() { poll I/O port // <---- !! system hangs ... } #endif } ... snd_emu10k1_cardbus_init(...) { initialize I/O ports } ... } The early access to I/O port in the interrupt handler causes the freeze. Obviously it is necessary to init the I/O ports before accessing them. This patch moves the registration of the irq handler after the initialization of the I/O ports. Signed-off-by: Jaroslav Franek <jarin.franek@post.cz> Acked-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] Fix possible races at free_irq in PCI driversTakashi Iwai1-7/+8
The irq handler of PCI drivers must be released before releasing other resources since the handler for a shared irq can be still called and may access the freed resource again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] emu10k1 - Another EMU0404 Board IDVeli-Matti Valtonen1-9/+17
This is based on pseudo-random playing around with the capabilities. With ca0102 this card gives no output atall, ca0108 appears to work fine, so it rather looks similar to the EMU1010b/EMU1010 changes. Some other people seem to have succeeded in using this aswell: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3496 From: Veli-Matti Valtonen <maligor@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] emu10k1 - Fix kthread handling at resumeTakashi Iwai1-6/+9
Don't create emu1010 kthread again at resume if it's already created. Also make the thread function static. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] emu10k1: General cleanup, add new locks, fix alsa bug#3501, kernel ↵James Courtier-Dutton1-2/+4
bug#9304. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] emu10k1 - Use enum for emu_model typesTakashi Iwai1-13/+16
Use enum instead of digits for emu_model types. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] emu10k1 - 1616(M) cardbus improvementsCtirad Fertr1-73/+108
This patch improves E-Mu 1616(M) cardbus support. It adds definitions of the new Microdock and 1010 cardbus registers (thanks again for descriptions James) and improves mixer for this card. Now you can use S/PDIF and ADAT on Mirodock and also use headpohone output on host cardbus card as another independent output. Signed-off-by: Ctirad Fertr <c.fertr@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] snd:emu10k1: E-Mu updates. Fixes to firmware loading and support for ↵James Courtier-Dutton1-52/+78
0404. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai1-1/+0
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>
2007-10-16[ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.czJaroslav Kysela1-1/+1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16[ALSA] emu10k1: There's no need to cast vmalloc() return value in ↵Jesper Juhl1-2/+3
snd_emu10k1_create() vmalloc() returns void *. no need to cast. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] snd-emu10k1:Unmute the Audio/Micro Dock after firmware load.James Courtier-Dutton1-0/+6
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] snd-emu10k1:Implement SPDIF/ADAT status.James Courtier-Dutton1-1/+9
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] snd-emu10k1:Support for ADAT and S/PDIF.James Courtier-Dutton1-3/+3
Patch submitted by Ctirad Fertr <c.fertr@volny.cz> Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] snd-emu10k1:Improves firmware loading for E-Mu cards.James Courtier-Dutton1-42/+61
Details: Fixes http://bugzilla.kernel.org/show_bug.cgi?id=8176 Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20[ALSA] snd-emu10k1:Enable E-Mu 1616m notebook firmware loading.James Courtier-Dutton1-12/+24
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20[ALSA] snd-emu10k1: Initial support for E-Mu 1616 and 1616m.James Courtier-Dutton1-9/+36
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20[ALSA] emu10k1 - EMU 1212 with 16 capture channelsPavel Hofman1-0/+52
* adding 8 more 32-bit capture channels (total of 16) for emu1010 cards * adding some code comments and card details description Signed-off-by: Pavel Hofman <dustin@seznam.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-11PCI: Change all drivers to use pci_device->revisionAuke Kok1-3/+1
Instead of all drivers reading pci config space to get the revision ID, they can now use the pci_device->revision member. This exposes some issues where drivers where reading a word or a dword for the revision number, and adding useless error-handling around the read. Some drivers even just read it for no purpose of all. In devices where the revision ID is being copied over and used in what appears to be the equivalent of hotpath, I have left the copy code and the cached copy as not to influence the driver's performance. Compile tested with make all{yes,mod}config on x86_64 and i386. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-11[ALSA] add MODULE_FIRMWARE entriesClemens Ladisch1-5/+10
Add MODULE_FIRMWARE() entries, where appropriate. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11[ALSA] snd-emu10k1: Prevent E-Mu 1010 Notebook card from hanging PC.James Courtier-Dutton1-0/+9
E-Mu 1010 is not currently supported yet. Needs development work. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] emu10k1: Add Audio capture support for Audigy 2 ZS Notebook.James Courtier-Dutton1-6/+64
Implement functionallity in order to fixe ALSA bug#2058. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] snd-emu10k1: Add emu1010 internal clock rate control for 44100 or 48000.James Courtier-Dutton1-0/+1
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] snd_emu10k1: Added support for 14dB Attenuation PADS on DACs and ADCs.James Courtier-Dutton1-12/+17
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] emu10k1 - Fix compile warningTakashi Iwai1-1/+1
Fixed a compile warning regarding print format for size_t. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] snd-emu10k1: Added support for emu1010, including E-Mu 1212m and E-Mu ↵James Courtier-Dutton1-122/+418
1820m Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20[ALSA] Remove IRQF_DISABLED for shared PCI irqsTakashi Iwai1-2/+3
Fix IRQ flags for PCI devices. The shared IRQs for PCI devices shouldn't be allocated with IRQF_DISABLED. Also, when MSI is enabled, IRQF_SHARED shouldn't be used. The patch removes unnecessary cast in request_irq and free_irq, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-11-28[ALSA] snd-emu10k1: Fix capture for one variant.James Courtier-Dutton1-0/+1
Fixes ALSA bug#324 Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-06[ALSA] emu10k1: Fix outl() in snd_emu10k1_resume_regs()Arnaud Patard1-2/+2
The emu10k1 driver saves the A_IOCFG and HCFG register on suspend and restores it on resumes. Unfortunately, this doesn't work as the arguments to outl() are reversed. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] snd-emu10k1: Implement 24bit capture via Philips 1361T ADC for SB0240 ↵James Courtier-Dutton1-0/+1
card. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-08-03[ALSA] snd-emu10k1: Implement support for Audigy 2 ZS [SB0353]James Courtier-Dutton1-0/+11
Fixes ALSA bug#1365. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-07-12[ALSA] Fix section mismatch errors in ALSA PCI driversTakashi Iwai1-3/+7
Fixed 'section mismatch' errors in ALSA PCI drivers: - removed invalid __devinitdata from pci id tables - fix/remove __devinit of functions called in suspend/resume Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-07-02[PATCH] irq-flags: sound: Use the new IRQF_ constantsThomas Gleixner1-1/+1
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-22[ALSA] emu10k1 - Move EXPORT_SYMBOL() to adjacent to each functionTakashi Iwai1-13/+0
Move EXPORT_SYMBOL() to adjacent to each exported function/variable. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22[ALSA] emu10k1: Add support for Audigy4 (not Pro)James Courtier-Dutton1-9/+47
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-04-12[ALSA] emu10k1: Add some descriptive text.James Courtier-Dutton1-1/+4
Modules: EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-03-22[ALSA] emu10k1 - Add the entry for Audigy4 SB0400Takashi Iwai1-0/+8
Modules: EMU10K1/EMU10K2 driver Added the missing card entry for Audigy4 SB0400 model. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22[ALSA] semaphore -> mutex (PCI part)Ingo Molnar1-2/+3
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>
2006-01-03[ALSA] snd-emu10k1: Add new SB Live 5.1 PCI-ID.James Courtier-Dutton1-0/+8
Modules: EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03[ALSA] snd-emu10k1: Add comments regarding chips present on the card.James Courtier-Dutton1-2/+11
Modules: EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03[ALSA] snd-emu10k1: Add some comments regarding chip types.James Courtier-Dutton1-0/+14
Modules: EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03[ALSA] snd-emu10k1: Tidy SPI code.James Courtier-Dutton1-22/+30
Modules: EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03[ALSA] snd-emu10k1: Enable speakers on Audigy 2 ZS Notebook.James Courtier-Dutton1-0/+12
Modules: EMU10K1/EMU10K2 driver Description: This enables the 7.1 speaker output of the Audigy 2 ZS Notebook. Further towards fixing ALSA bug#927 TODO: SPDIF/IEC958 output. (untested, might already work) Sound capture. (untested, might already work.) Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03[ALSA] snd-emu10k1: Removes some distortion from Audigy 2 ZS Notebook.James Courtier-Dutton1-1/+27
Modules: EMU10K1/EMU10K2 driver Description: Part way to fix ALSA bug#927 Add support for the SPI interface on the CA0108 chip. This is used to control the registers on the DAC. Headphone output tested. Other outputs and Capture not tested yet. Note: The red LED does not come on, but sound is still OK. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03[ALSA] emu10k1 - Add entry for SB Live 5.1 Digital OEM [SB0220]Gergely Tamas1-0/+6
Modules: EMU10K1/EMU10K2 driver Added the chip-detail entry for SB Live 5.1 Digital OEM [SB0220, (c) 2003]. Signed-off-by: Gergely Tamas <dice@mfa.kfki.hu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] emu10k1: Partial support for Creative emu1212mJames Courtier-Dutton1-4/+146
Modules: EMU10K1/EMU10K2 driver Distorted sound now comes from the Audio Out socket. Still more work to do. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03[ALSA] Optimize for config without PROC_FS (pci drivers)Takashi Iwai1-0/+2
Optimize the code when compiled without CONFIG_PROC_FS for some pci drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] emu10k1 - Add PM supportTakashi Iwai1-106/+202
Modules: EMU10K1/EMU10K2 driver Add PM support to emu10k1 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: PCI emu10k1Takashi Iwai1-19/+20
Modules: EMU10K1/EMU10K2 driver Remove xxx_t typedefs from the PCI emu10k1 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] snd-emu10k1: Attenuate output volume to reduce distortionJames Courtier-Dutton1-0/+2
Modules: EMU10K1/EMU10K2 driver on Audigy 2 ZS Notebook. Set the master volume to about 6 or 8% in alsamixer. This will attenuate the output enough for better sound quality. Note: Only stereo enabled at present. The distortion is caused by the output path after the DSP adding 12dB gain to the output while still in digital mode, resulting in wrap around distortion. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03[ALSA] Add support for Audigy 2 subsystem 2006Lee Revell1-0/+10
Modules: EMU10K1/EMU10K2 driver Add support for Audigy 2 subsystem 2006. Signed-off-by: Lee Revell <rlrevell@joe-job.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] emu10k1 - Enable side surround channels for Audigy2 EXLee Revell1-0/+1
Modules: EMU10K1/EMU10K2 driver Enable side surround channels for Audigy2 EX. Tested by Rick Wright <riwright@vt.edu>. Signed-off-by: Lee Revell <rlrevell@joe-job.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-10-31[PATCH] Creative Audigy 2 cardbus: Add IO window wakeup magicJames Courtier-Dutton1-0/+39
This adds the magic IO wakeup code for the CardBus version of the Creative Labs Audigy 2 to the snd-emu10k1 driver. Without the magic IO enable sequence, reading from the IO region of the card will fail spectacularly, and the machine will hang. My next task will be getting the driver to actually play sound without distortion. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> [ This is a work-in-progress, but since it avoids a total lockup if the emu10k module is loaded on a machine with the cardbus card inserted, we're better off with it than without it, even if sound quality is bad right now ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-07[ALSA] emu10k1 - Fix loading of SBLive Game boardTakashi Iwai1-1/+4
EMU10K1/EMU10K2 driver Fixed the error at loading SBLive Game board (and possible other models). The PCI SSIDs of this board conflicts with SB Live 5.1 Platinum, which has no AC97 chip. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12[ALSA] snd-emu10k1: ALSA bug#1297: Fix a error recognising the SB Live Platinum.James Courtier-Dutton1-3/+2
EMU10K1/EMU10K2 driver The card does not have an AC97 chip. .subsystem = 0x80611102 Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-09-12[ALSA] Replace with kzalloc() - pci stuffTakashi Iwai1-1/+1
AD1889 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver Intel8x0-modem driver,Maestro3 driver,SonicVibes driver,VIA82xx driver VIA82xx-modem driver,AC97 Codec,AK4531 codec,au88x0 driver CA0106 driver,CS46xx driver,EMU10K1/EMU10K2 driver,HDA Codec driver HDA generic driver,HDA Intel driver,ICE1712 driver,ICE1724 driver KORG1212 driver,MIXART driver,NM256 driver,Trident driver,YMFPCI driver Replace kcalloc(1,..) with kzalloc(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30[ALSA] Add identification for Live 5.1 [SB0220]Lee Revell1-0/+7
EMU10K1/EMU10K2 driver Add identification for Live 5.1 [SB0220] Signed-off-by: Lee Revell <rlrevell@joe-job.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30[ALSA] emu10k1 - Add missing ac97 support on SBLive! Player 5.1Takashi Iwai1-0/+1
EMU10K1/EMU10K2 driver Added the missing ac97 support on SBLive! Player 5.1. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30[ALSA] Add new card ID. Fixes ALSA bug #1297James Courtier-Dutton1-1/+1
EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-07-28[ALSA] emu10k1: Add EMU 1212m card entry and document it as not supported yet.James Courtier-Dutton1-0/+7
EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-07-28[ALSA] snd-emu10k1: Fixes recognition of Audigy ES.James Courtier-Dutton1-5/+5
EMU10K1/EMU10K2 driver Fixes ALSA bug #1237. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-07-28[ALSA] emu10k1: Add module option uint subsystem.James Courtier-Dutton1-7/+18
EMU10K1/EMU10K2 driver It allows the user to force the snd-emu10k1 module to think the user has a particular sound card. Useful if their particular sound card is not yet recognised. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-07-28[ALSA] emu10k1: Added tested status comments.James Courtier-Dutton1-0/+3
EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-07-28[ALSA] emu10k1: Sort by card id.James Courtier-Dutton1-43/+37
EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-07-28[ALSA] snd-emu10k1: Card capabilities tidy up.James Courtier-Dutton1-3/+5
EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-06-22[ALSA] emu10k1: Add more card identification entries.James Courtier-Dutton1-0/+78
EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-05-29[ALSA] emu10k1: add details for the audigy player box versionArnaud Patard1-0/+6
EMU10K1/EMU10K2 driver Add details for the audigy player box version. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] emu10k1 - add SB0060 to emu_chip_detailsMikael Magnusson1-0/+6
EMU10K1/EMU10K2 driver The following patch adds SB0060 to emu_chip_details. Signed-off-by: Mikael Magnusson <mikaelmagnusson@glocalnet.net> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-05-29[ALSA] Fix typo in speaker routing. Now sound comes from the correct speakersJames Courtier-Dutton1-1/+1
EMU10K1/EMU10K2 driver when using the p16v HD device. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-05-29[ALSA] Check revision for the proper detection of audigy 2Takashi Iwai1-4/+14
EMU10K1/EMU10K2 driver Check ther revision to detect non-listed audigy 2 boards. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] Audigy SB0090 identificationPeter Zubaj1-4/+14
EMU10K1/EMU10K2 driver This add identification of Audigy 1 model SB0090 and fixes problems with ac97 codec (mic not working). Signed-off-by: Peter Zubaj <pzad@pobox.sk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] Fix the default id of multiple cardsTakashi Iwai1-1/+15
EMU10K1/EMU10K2 driver Fixed the default id string in case identical multiple cards exist. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] Use old default id strings for compatibilityTakashi Iwai1-0/+18
EMU10K1/EMU10K2 driver Use expliciitly the old default id strings for backward compatibility. This will make 'alsactl restore' working again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] clean up card featuresLee Revell1-17/+12
EMU10K1/EMU10K2 driver This patch converts the emu10k1 driver to use the card capabilities structure for some more things. Not extensively tested but seems to work. Signed-off-by: Lee Revell <rlrevell@joe-job.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] Added identification for the Audigy ES.James Courtier-Dutton1-0/+5
EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-05-29[ALSA] Add's identification of the SB Live! Platinum [CT4760P]James Courtier-Dutton1-0/+4
EMU10K1/EMU10K2 driver Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds1-0/+875
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!