- 26 2月, 2015 1 次提交
-
-
由 Takashi Iwai 提交于
We used to pass the power_save option value to hda_bus via a given pointer. This was needed to refer to the value from the HD-audio core side. However, after the transition to the runtime PM, this is no longer needed. This patch drops the power_save value indirection in hda_bus above, and let the controller driver reprograms the autosuspend value explicitly by a new helper, snd_hda_set_power_save(). Without this call, the HD-audio core doesn't set up the autosuspend and flip the runtime PM. (User may still be able to set up via sysfs, though.) Along with this change, the pointer argument of azx_bus_create() is dropped as well. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 23 2月, 2015 10 次提交
-
-
由 Takashi Iwai 提交于
Like the previous transition of suspend/resume, now move the power-save code to the standard runtime PM. As usual for runtime PM, it's a bit tricky, but this simplified codes a lot in the end. For keeping the usage compatibility, power_save module option still controls the whole power-saving behavior on all codecs. The value is translated to pm_runtime_*_autosuspend() and pm_runtime_allow() / pm_runtime_forbid() calls. snd_hda_power_up() and snd_hda_power_down() are translated to pm_runtime_get_sync() and pm_runtime_put_autosuspend(), respectively. Since we can do call pm_runtime_get_sync() more reliably, the sync version is used always and snd_hda_power_up_d3wait() is dropped. Another slight difference is that snd_hda_power_up()/down() don't call runtime_pm code during the suspend/resume transition phase. Calling them there isn't safe unlike our own code, resulted in unexpected behavior (endless wakeups). The hda_power_count tracepoint was removed, as it doesn't match well with the new code. Last but not least, we need to set ignore_children flag in the parent dev.power field so that the runtime PM of the controller chip won't get confused. The notification is still done in the bus pm_notify callback. We'll get rid of this hack in the later patch. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
This patch moves the suspend/resume mechanisms down to each codec driver level, as we have a proper codec driver bound on the bus now. Then we get the asynchronous PM gratis without fiddling much in the driver level. As a soft-landing transition, implement the common suspend/resume pm ops for hda_codec_driver and keep the each codec driver intact. Only the callers of suspend/resume in the controller side (azx_suspend() and azx_resume()) are removed. Another involved place is azx_bus_reset() calling the temporary suspend and resume as a hackish method of bus reset. The HD-audio core provide a helper function snd_hda_bus_reset() instead. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Now we create the standard HD-audio bus (/sys/bus/hdaudio), and bind the codec driver with the codec device over there. This is the first step of the whole transition so that the changes to each codec driver are kept as minimal as possible. Each codec driver needs to register hda_codec_driver struct containing the currently existing preset via the new helper macro module_hda_codec_driver(). The old hda_codec_preset_list is replaced with this infrastructure. The generic parsers (for HDMI and other) are also included in the preset with the special IDs to bind uniquely. In HD-audio core side, the device binding code is split to hda_bind.c. It provides the snd_hda_bus_type implementation to match the codec driver with the given codec vendor ID. It also manages the module auto-loading by itself like before: when the matching isn't found, it tries to probe the corresponding codec modules, and finally falls back to the generic drivers. (The special ID mentioned above is set at this stage.) The only visible change to outside is that the hdaudio sysfs entry now appears in /sys/bus/devices, not as a sound class device. More works to move the suspend/resume and remove ops will be (hopefully) done in later patches. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
This is a preliminary patch for the hda_bus implementation, removing the parent device setup to codec device. Since the bus and the class devices can't be crossed over, leave the sound devices to the default parent device as is. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Sakamoto 提交于
A part of these drivers, especially BeBoB driver, are programmed to wait some events. Thus the drivers should not destroy any data in .remove() context. This commit moves some destructors from 'struct fw_driver.remove()' to 'struct snd_card.private_free()' to shutdown safely. Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp> Cc: <stable@vger.kernel.org> # 3.19+ Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Sakamoto 提交于
Currently stream destructor in each driver has a problem to be called in a context in which sound card object is released, because the destructors call amdtp_stream_pcm_abort() and touch PCM runtime data. The PCM runtime data is destroyed in application's context with snd_pcm_close(), on the other hand PCM substream data is destroyed after sound card object is released, in most case after all of ALSA character devices are released. When PCM runtime is destroyed and PCM substream is remained, amdtp_stream_pcm_abort() touches PCM runtime data and causes Null-pointer-dereference. This commit changes stream destructors and allows each driver to call it after releasing runtime. Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp> Cc: <stable@vger.kernel.org> # 3.19+ Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Sakamoto 提交于
AMDTP helper functions increment/decrement reference counter for an instance of FireWire unit, while it's complicated for each driver to process error state. In previous commit, each driver has the role of reference counting. This commit removes this role from the helper function. Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp> Cc: <stable@vger.kernel.org> # 3.19+ Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Sakamoto 提交于
Fireworks and Dice drivers try to touch instances of FireWire unit after sound card object is released, while references to the unit is decremented in .remove(). When unplugging during streaming, sound card object is released after .remove(), thus Fireworks and Dice drivers causes GPF or Null-pointer-dereferencing to application processes because an instance of FireWire unit was already released. This commit adds reference-counting for FireWire unit in drivers to allow them to touch an instance of FireWire unit after .remove(). In most case, any operations after .remove() may be failed safely. Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp> Cc: <stable@vger.kernel.org> # 3.19+ Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
BIOS doesn't seem to set up pins for 5.1 and the SPDIF out, so we need to give explicitly here. Reported-and-tested-by: NMisan Thropos <misanthropos@gmx.de> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Sakamoto 提交于
The sign for microsecond (U+0085, MICRO SIGN) was encoded to '0x c2 b5' by UTF-8 character encoding scheme. But the byte sequence was converted to '0x c3 82 c2 b5' in a previous commit. As a result, the byte sequence cannot represent microsecond sign in UTF-8 or ASCII. This may confuse developers. This commit replaces the sign to string expression with 'microseconds' to purge superfluous troubles. Fixes: 5c697e5b("ALSA: firewire-lib: remove rx_blocks_for_midi quirk") Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 21 2月, 2015 8 次提交
-
-
由 Takashi Iwai 提交于
Some codes in snd_pcm_dev_disconnect() are still valid even for internal PCMs, but they are skipped because of the check of list_empty(&pcm->list) at the beginning. Remove this check and put pcm->internal checks appropriately for internal PCM object to process through this function. Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Notifier shouldn't listen to the changes of internal PCMs. Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
An internal PCM object shouldn't be added to the PCM device list, as it's never accessed directly from the user-space, and it has no proc or any similar accesses. Currently, it's excluded in snd_pcm_get() and snd_pcm_next(), but it's easier not to add such an object to the list. Actually, the whole snd_pcm_dev_register() can be skipped for an internal PCM. So this patch changes the code there, but also addresses the uninitialized list_head access. Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
No functional changes at all. Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Pierre-Louis Bossart 提交于
No real functional change, only take wall clock and system time in same routine and add accuracy report. Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Pierre-Louis Bossart 提交于
Introduce more generic .get_time_info to retrieve system timestamp and audio timestamp in single routine. Backwards compatibility is preserved with same functionality as with .wall_clock method (to be removed in following commits to avoid breaking git bisect) Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Pierre-Louis Bossart 提交于
Let userspace select audio timestamp config, ignore and zero all other fields Use audio_tstamp_data to retrieve config and pass report back to user space Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Pierre-Louis Bossart 提交于
Let userspace select audio timestamp config when the STATUS_EXT ioctl is used, ignore and zero all other fields No change for the existing STATUS ioctl, parameters are treated as read-only. Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 20 2月, 2015 5 次提交
-
-
由 Takashi Iwai 提交于
When the mixer amp is touched by control elements, we don't have to power up always; if the codec was suspended at the time, we can just update the amp cache and it's reflected to the hardware upon resume. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
azx_create_codec() function does actually two things: create a bus and probe codecs. For the future work, split this to two logical functions, azx_bus_create() and azx_probe_codecs(). Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
It's just an indirection, so let the caller directly calling snd_hda_build_controls(). Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
There is no big reason to keep them separately. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
For making the debugging of runtime PM easier, introduce azx_has_pm_runtime() and use it in all places checking the runtime pm driver capability. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 18 2月, 2015 1 次提交
-
-
由 Frank C Guenther 提交于
Fix problem where playback of Denon DA-300USB DAC sometimes does not start and leads to error messages like "clock source 41 is not valid, cannot use". Solution: Treat this device the same as other Denon/Marantz devices in sound/usb/quirks.c. Tested with both PCM and DSD formats. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=93261Signed-off-by: NFrank C Guenther <bugzilla.frnkcg@spamgourmet.com> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 17 2月, 2015 8 次提交
-
-
由 Takashi Iwai 提交于
There is no big merit to handle hda_bus_unsolicited object individually, as it's tightly coupled with the hda_bus object itself. Embedding it makes the code simpler in the end. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Instead of copying from the given template, let the caller fills the fields after creation. This simplifies the code after all. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Libin Yang 提交于
Add SNDRV_PCM_INFO_DRAIN_TRIGGER in snd_pcm_hardware.info to call sst_hsw_stream_set_silence_start() when PCM draining. Signed-off-by: NLibin Yang <libin.yang@intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Adrian Knoth 提交于
This commit removes code duplication between snd_hdspm_{capture,playback}_ops. No semantic changes intended, this is purely cosmetic. Signed-off-by: NAdrian Knoth <aknoth@google.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Adrian Knoth 提交于
This commit removes code duplication between snd_hdspm_{capture,playback}_release. No semantic changes intended, this is purely cosmetic. Signed-off-by: NAdrian Knoth <aknoth@google.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Adrian Knoth 提交于
This commit removes code duplication between snd_hdspm_{capture,playback}_open. No semantic changes intended, this is purely cosmetic. Signed-off-by: NAdrian Knoth <aknoth@google.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
A really small cleanup to consolidate snd_find_free_minor() and snd_kernel_minor() so that we can get rid of one more ifdef. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Joe Turner 提交于
Adds a quirk to disable the check that the sample rate has been set correctly, as the Lifecam does not support getting the sample rate. This means that we don't need to wait for the USB timeout when attempting to get the sample rate. Waiting for the timeout causes problems in some applications, which give up on the device acquisition process before it has had time to complete, resulting in no sound. [minor tidy up by tiwai] Signed-off-by: NJoe Turner <joe@oampo.co.uk> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 14 2月, 2015 2 次提交
-
-
由 Eliot Blennerhassett 提交于
Signed-off-by: NEliot Blennerhassett <eliot@blennerhassett.gen.nz> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Adrian Knoth 提交于
RME RayDAT and AIO use a fixed buffer size of 16384 samples. With period sizes of 32-4096, this translates to 4-512 periods. The older RME cards have a variable buffer size but require exactly two periods. This patch enforces nperiods=2 on those cards. Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de> Cc: <stable@vger.kernel.org> # 2.6.39+ Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 13 2月, 2015 1 次提交
-
-
由 Hui Wang 提交于
Otherwise, the mute led can't work at all. Tested-by: NTaihsiang Ho <taihsiang.ho@canonical.com> Cc: <stable@vger.kernel.org> BugLink: https://bugs.launchpad.net/bugs/1410704Signed-off-by: NHui Wang <hui.wang@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 12 2月, 2015 4 次提交
-
-
由 Takashi Iwai 提交于
The autoload lock became already superfluous due to the recent rework of autoload code. Let's drop them now. This allows us to simplify a few codes nicely. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
This patch moves the driver object initialization and allocation to each driver's module init/exit code like other normal drivers. The snd_seq_driver struct is now published in seq_device.h, and each driver is responsible to define it with proper driver attributes (name, probe and remove) with snd_seq_driver specific attributes as id and argsize fields. The helper functions snd_seq_driver_register(), snd_seq_driver_unregister() and module_snd_seq_driver() are used for simplifying codes. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Use const string pointer instead of copying the id string to each object. Also drop the status and list fields of snd_seq_device struct that are no longer used. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
We've used the old house-made code for binding the sequencer device and driver. This can be far better implemented with the standard bus nowadays. This patch refactors the whole sequencer binding code with the bus /sys/bus/snd_seq. The devices appear as id-card-device on this bus and are bound with the drivers corresponding to the given id like the former implementation. The module autoload is also kept like before. There is no change in API functions by this patch, and almost all transitions are kept inside seq_device.c. The proc file output will change slightly but kept compatible as much as possible. Further integration works will follow in later patches. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-