sound fixes for 3.5-rc3
Subsystems (10)
Linus,
The following changes since commit f8f5701bdaf9134b1f90e5044a82c66324d2073f:
Linux 3.5-rc1 (2012-06-02 18:29:26 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-3.5
for you to fetch changes up to 2e8b2b29d1f904353c3e54b342ccb8c66390dab8:
ALSA: hda - Don't forget to call init verbs added by fixup list (2012-06-13 16:47:32 +0200)
----------------------------------------------------------------
Sound fixes for 3.5-rc3
- Fix a regression of USB-audio PCM assignment since 3.4
- A few VGA-switcheroo-related fixes for proper HDMI audio enablement
- Fixed the missing initializations of HD-audio verbs, which may have resulted in various breakage
- Some driver-specific ASoC updates
- A few fixes for the dynamic PCM code
- The addition of pinctrl support for the i.MX audmux which didn't make it into -rc1 due to cross tree dependency issues
- A few minor fixes in compress API codes
----------------------------------------------------------------
David Henningsson (1):
ALSA: HDA: Pin fixup for Zotac Z68 motherboard
Liam Girdwood (3):
ASoC: dapm: Fix connected widget capture path query.
ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE
ASoC: dapm: Fix input list to use source widgets
Mark Brown (3):
ASoC: wm8994: Ensure all AIFnCLK events are run from the _late variants
ASoC: wm8994: Apply volume updates with clocks enabled
ASoC: wm2000: Always use a 4s timeout for the firmware
Richard Zhao (1):
ASoC: imx-audmux: add pinctrl support
Stephen Warren (1):
ASoC: tegra: add MODULE_DEVICE_TABLE to tegra30_ahub
Steven Newbury (1):
ALSA: hda - HDMI Audio init all connectors when VGA-switcheroo is off
Takashi Iwai (7):
ALSA: usb-audio: Fix substream assignments
vga_switcheroo: Add a helper function to get the client state
ALSA: hda - Fix uninitialized HDMI controllers with VGA-switcheroo
vga_switcheroo: Fix error without CONFIG_VGA_SWITCHEROO
vga_switcheroo: Enable/disable audio clients at the right time
ALSA: hda - Fix detection of Creative SoundCore3D controllers
ALSA: hda - Don't forget to call init verbs added by fixup list
Vinod Koul (2):
ALSA: compress_core: don't wake up on pause
ALSA: compress_core: cleanup pointers on stop
drivers/gpu/vga/vga_switcheroo.c | 27 +++++++--- include/linux/vga_switcheroo.h | 7 +++ sound/core/compress_offload.c | 8 +-- sound/pci/hda/hda_intel.c | 17 +++--- sound/pci/hda/patch_conexant.c | 2 +- sound/pci/hda/patch_realtek.c | 10 ++++ sound/soc/codecs/wm2000.c | 59 ++++++++------------- sound/soc/codecs/wm8994.c | 105 ++++++++++++++++++++++++-------------- sound/soc/fsl/imx-audmux.c | 8 +++ sound/soc/soc-dapm.c | 4 +- sound/soc/soc-pcm.c | 6 +++ sound/soc/tegra/tegra30_ahub.c | 1 + sound/usb/card.h | 1 + sound/usb/stream.c | 7 ++- 14 files changed, 162 insertions(+), 100 deletions(-)
drivers/gpu/vga/vga_switcheroo.c +21 -6
@@ -190,6 +190,19 @@ find_active_client(struct list_head *head)return NULL ; } +int vga_switcheroo_get_client_state (struct pci_dev *pdev) +{ +struct vga_switcheroo_client *client; + + client =find_client_from_pci (&vgasr_priv.clients, pdev); +if (!client) +return VGA_SWITCHEROO_NOT_FOUND ; +if (!vgasr_priv.active) +return VGA_SWITCHEROO_INIT ; +return client->pwr_state; +} +EXPORT_SYMBOL (vga_switcheroo_get_client_state); +void vga_switcheroo_unregister_client (struct pci_dev *pdev) {struct vga_switcheroo_client *client;
@@ -291,8 +304,6 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client)vga_switchon (new_client);vga_set_default_device (new_client->pdev); -set_audio_state (new_client->id,VGA_SWITCHEROO_ON ); -return 0 ; }
@@ -308,6 +319,8 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client) active->active = false; +set_audio_state (active->id,VGA_SWITCHEROO_OFF ); +if (new_client->fb_info) {struct fb_event event; event.info = new_client->fb_info;
@@ -321,11 +334,11 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client)if (new_client->ops->reprobe) new_client->ops->reprobe (new_client->pdev); -set_audio_state (active->id,VGA_SWITCHEROO_OFF ); -if (active->pwr_state ==VGA_SWITCHEROO_ON )vga_switchoff (active); +set_audio_state (new_client->id,VGA_SWITCHEROO_ON ); + new_client->active = true;return 0 ; }
@@ -371,8 +384,9 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,/* pwr off the device not in use */ if (strncmp (usercmd,"OFF" ,3 ) ==0 ) {list_for_each_entry (client, &vgasr_priv.clients, list) { -if (client->active) +if (client->active ||client_is_audio (client))continue ; +set_audio_state (client->id,VGA_SWITCHEROO_OFF );if (client->pwr_state ==VGA_SWITCHEROO_ON )vga_switchoff (client); }
@@ -381,10 +395,11 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,/* pwr on the device not in use */ if (strncmp (usercmd,"ON" ,2 ) ==0 ) {list_for_each_entry (client, &vgasr_priv.clients, list) { -if (client->active) +if (client->active ||client_is_audio (client))continue ;if (client->pwr_state ==VGA_SWITCHEROO_OFF )vga_switchon (client); +set_audio_state (client->id,VGA_SWITCHEROO_ON ); } goto out; }
include/linux/vga_switcheroo.h +7 -0
@@ -12,6 +12,9 @@enum vga_switcheroo_state {VGA_SWITCHEROO_OFF ,VGA_SWITCHEROO_ON , +/* below are referred only from vga_switcheroo_get_client_state() */ +VGA_SWITCHEROO_INIT , +VGA_SWITCHEROO_NOT_FOUND , };enum vga_switcheroo_client_id {
@@ -50,6 +53,8 @@ void vga_switcheroo_unregister_handler(void);int vga_switcheroo_process_delayed_switch (void ); +int vga_switcheroo_get_client_state (struct pci_dev *dev); +#else static inline void vga_switcheroo_unregister_client (struct pci_dev *dev) {}
@@ -62,5 +67,7 @@ static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev, int id, bool active) { return 0; }static inline void vga_switcheroo_unregister_handler (void ) {}static inline int vga_switcheroo_process_delayed_switch (void ) {return 0 ; } +static inline int vga_switcheroo_get_client_state (struct pci_dev *dev) {return VGA_SWITCHEROO_ON ; } +#endif
sound/core/compress_offload.c +5 -3
@@ -502,10 +502,8 @@ static int snd_compr_pause(struct snd_compr_stream *stream)if (stream->runtime->state !=SNDRV_PCM_STATE_RUNNING )return -EPERM ; retval = stream->ops->trigger (stream,SNDRV_PCM_TRIGGER_PAUSE_PUSH ); -if (!retval) { +if (!retval) stream->runtime->state =SNDRV_PCM_STATE_PAUSED ; -wake_up (&stream->runtime->sleep); - }return retval; }
@@ -544,6 +542,10 @@ static int snd_compr_stop(struct snd_compr_stream *stream)if (!retval) { stream->runtime->state =SNDRV_PCM_STATE_SETUP ;wake_up (&stream->runtime->sleep); + stream->runtime->hw_pointer =0 ; + stream->runtime->app_pointer =0 ; + stream->runtime->total_bytes_available =0 ; + stream->runtime->total_bytes_transferred =0 ; }return retval; }
sound/pci/hda/hda_intel.c +10 -7
@@ -2484,9 +2484,9 @@ static void azx_notifier_unregister(struct azx *chip) static int DELAYED_INIT_MARK azx_first_init(struct azx *chip); static int DELAYED_INIT_MARK azx_probe_continue(struct azx *chip); +#ifdef SUPPORT_VGA_SWITCHEROO static struct pci_dev __devinit *get_bound_vga (struct pci_dev *pci); -#ifdef SUPPORT_VGA_SWITCHEROO static void azx_vs_set_state (struct pci_dev *pci,enum vga_switcheroo_state state) {
@@ -2578,6 +2578,7 @@ static int __devinit register_vga_switcheroo(struct azx *chip)#else #define init_vga_switcheroo (chip)/* NOP */ #define register_vga_switcheroo (chip) 0 +#define check_hdmi_disabled (pci) false#endif /* SUPPORT_VGA_SWITCHER */ /*
@@ -2638,6 +2639,7 @@ static int azx_dev_free(struct snd_device *device)return azx_free (device->device_data); } +#ifdef SUPPORT_VGA_SWITCHEROO /* * Check of disabled HDMI controller by vga-switcheroo */
@@ -2670,12 +2672,13 @@ static bool __devinit check_hdmi_disabled(struct pci_dev *pci)struct pci_dev *p =get_bound_vga (pci);if (p) { -if (vga_default_device () && p !=vga_default_device ()) +if (vga_switcheroo_get_client_state (p) ==VGA_SWITCHEROO_OFF ) vga_inactive = true;pci_dev_put (p); } return vga_inactive; } +#endif /* SUPPORT_VGA_SWITCHEROO */ /* * white/black-listing for position_fix
@@ -3351,6 +3354,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { { PCI_DEVICE(0x6549, 0x1200), .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, /* Creative X-Fi (CA0110-IBG) */ + /* CTHDA chips */ + { PCI_DEVICE(0x1102, 0x0010), + .driver_data = AZX_DRIVER_CTHDA | AZX_DCAPS_PRESET_CTHDA }, + { PCI_DEVICE(0x1102, 0x0012), + .driver_data = AZX_DRIVER_CTHDA | AZX_DCAPS_PRESET_CTHDA }, #if !defined(CONFIG_SND_CTXFI) && !defined(CONFIG_SND_CTXFI_MODULE)/* the following entry conflicts with snd-ctxfi driver, * as ctxfi driver mutates from HD-audio to native mode with
@@ -3367,11 +3375,6 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { .driver_data = AZX_DRIVER_CTX | AZX_DCAPS_CTX_WORKAROUND | AZX_DCAPS_RIRB_PRE_DELAY | AZX_DCAPS_POSFIX_LPIB },#endif -/* CTHDA chips */ - { PCI_DEVICE(0x1102, 0x0010), - .driver_data = AZX_DRIVER_CTHDA | AZX_DCAPS_PRESET_CTHDA }, - { PCI_DEVICE(0x1102, 0x0012), - .driver_data = AZX_DRIVER_CTHDA | AZX_DCAPS_PRESET_CTHDA },/* Vortex86MX */ { PCI_DEVICE(0x17f3, 0x3010), .driver_data = AZX_DRIVER_GENERIC },/* VMware HDAudio */
sound/pci/hda/patch_conexant.c +1 -1
@@ -4061,7 +4061,7 @@ static void cx_auto_init_digital(struct hda_codec *codec)static int cx_auto_init (struct hda_codec *codec) {struct conexant_spec *spec = codec->spec; -/*snd_hda_sequence_write(codec, cx_auto_init_verbs);*/ +snd_hda_gen_apply_verbs (codec);cx_auto_init_output (codec);cx_auto_init_input (codec);cx_auto_init_digital (codec);
sound/pci/hda/patch_realtek.c +10 -0
@@ -1896,6 +1896,7 @@ static int alc_init(struct hda_codec *codec)alc_fix_pll (codec);alc_auto_init_amp (codec, spec->init_amp); +snd_hda_gen_apply_verbs (codec);alc_init_special_input_src (codec);alc_auto_init_std (codec);
@@ -6439,6 +6440,7 @@ enum {ALC662_FIXUP_ASUS_MODE7 ,ALC662_FIXUP_ASUS_MODE8 ,ALC662_FIXUP_NO_JACK_DETECT , + ALC662_FIXUP_ZOTAC_Z68, }; static const struct alc_fixup alc662_fixups[] = {
@@ -6588,6 +6590,13 @@ static const struct alc_fixup alc662_fixups[] = { .type = ALC_FIXUP_FUNC, .v.func = alc_fixup_no_jack_detect, }, + [ALC662_FIXUP_ZOTAC_Z68] = { + .type = ALC_FIXUP_PINS, + .v.pins = (const struct alc_pincfg []) { + {0x1b ,0x02214020 },/* Front HP */ + { } + } + }, };static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -6601,6 +6610,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {SND_PCI_QUIRK (0x144d ,0xc051 ,"Samsung R720" ,ALC662_FIXUP_IDEAPAD ),SND_PCI_QUIRK (0x17aa ,0x38af ,"Lenovo Ideapad Y550P" ,ALC662_FIXUP_IDEAPAD ),SND_PCI_QUIRK (0x17aa ,0x3a0d ,"Lenovo Ideapad Y550" ,ALC662_FIXUP_IDEAPAD ), +SND_PCI_QUIRK (0x19da ,0xa130 ,"Zotac Z68" ,ALC662_FIXUP_ZOTAC_Z68 ),SND_PCI_QUIRK (0x1b35 ,0x2206 ,"CZC P10T" ,ALC662_FIXUP_CZC_P10T ), #if 0
sound/soc/codecs/wm2000.c +21 -38
192 lines not on this page · raw message
sound/soc/codecs/wm8994.c +66 -39
176 lines not on this page · raw message
sound/soc/fsl/imx-audmux.c +8 -0
@@ -26,6 +26,7 @@#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/slab.h> +#include <linux/pinctrl/consumer.h> #include "imx-audmux.h"
@@ -249,6 +250,7 @@ EXPORT_SYMBOL_GPL(imx_audmux_v2_configure_port);static int __devinit imx_audmux_probe (struct platform_device *pdev) {struct resource *res; +struct pinctrl *pinctrl;const struct of_device_id *of_id =of_match_device (imx_audmux_dt_ids, &pdev->dev);
@@ -257,6 +259,12 @@ static int __devinit imx_audmux_probe(struct platform_device *pdev)if (!audmux_base)return -EADDRNOTAVAIL ; + pinctrl =devm_pinctrl_get_select_default (&pdev->dev); +if (IS_ERR (pinctrl)) { +dev_err (&pdev->dev,"setup pinctrl failed!" ); +return PTR_ERR (pinctrl); + } + audmux_clk =clk_get (&pdev->dev,"audmux" );if (IS_ERR (audmux_clk)) { dev_dbg(&pdev->dev, "cannot get clock: %ld\n",
sound/soc/soc-dapm.c +2 -2
@@ -913,7 +913,7 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget,/* do we need to add this widget to the list ? */ if (list) {int err; - err =dapm_list_add_widget (list, path->sink); + err =dapm_list_add_widget (list, path->source);if (err <0 ) {dev_err (widget->dapm->dev,"could not add widget %s\n" , widget->name);
@@ -954,7 +954,7 @@ int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream,if (stream ==SNDRV_PCM_STREAM_PLAYBACK ) paths =is_connected_output_ep (dai->playback_widget, list);else - paths =is_connected_input_ep (dai->playback_widget, list); + paths =is_connected_input_ep (dai->capture_widget, list);trace_snd_soc_dapm_connected (paths, stream);dapm_clear_walk (&card->dapm);
sound/soc/soc-pcm.c +6 -0
@@ -794,6 +794,9 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,for (i =0 ; i < card->num_links; i++) { be = &card->rtd[i]; +if (!be->dai_link->no_pcm) +continue ; +if (be->cpu_dai->playback_widget == widget || be->codec_dai->playback_widget == widget)return be;
@@ -803,6 +806,9 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,for (i =0 ; i < card->num_links; i++) { be = &card->rtd[i]; +if (!be->dai_link->no_pcm) +continue ; +if (be->cpu_dai->capture_widget == widget || be->codec_dai->capture_widget == widget)return be;
sound/soc/tegra/tegra30_ahub.c +1 -0
@@ -629,3 +629,4 @@ MODULE_AUTHOR("Stephen Warren <[email protected]>");MODULE_DESCRIPTION ("Tegra30 AHUB driver" );MODULE_LICENSE ("GPL v2" );MODULE_ALIAS ("platform:" DRV_NAME ); +MODULE_DEVICE_TABLE (of, tegra30_ahub_of_match);
sound/usb/card.h +1 -0
@@ -119,6 +119,7 @@ struct snd_usb_substream {unsigned long unlink_mask;/* bitmask of unlinked urbs */ /* data and sync endpoints for this stream */ +unsigned int ep_num;/* the endpoint number */ struct snd_usb_endpoint *data_endpoint;struct snd_usb_endpoint *sync_endpoint;unsigned long flags;
sound/usb/stream.c +3 -4
@@ -97,6 +97,7 @@ static void snd_usb_init_substream(struct snd_usb_stream *as, subs->formats |= fp->formats; subs->num_formats++; subs->fmt_type = fp->fmt_type; + subs->ep_num = fp->endpoint; }/*
@@ -119,9 +120,7 @@ int snd_usb_add_audio_stream(struct snd_usb_audio *chip,if (as->fmt_type != fp->fmt_type)continue ; subs = &as->substream[stream]; -if (!subs->data_endpoint) -continue ; -if (subs->data_endpoint->ep_num == fp->endpoint) { +if (subs->ep_num == fp->endpoint) {list_add_tail (&fp->list, &subs->fmt_list); subs->num_formats++; subs->formats |= fp->formats;
@@ -134,7 +133,7 @@ int snd_usb_add_audio_stream(struct snd_usb_audio *chip,if (as->fmt_type != fp->fmt_type)continue ; subs = &as->substream[stream]; -if (subs->data_endpoint) +if (subs->ep_num)continue ; err =snd_pcm_new_stream (as->pcm, stream,1 );if (err <0 )