f6a82a0c | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop superfluous PCM private_free
snd_pcm_lib_preallocate_free_for_all() doesn't have to be called from each driver as it's called in the PCM core.
Signed-off-by: Takashi Iwai <tiwai@sus
ALSA: x86: Drop superfluous PCM private_free
snd_pcm_lib_preallocate_free_for_all() doesn't have to be called from each driver as it's called in the PCM core.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
e9d65abf | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop unused fields from snd_intelhad struct
Also change the flag_underrun to bool to be clearer.
Signed-off-by: Takashi Iwai <tiwai@suse.de> |
df76df12 | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Remove indirect call of snd_pcm_period_elapsed()
Again another indirect call... Let's straighten it up. Also define the had_stream field with a proper type instead of a void pointer.
Si
ALSA: x86: Remove indirect call of snd_pcm_period_elapsed()
Again another indirect call... Let's straighten it up. Also define the had_stream field with a proper type instead of a void pointer.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
e29c0f96 | 01-Feb-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Fix for CONFIG_PM=n
The direct access to power.runtime_status is taboo, let's use a helper macro to avoid the compile error with CONFIG_PM=n.
Signed-off-by: Takashi Iwai <tiwai@suse.de> |
c75b0476 | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Replace pr_xxx() with dev_xxx()
dev_xxx() helpers give a tidier output in general.
While we're at it, remove many useless debug prints (e.g. the ones at each function entry), replace som
ALSA: x86: Replace pr_xxx() with dev_xxx()
dev_xxx() helpers give a tidier output in general.
While we're at it, remove many useless debug prints (e.g. the ones at each function entry), replace some too verbose errors with debugs, and use WARN_ON() for some serious errors.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
372d855f | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Fold intel_hdmi_audio_if.c into main file
As the very last step, we fold intel_hdmi_audio_if.c into the main file, intel_hdmi_audio.c. This is merely a cleanup, and no functional change.
ALSA: x86: Fold intel_hdmi_audio_if.c into main file
As the very last step, we fold intel_hdmi_audio_if.c into the main file, intel_hdmi_audio.c. This is merely a cleanup, and no functional change.
By this move, we can mark all functions and variables as static, which allows the compiler more optimizations.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
da864809 | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Flatten two abstraction layers
This is the final stage for a big clean-up series. Here we flatten the two layers into one. Formerly, the implementation was split to HDMI "shell" that ta
ALSA: x86: Flatten two abstraction layers
This is the final stage for a big clean-up series. Here we flatten the two layers into one. Formerly, the implementation was split to HDMI "shell" that talks with the platform device, and HDMI audio part that communicates via caps and other event handlers. All these would be good if there were multiple instantiations or if there were data protection. But neither are true in our case. That said, it'll be easier to have a flat driver structure in the end.
In this patch, the former struct hdmi_lpe_audio_ctx is forged into the existing struct snd_intelhad. The latter has already a few members that are basically the copy from the former. Only a few new members for the lowlevel I/O are added by this change.
Then, the had_get_caps() and had_set_caps() are simply replaced with the direct calls to copy the data in the struct fields. Also, the had_event_handler() calls are replaced with the direct call for each event as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
eeb756c5 | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop unused hdmi_audio_query()
It's used nowhere. Kill it.
Signed-off-by: Takashi Iwai <tiwai@suse.de> |
36ec0d99 | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Call snd_card_register() at the end
The card registration should be done at the last stage of the probe procedure. Otherwise user-space may access to the device before the whole initiali
ALSA: x86: Call snd_card_register() at the end
The card registration should be done at the last stage of the probe procedure. Otherwise user-space may access to the device before the whole initialization is done.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
301cf8a9 | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Check platform_data earlier
Just a minor optimization; check the presence of platform_data earlier in the probe function before actually starting allocation, which makes the error path ea
ALSA: x86: Check platform_data earlier
Just a minor optimization; check the presence of platform_data earlier in the probe function before actually starting allocation, which makes the error path easier.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
c415022e | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop superfluous CHT PCI ID check
Since the config base offset is now set per pipe id, we don't have to check Cherry Trail PCI IDs any longer. Currently it's used only for debug prints.
ALSA: x86: Drop superfluous CHT PCI ID check
Since the config base offset is now set per pipe id, we don't have to check Cherry Trail PCI IDs any longer. Currently it's used only for debug prints. Let's drop it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
5647aec2 | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Embed snd_intelhad into snd_card
Instead of allocating snd_intelhad struct, use the card's private_data and embed it. It simplifies the code a lot.
While we're at it, embed had_stream i
ALSA: x86: Embed snd_intelhad into snd_card
Instead of allocating snd_intelhad struct, use the card's private_data and embed it. It simplifies the code a lot.
While we're at it, embed had_stream into snd_intelhad struct instead of individually allocating, and rename had_pvt_data to a bit more specific name, had_stream_data.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
dae15a9d | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Move dma_mask debug print into intel_hdmi_lpe_audio.c
It belongs to the right place.
And, remove a few sanity checks (e.g. NULL card) and debug prints as well.
Signed-off-by: Takashi Iw
ALSA: x86: Move dma_mask debug print into intel_hdmi_lpe_audio.c
It belongs to the right place.
And, remove a few sanity checks (e.g. NULL card) and debug prints as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
0e18060f | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop unused hw_silence field
It's nowhere used. Let's drop it.
Signed-off-by: Takashi Iwai <tiwai@suse.de> |
6ddb3ab6 | 30-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Move the global underrun_count to struct snd_intelhad
The last one is in intel_hdmi_audio.c, underrun_count: this can be embedded in snd_intelhad object.
Signed-off-by: Takashi Iwai <tiw
ALSA: x86: Move the global underrun_count to struct snd_intelhad
The last one is in intel_hdmi_audio.c, underrun_count: this can be embedded in snd_intelhad object.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
7f2e9ab5 | 30-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop global ELD copy
Similarly like the previous patch, drop the global variable to keep the ELD copy. It can be embedded in hdmi_lpe_audio_ctx as well.
And this makes easier to code, i
ALSA: x86: Drop global ELD copy
Similarly like the previous patch, drop the global variable to keep the ELD copy. It can be embedded in hdmi_lpe_audio_ctx as well.
And this makes easier to code, it's just a memcpy(), after all.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
055610b0 | 30-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop global hlpe_state
Now it's the turn to drop the global hlpe_state variable. It can be gracefully embedded in hdmi_lpe_audio_ctx struct.
Signed-off-by: Takashi Iwai <tiwai@suse.de> |
bf8b24f8 | 30-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop the global platform device reference
Instead of referring to the global hlpe_pdev variable, pass the platform device object to each function properly. Accessing to the global object
ALSA: x86: Drop the global platform device reference
Instead of referring to the global hlpe_pdev variable, pass the platform device object to each function properly. Accessing to the global object is really ugly and error-prone.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
af3e5c9c | 30-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop unused mid_hdmi_audio_is_busy()
The function is nowhere used. Kill it.
Signed-off-by: Takashi Iwai <tiwai@suse.de> |
033e925f | 30-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Fix possible stale interrupt calls
Registering the irq handler at the too early place may cause a system stall because the irq handler may be triggered before the other initializations.
ALSA: x86: Fix possible stale interrupt calls
Registering the irq handler at the too early place may cause a system stall because the irq handler may be triggered before the other initializations. Move the irq handler registration to the later point.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
437af8f2 | 30-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Call event callback directly
Currently the driver calls the event callback stored in its ctx pointer, but it's obviously inefficient. Replace it with the direct calls.
Signed-off-by: Ta
ALSA: x86: Call event callback directly
Currently the driver calls the event callback stored in its ctx pointer, but it's obviously inefficient. Replace it with the direct calls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
dd895f2e | 30-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop useless mutex at probe
had_mutex is (supposedly) used to protect the concurrent calls of hdmi_audio_probe(). But we may have only one device at most, so it's utterly useless. Drop
ALSA: x86: Drop useless mutex at probe
had_mutex is (supposedly) used to protect the concurrent calls of hdmi_audio_probe(). But we may have only one device at most, so it's utterly useless. Drop it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
45459d16 | 31-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Handle the error from hdmi_audio_probe() properly
The error from hdmi_audio_probe() wasn't handled properly, and it may leave some resources leaked or mapped. Fix it and also clean up th
ALSA: x86: Handle the error from hdmi_audio_probe() properly
The error from hdmi_audio_probe() wasn't handled properly, and it may leave some resources leaked or mapped. Fix it and also clean up the error paths.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
79dda75a | 30-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Pass snd_intelhad object to helpers
For reducing the global variable reference, keep snd_intelhad object in the context and pass it to each helper. It's a preliminary change for further
ALSA: x86: Pass snd_intelhad object to helpers
For reducing the global variable reference, keep snd_intelhad object in the context and pass it to each helper. It's a preliminary change for further cleanup.
This also includes the simplification of the probe procedure: the LPE platform driver directly gets the created snd_intelhad object by hdmi_audio_probe(), and passes it to each helper and destructor, hdmi_audio_remove(). The hdmi_audio_probe() function doesn't call the back-registration any longer, which is fairly useless. The LPE platform driver initializes the stuff instead at the right place, and calls the wq after the object creation in the probe function itself.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
6f9ecc76 | 30-Jan-2017 |
Takashi Iwai <tiwai@suse.de> |
ALSA: x86: Drop snd_intel_had_interface indirect calls
Yet another indirection is killed: at this time, it's snd_intel_had_interface. It contains also the name string, but it's nowhere used, thus w
ALSA: x86: Drop snd_intel_had_interface indirect calls
Yet another indirection is killed: at this time, it's snd_intel_had_interface. It contains also the name string, but it's nowhere used, thus we can kill it, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|