An error occurred fetching the project authors.
- 25 Mar, 2015 1 commit
-
-
Takashi Iwai authored
Just forgotten to remove. It's now in sound/hdaudio.h. Reported-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 23 Mar, 2015 4 commits
-
-
Takashi Iwai authored
When the driver is unloaded before the codec is bound, it still keeps the runtime PM refcount up, and results in the unbalance. This patch covers these cases by introducing a flag indicating the runtime PM initialization and handling the codec registration procedure more properly. It also fixes the missing input beep device as a gratis, too. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Now some codes and functionalities of hda_codec struct are moved to hdac_device struct. A few basic attributes like the codec address, vendor ID number, FG numbers, etc are moved to hdac_device, and they are accessed like codec->core.addr. The basic verb exec functions are moved, too. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
A few basic codes for communicating over HD-audio bus are moved to struct hdac_bus now. It has only command and get_response ops in addition to the unsolicited event handling. Note that the codec-side tracing support is disabled temporarily during this transition due to the code shuffling. It will be re-enabled later once when all pieces are settled down. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Define the common hd-audio driver and device types to bind over snd_hda_bus_type publicly. This allows to implement other type of device and driver code over hd-audio bus. Now both struct hda_codec and struct hda_codec_driver inherit these new struct hdac_device and struct hdac_driver, respectively. The bus registration is done in subsys_initcall() to assure it before any other driver registrations. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 20 Mar, 2015 1 commit
-
-
Takashi Iwai authored
David suggested that the name "power_mgmt" is too ambiguous. Rename the flag with a bit clearer one "power_save_node". Also, add the corresponding description to HD-Audio.txt, too. Reported-by:
David Henningsson <david.henningsson@canonical.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 18 Mar, 2015 1 commit
-
-
Takashi Iwai authored
This patch enables the finer power state control of each widget depending on the jack plug state and streaming state in addition to the existing power_down_unused power optimization. The new feature is enabled only when codec->power_mgmt flag is set. Two new flags, pin_enabled and stream_enabled, are introduced in nid_path struct for marking the two individual power states: the pin plug/unplug and DAC/ADC stream, respectively. They can be set statically in case they are static routes (e.g. some mixer paths), too. The power up and down events for each pin are triggered via the standard hda_jack table. The call order is hard-coded, relying on the current implementation of jack event chain (a la FILO/stack order). One point to be dealt carefully is that DAC/ADC cannot be powered on/off while streaming. They are pinned as long as the stream is running. For controlling the power of DAC/ADC, a new patch_ops is added. The generic parser provides the default callback for that. As of this patch, only IDT/Sigmatel codec driver enables the flag. The support on other codecs will follow. An assumption we made in this code is that the widget state (e.g. amp, pinctl, connections) remains after the widget power transition (not about FG power transition). This is true for IDT codecs, at least. But if the widget state is lost at widget power transition, we'd need to implement additional code to sync the cached amp/verbs for the specific NID. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 13 Mar, 2015 1 commit
-
-
Takashi Iwai authored
The driver shutdown ops is simpler than registering reboot notifier manually. There should be no functional change by this -- the codec driver calls its own callback while the bus driver just calls azx_stop() like before. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 03 Mar, 2015 6 commits
-
-
Takashi Iwai authored
The events that are handled by HD-audio drivers are no frequent and urgent ones, so we can use the standard workqueue without any problem nowadays. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This makes the code flow easier -- instead of the controller driver calling snd_hda_build_pcms() and snd_hda_build_controls() explicitly, the codec driver itself builds PCMs and controls at probe time. Then the controller driver only needs to call snd_card_register(). Also, this allows us the full bind/unbind control, too. Even when a codec driver is bound later, it automatically registers the new PCM and controls by itself. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Now we have all pieces ready, and put them into places: - add the hda_pcm refcount to azx_pcm_open() and azx_pcm_close(), - call the most of cleanup code in hda_codec_reset() from the codec driver remove, - call the same code also from the hda_codec object free. Then the codec driver can be unbound more safely now. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
So far, the hda_codec object kept the hda_pcm list in an array, and the codec driver was expected to assign the array. However, this makes the object life cycle management harder, because the assigned array is freed at the codec driver detach while it might be still accessed by the opened streams. In this patch, we allocate each hda_pcm object dynamically and manage it as a linked list. Each object has a kref refcount, and both the codec driver binder and the PCM open/close touches it, so that the object won't be freed while in use. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Allow the codec object to have an individual card pointer. Not only this simplifies the redirections in many places, also this will allow us to make each codec assigned to a different card object. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
snd_hda_build_pcms() does actually three things: let the codec driver build up hda_pcm list, set the PCM default values, and call the attach_pcm bus ops for each hda_pcm instance. The former two are basically independent from the bus implementation, so it'd make the code a bit more readable. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 26 Feb, 2015 2 commits
-
-
Takashi Iwai authored
Now the final bit of runtime PM cleanup: instead of manual notification of the power up/down of the codec via hda_bus pm_notify ops, use the standard runtime PM feature. The child codec device will kick off the runtime PM of the parent (PCI) device upon suspend/resume automatically. For managing whether the link can be really turned off, we use the bit flags bus->codec_powered instead of the earlier bus->power_keep_link_on. flag. Each codec driver is responsible to set/clear the bit flag, and the controller device can be turned off only when all these bits are cleared. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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:
Takashi Iwai <tiwai@suse.de>
-
- 23 Feb, 2015 3 commits
-
-
Takashi Iwai authored
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:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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:
Takashi Iwai <tiwai@suse.de>
-
- 17 Feb, 2015 2 commits
-
-
Takashi Iwai authored
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:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Instead of copying from the given template, let the caller fills the fields after creation. This simplifies the code after all. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 19 Aug, 2014 1 commit
-
-
Takashi Iwai authored
Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 22 Jul, 2014 1 commit
-
-
David Henningsson authored
Previously, calling one quirk function first and another later would make the latter one take priority, this is now changed to make the former take priority. By adding two special values for fixup_id we can also get rid of the fixup_forced flag. Signed-off-by:
David Henningsson <david.henningsson@canonical.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 25 Jun, 2014 1 commit
-
-
Takashi Iwai authored
Pass the codec object so that we can replace all the rest of snd_print*() usages with the proper device-specific print helpers. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 26 May, 2014 1 commit
-
-
David Henningsson authored
The "fixup_forced" flag will indicate whether a specific fixup (or nofixup) has been set by the user, to override the driver's default. This flag will help future patches. Signed-off-by:
David Henningsson <david.henningsson@canonical.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 25 Feb, 2014 3 commits
-
-
Takashi Iwai authored
Some sysfs attributes like init_pin_configs or vendor_name are really basic and should be available no matter whether the codec driver is re-configurable or not. Put them out of #ifdef CONFIG_SND_HDA_RECONFIG and allow the read-only accesses. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
We have currently sysfs attributes for each hwdep, but basically these should belong to the codec itself, per se. Let's add them to the codec object while keeping them for hwdep as is for compatibility. While we are at it, split the sysfs-related stuff into a separate source file, hda_sysfs.c, and keep only the stuff necessary for hwdep in hda_hwdep.c. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
As the HD-audio is treated individually in each codec driver, it's more convenient to assign an own struct device to each codec object. Then we'll be able to use dev_err() more easily for each codec, for example. For achieving it, this patch just creates an object "hdaudioCxDy". It belongs to sound class instead of creating a new bus, just for simplicity, at this stage. No pm ops is implemented in the device struct level but currently it's merely a container. The PCM and hwdep devices are now children of this codec device. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 29 Jan, 2014 1 commit
-
-
David Henningsson authored
Processing coefficients are often a vital part of the codec's configuration, so dumping them can be important. However, because they are undocumented and secret, we do not want to enable this for all codecs by default. Therefore instead add this as a debugging parameter. I have prepared for codecs that want to enable this by default by the extra dump_coef bitfield, but unsure if we want to do that as long as the (unlikely, but still) race remains. Signed-off-by:
David Henningsson <david.henningsson@canonical.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 19 Dec, 2013 1 commit
-
-
Takashi Iwai authored
So far, CONFIG_SND_HDA_CODEC_* kconfigs have been booleans due to historical reasons. The major reason was that the automatic codec driver probing wouldn't work if user sets a codec driver as a module while the controller driver as a built-in. And, another reason was to avoid exporting symbols of the helper codes when all drivers are built in. But, this sort of "kindness" rather confuses people in the end, especially makes the config refinement via localmodconfig unhappy. Also, a codec module would still work if you re-bind the controller driver via sysfs (although it's no automatic loading), so there might be a slight use case. That said, better to let people fallen into a pitfall than being too smart and restrict something. Let's make things straightforward: now all CONFIG_SND_HDA_CODEC_* become tristate, and all symbols exported unconditionally. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 09 Dec, 2013 1 commit
-
-
Takashi Iwai authored
Since there are more HD-audio compatible codecs, move the definitions of HD-audio verbs into common header location, include/sound, so that it can be included cleanly from other drivers than HD-audio driver. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 06 Dec, 2013 1 commit
-
-
Takashi Iwai authored
This simplifies lots of codes indeed. Tested-by:
Mengdong Lin <mengdong.lin@intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 29 Nov, 2013 1 commit
-
-
Mengdong Lin authored
This patch adds 'depop_delay' to struct hda_codec, to indicate a depop delay time in ms when power-down, in function set_power_state() to D3. Default value is -1, for a default delay time. Machine fixup can set a suitable value according to the codec chip and HW audio design. Signed-off-by:
Mengdong Lin <mengdong.lin@intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 27 Nov, 2013 2 commits
-
-
Mengdong Lin authored
To reduce driver resume time, this patch resumes the codecs in parallel if there are multiple codecs on the bus. - The PM workqueue of bus is also used to parallel resuming multiple codecs. - The work item 'pm_work' is renamed to 'suspend_work' to parallel suspending codecs. - Add a work item 'resume_work' to parallel resuming codecs. Signed-off-by:
Mengdong Lin <mengdong.lin@intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Mengdong Lin authored
The time to suspend a single codec may be several hundreds of ms. When runtime power saving is disabled, driver suspend time can be long especially when there are more than one codec on the bus. To reduce driver suspend time, this patch creates a work queue for the bus, and suspends the codecs in parallel if there are multiple codecs on the bus. [fixed cosmetic issues by tiwai] Signed-off-by:
Mengdong Lin <mengdong.lin@intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 26 Nov, 2013 3 commits
-
-
Takashi Iwai authored
No functional change. - codec->pm_down_notified flag is renamed to codec->pm_up_notified flag (and takes the reversed meaning), which is managed solely in hda_call_pm_notify() now. - The explicit call of hda_call_pm_notify() is moved into hda_keep_power_on(). - Removed a redundant call of hda_call_pm_notify() in snd_hda_power_up(), as it's called in hda_call_codec_resume() anyway. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Drop the hard dependency on the generic parser code and load / unload the generic parser code dynamically if built as a module. This allows us to avoid the generic parser if only HDMI/DP codecs are found. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Use bus->power_keep_link_on instead. The controller shouldn't go to D3 when the link isn't reset, so essentially avoiding the link reset means avoiding the runtime PM. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 24 Oct, 2013 1 commit
-
-
Takashi Iwai authored
When HP laptops with mute and mic-record LEDs go to runtime suspend, these LEDs are turned on forcibly no matter whether GPIO pis are on or off. This strange behavior seems triggered by resetting the HD-audio bus link at azx_rutime_suspend(). So, just add a new hda_bus flag to avoid the link reset at runtime suspend and set it for these HP machines. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 27 Aug, 2013 1 commit
-
-
Mengdong Lin authored
This patch adds two fields to unsolicited response, according to spec HDA040-A: - Device Entry (bit 20:15) - Inactive (bit 2) and show the info in debug message. Signed-off-by:
Mengdong Lin <mengdong.lin@intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-