A couple of pending HD-audio patches
Subsystems (2)
cover A couple of pending HD-audio patches
Hi,
these are yet another couple of HD-audio patches, one for merging to 3.8, and another an enhancement for 3.9.
Takashi
PATCH 1/1 ALSA: hda/hdmi - Work around "alsactl restore" errors
When "alsactl restore" is performed on HDMI codecs, it tries to restore the channel map value since the channel map controls are writable. But hdmi_chmap_ctl_put() returns -EBADFD when no PCM stream is assigned yet, and this results in an error message from alsactl. Although the error is harmless, it's certainly ugly and can be regarded as a regression.
As a workaround, this patch changes the return code in such a case to be zero for making others happy. (A slight excuse is: when the chmap is changed through the proper alsa-lib API, the PCM status is checked there anyway, so we don't have to be too strict in the kernel side.)
--- sound/pci/hda/patch_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_hdmi.c +1 -1
@@ -1502,7 +1502,7 @@ static int hdmi_chmap_ctl_put(struct snd_kcontrol *kcontrol, ctl_idx =snd_ctl_get_ioffidx (kcontrol, &ucontrol->id); substream =snd_pcm_chmap_substream (info, ctl_idx);if (!substream || !substream->runtime) -return -EBADFD ; +return 0 ;/* just for avoiding error from alsactl restore */ switch (substream->runtime->status->state) {case SNDRV_PCM_STATE_OPEN :case SNDRV_PCM_STATE_SETUP :
Signature · 1 line
1.8.1
PATCH 1/1 ALSA: hda - Allow power_save_controller option override DCAPS
In reply to Takashi IwaiChange the power_save_controller option to bint from bool so that user can override the runtime PM capability bit and force to enable or disable the runtime PM.
--- Documentation/sound/alsa/ALSA-Configuration.txt | 5 +++-- sound/pci/hda/hda_intel.c | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-)
Documentation/sound/alsa/ALSA-Configuration.txt +3 -2
@@ -890,8 +890,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. enable_msi - Enable Message Signaled Interrupt (MSI) (default = off) power_save - Automatic power-saving timeout (in second, 0 = disable) - power_save_controller - Reset HD-audio controller in power-saving mode - (default = on) + power_save_controller - Support runtime D3 of HD-audio controller + (-1 = on for supported chip (default), false = off, + true = force to on even for unsupported hardware) align_buffer_size - Force rounding of buffer/period sizes to multiples of 128 bytes. This is more efficient in terms of memory access but isn't required by the HDA spec and prevents
sound/pci/hda/hda_intel.c +4 -2
@@ -134,8 +134,8 @@ MODULE_PARM_DESC(power_save, "Automatic power-saving timeout "* this may give more power-saving, but will take longer time to * wake up. */ -static bool power_save_controller =1 ; -module_param (power_save_controller, bool,0644 ); +static int power_save_controller =-1 ; +module_param (power_save_controller, bint,0644 );MODULE_PARM_DESC (power_save_controller,"Reset controller in power save mode." );#endif /* CONFIG_PM */
@@ -2711,6 +2711,8 @@ static int azx_runtime_idle(struct device *dev)struct snd_card *card =dev_get_drvdata (dev);struct azx *chip = card->private_data; +if (power_save_controller >0 ) +return 0 ;if (!power_save_controller || !(chip->driver_caps &AZX_DCAPS_PM_RUNTIME ))return -EBUSY ;
Signature · 1 line
1.8.1