From: Greg Kroah-Hartman Date: Thu, 12 Mar 2015 10:42:28 +0000 (+0100) Subject: 3.19-stable patches X-Git-Tag: v3.10.72~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0f2280ef237759d1882057030986ebc7981bba6;p=thirdparty%2Fkernel%2Fstable-queue.git 3.19-stable patches added patches: alsa-firewire-lib-remove-reference-counting.patch alsa-fireworks-bebob-dice-oxfw-add-reference-counting-for-firewire-unit.patch alsa-fireworks-bebob-dice-oxfw-allow-stream-destructor-after-releasing-runtime.patch alsa-fireworks-bebob-dice-oxfw-make-it-possible-to-shutdown-safely.patch alsa-hda-add-pin-configs-for-asus-mobo-with-idt-92hd73xx-codec.patch alsa-hda-controller-code-do-not-export-static-functions.patch alsa-hda-disable-runtime-pm-for-panther-point-again.patch alsa-hda-one-more-dell-macine-needs-dell1_mic_no_presence-quirk.patch alsa-oxfw-fix-a-condition-and-return-code-in-start_stream.patch alsa-pcm-don-t-leave-prepared-state-after-draining.patch --- diff --git a/queue-3.19/alsa-firewire-lib-remove-reference-counting.patch b/queue-3.19/alsa-firewire-lib-remove-reference-counting.patch new file mode 100644 index 00000000000..c3aec954b1b --- /dev/null +++ b/queue-3.19/alsa-firewire-lib-remove-reference-counting.patch @@ -0,0 +1,43 @@ +From c6f224dc20ad959175c2dfec70b5a61c6503a793 Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Sat, 21 Feb 2015 23:54:58 +0900 +Subject: ALSA: firewire-lib: remove reference counting + +From: Takashi Sakamoto + +commit c6f224dc20ad959175c2dfec70b5a61c6503a793 upstream. + +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: Takashi Sakamoto +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/firewire/amdtp.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/sound/firewire/amdtp.c ++++ b/sound/firewire/amdtp.c +@@ -78,7 +78,7 @@ static void pcm_period_tasklet(unsigned + int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit, + enum amdtp_stream_direction dir, enum cip_flags flags) + { +- s->unit = fw_unit_get(unit); ++ s->unit = unit; + s->direction = dir; + s->flags = flags; + s->context = ERR_PTR(-1); +@@ -102,7 +102,6 @@ void amdtp_stream_destroy(struct amdtp_s + { + WARN_ON(amdtp_stream_running(s)); + mutex_destroy(&s->mutex); +- fw_unit_put(s->unit); + } + EXPORT_SYMBOL(amdtp_stream_destroy); + diff --git a/queue-3.19/alsa-fireworks-bebob-dice-oxfw-add-reference-counting-for-firewire-unit.patch b/queue-3.19/alsa-fireworks-bebob-dice-oxfw-add-reference-counting-for-firewire-unit.patch new file mode 100644 index 00000000000..b0b5eef9f0e --- /dev/null +++ b/queue-3.19/alsa-fireworks-bebob-dice-oxfw-add-reference-counting-for-firewire-unit.patch @@ -0,0 +1,189 @@ +From 12ed719291a953d443921f9cdb0ffee41066c340 Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Sat, 21 Feb 2015 23:54:57 +0900 +Subject: ALSA: fireworks/bebob/dice/oxfw: add reference-counting for FireWire unit + +From: Takashi Sakamoto + +commit 12ed719291a953d443921f9cdb0ffee41066c340 upstream. + +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: Takashi Sakamoto +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/firewire/bebob/bebob.c | 12 +++++++++++- + sound/firewire/dice/dice.c | 11 ++++++++++- + sound/firewire/fireworks/fireworks.c | 12 +++++++++++- + sound/firewire/oxfw/oxfw.c | 11 ++++++++++- + 4 files changed, 42 insertions(+), 4 deletions(-) + +--- a/sound/firewire/bebob/bebob.c ++++ b/sound/firewire/bebob/bebob.c +@@ -116,11 +116,19 @@ end: + return err; + } + ++/* ++ * This module releases the FireWire unit data after all ALSA character devices ++ * are released by applications. This is for releasing stream data or finishing ++ * transactions safely. Thus at returning from .remove(), this module still keep ++ * references for the unit. ++ */ + static void + bebob_card_free(struct snd_card *card) + { + struct snd_bebob *bebob = card->private_data; + ++ fw_unit_put(bebob->unit); ++ + if (bebob->card_index >= 0) { + mutex_lock(&devices_mutex); + clear_bit(bebob->card_index, devices_used); +@@ -205,7 +213,7 @@ bebob_probe(struct fw_unit *unit, + card->private_free = bebob_card_free; + + bebob->card = card; +- bebob->unit = unit; ++ bebob->unit = fw_unit_get(unit); + bebob->spec = spec; + mutex_init(&bebob->mutex); + spin_lock_init(&bebob->lock); +@@ -310,6 +318,8 @@ static void bebob_remove(struct fw_unit + + snd_bebob_stream_destroy_duplex(bebob); + snd_card_disconnect(bebob->card); ++ ++ /* No need to wait for releasing card object in this context. */ + snd_card_free_when_closed(bebob->card); + } + +--- a/sound/firewire/dice/dice.c ++++ b/sound/firewire/dice/dice.c +@@ -226,11 +226,19 @@ static void dice_card_strings(struct snd + strcpy(card->mixername, "DICE"); + } + ++/* ++ * This module releases the FireWire unit data after all ALSA character devices ++ * are released by applications. This is for releasing stream data or finishing ++ * transactions safely. Thus at returning from .remove(), this module still keep ++ * references for the unit. ++ */ + static void dice_card_free(struct snd_card *card) + { + struct snd_dice *dice = card->private_data; + + snd_dice_transaction_destroy(dice); ++ fw_unit_put(dice->unit); ++ + mutex_destroy(&dice->mutex); + } + +@@ -251,7 +259,7 @@ static int dice_probe(struct fw_unit *un + + dice = card->private_data; + dice->card = card; +- dice->unit = unit; ++ dice->unit = fw_unit_get(unit); + card->private_free = dice_card_free; + + spin_lock_init(&dice->lock); +@@ -309,6 +317,7 @@ static void dice_remove(struct fw_unit * + + snd_dice_stream_destroy_duplex(dice); + ++ /* No need to wait for releasing card object in this context. */ + snd_card_free_when_closed(dice->card); + } + +--- a/sound/firewire/fireworks/fireworks.c ++++ b/sound/firewire/fireworks/fireworks.c +@@ -173,11 +173,19 @@ end: + return err; + } + ++/* ++ * This module releases the FireWire unit data after all ALSA character devices ++ * are released by applications. This is for releasing stream data or finishing ++ * transactions safely. Thus at returning from .remove(), this module still keep ++ * references for the unit. ++ */ + static void + efw_card_free(struct snd_card *card) + { + struct snd_efw *efw = card->private_data; + ++ fw_unit_put(efw->unit); ++ + if (efw->card_index >= 0) { + mutex_lock(&devices_mutex); + clear_bit(efw->card_index, devices_used); +@@ -218,7 +226,7 @@ efw_probe(struct fw_unit *unit, + card->private_free = efw_card_free; + + efw->card = card; +- efw->unit = unit; ++ efw->unit = fw_unit_get(unit); + mutex_init(&efw->mutex); + spin_lock_init(&efw->lock); + init_waitqueue_head(&efw->hwdep_wait); +@@ -293,6 +301,8 @@ static void efw_remove(struct fw_unit *u + snd_efw_transaction_remove_instance(efw); + + snd_card_disconnect(efw->card); ++ ++ /* No need to wait for releasing card object in this context. */ + snd_card_free_when_closed(efw->card); + } + +--- a/sound/firewire/oxfw/oxfw.c ++++ b/sound/firewire/oxfw/oxfw.c +@@ -104,11 +104,19 @@ end: + return err; + } + ++/* ++ * This module releases the FireWire unit data after all ALSA character devices ++ * are released by applications. This is for releasing stream data or finishing ++ * transactions safely. Thus at returning from .remove(), this module still keep ++ * references for the unit. ++ */ + static void oxfw_card_free(struct snd_card *card) + { + struct snd_oxfw *oxfw = card->private_data; + unsigned int i; + ++ fw_unit_put(oxfw->unit); ++ + for (i = 0; i < SND_OXFW_STREAM_FORMAT_ENTRIES; i++) { + kfree(oxfw->tx_stream_formats[i]); + kfree(oxfw->rx_stream_formats[i]); +@@ -136,7 +144,7 @@ static int oxfw_probe(struct fw_unit *un + oxfw = card->private_data; + oxfw->card = card; + mutex_init(&oxfw->mutex); +- oxfw->unit = unit; ++ oxfw->unit = fw_unit_get(unit); + oxfw->device_info = (const struct device_info *)id->driver_data; + spin_lock_init(&oxfw->lock); + init_waitqueue_head(&oxfw->hwdep_wait); +@@ -218,6 +226,7 @@ static void oxfw_remove(struct fw_unit * + if (oxfw->has_output) + snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); + ++ /* No need to wait for releasing card object in this context. */ + snd_card_free_when_closed(oxfw->card); + } + diff --git a/queue-3.19/alsa-fireworks-bebob-dice-oxfw-allow-stream-destructor-after-releasing-runtime.patch b/queue-3.19/alsa-fireworks-bebob-dice-oxfw-allow-stream-destructor-after-releasing-runtime.patch new file mode 100644 index 00000000000..e705cf8f6c7 --- /dev/null +++ b/queue-3.19/alsa-fireworks-bebob-dice-oxfw-allow-stream-destructor-after-releasing-runtime.patch @@ -0,0 +1,165 @@ +From d23c2cc4485d10f0cedfef99dd2961d9652b1b3f Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Sat, 21 Feb 2015 23:54:59 +0900 +Subject: ALSA: fireworks/bebob/dice/oxfw: allow stream destructor after releasing runtime + +From: Takashi Sakamoto + +commit d23c2cc4485d10f0cedfef99dd2961d9652b1b3f upstream. + +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: Takashi Sakamoto +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/firewire/bebob/bebob_stream.c | 12 ++++-------- + sound/firewire/dice/dice-stream.c | 18 ++++++++++++------ + sound/firewire/fireworks/fireworks_stream.c | 15 ++++++++++----- + sound/firewire/oxfw/oxfw-stream.c | 6 ++++-- + 4 files changed, 30 insertions(+), 21 deletions(-) + +--- a/sound/firewire/bebob/bebob_stream.c ++++ b/sound/firewire/bebob/bebob_stream.c +@@ -410,8 +410,6 @@ break_both_connections(struct snd_bebob + static void + destroy_both_connections(struct snd_bebob *bebob) + { +- break_both_connections(bebob); +- + cmp_connection_destroy(&bebob->in_conn); + cmp_connection_destroy(&bebob->out_conn); + } +@@ -712,16 +710,14 @@ void snd_bebob_stream_update_duplex(stru + mutex_unlock(&bebob->mutex); + } + ++/* ++ * This function should be called before starting streams or after stopping ++ * streams. ++ */ + void snd_bebob_stream_destroy_duplex(struct snd_bebob *bebob) + { + mutex_lock(&bebob->mutex); + +- amdtp_stream_pcm_abort(&bebob->rx_stream); +- amdtp_stream_pcm_abort(&bebob->tx_stream); +- +- amdtp_stream_stop(&bebob->rx_stream); +- amdtp_stream_stop(&bebob->tx_stream); +- + amdtp_stream_destroy(&bebob->rx_stream); + amdtp_stream_destroy(&bebob->tx_stream); + +--- a/sound/firewire/dice/dice-stream.c ++++ b/sound/firewire/dice/dice-stream.c +@@ -311,14 +311,21 @@ end: + return err; + } + ++/* ++ * This function should be called before starting streams or after stopping ++ * streams. ++ */ + static void destroy_stream(struct snd_dice *dice, struct amdtp_stream *stream) + { +- amdtp_stream_destroy(stream); ++ struct fw_iso_resources *resources; + + if (stream == &dice->tx_stream) +- fw_iso_resources_destroy(&dice->tx_resources); ++ resources = &dice->tx_resources; + else +- fw_iso_resources_destroy(&dice->rx_resources); ++ resources = &dice->rx_resources; ++ ++ amdtp_stream_destroy(stream); ++ fw_iso_resources_destroy(resources); + } + + int snd_dice_stream_init_duplex(struct snd_dice *dice) +@@ -332,6 +339,8 @@ int snd_dice_stream_init_duplex(struct s + goto end; + + err = init_stream(dice, &dice->rx_stream); ++ if (err < 0) ++ destroy_stream(dice, &dice->tx_stream); + end: + return err; + } +@@ -340,10 +349,7 @@ void snd_dice_stream_destroy_duplex(stru + { + snd_dice_transaction_clear_enable(dice); + +- stop_stream(dice, &dice->tx_stream); + destroy_stream(dice, &dice->tx_stream); +- +- stop_stream(dice, &dice->rx_stream); + destroy_stream(dice, &dice->rx_stream); + + dice->substreams_counter = 0; +--- a/sound/firewire/fireworks/fireworks_stream.c ++++ b/sound/firewire/fireworks/fireworks_stream.c +@@ -100,17 +100,22 @@ end: + return err; + } + ++/* ++ * This function should be called before starting the stream or after stopping ++ * the streams. ++ */ + static void + destroy_stream(struct snd_efw *efw, struct amdtp_stream *stream) + { +- stop_stream(efw, stream); +- +- amdtp_stream_destroy(stream); ++ struct cmp_connection *conn; + + if (stream == &efw->tx_stream) +- cmp_connection_destroy(&efw->out_conn); ++ conn = &efw->out_conn; + else +- cmp_connection_destroy(&efw->in_conn); ++ conn = &efw->in_conn; ++ ++ amdtp_stream_destroy(stream); ++ cmp_connection_destroy(&efw->out_conn); + } + + static int +--- a/sound/firewire/oxfw/oxfw-stream.c ++++ b/sound/firewire/oxfw/oxfw-stream.c +@@ -337,6 +337,10 @@ void snd_oxfw_stream_stop_simplex(struct + stop_stream(oxfw, stream); + } + ++/* ++ * This function should be called before starting the stream or after stopping ++ * the streams. ++ */ + void snd_oxfw_stream_destroy_simplex(struct snd_oxfw *oxfw, + struct amdtp_stream *stream) + { +@@ -347,8 +351,6 @@ void snd_oxfw_stream_destroy_simplex(str + else + conn = &oxfw->in_conn; + +- stop_stream(oxfw, stream); +- + amdtp_stream_destroy(stream); + cmp_connection_destroy(conn); + } diff --git a/queue-3.19/alsa-fireworks-bebob-dice-oxfw-make-it-possible-to-shutdown-safely.patch b/queue-3.19/alsa-fireworks-bebob-dice-oxfw-make-it-possible-to-shutdown-safely.patch new file mode 100644 index 00000000000..29375e25d30 --- /dev/null +++ b/queue-3.19/alsa-fireworks-bebob-dice-oxfw-make-it-possible-to-shutdown-safely.patch @@ -0,0 +1,171 @@ +From dec84316dd53c90e93b4ee849483bd4bd1e9a585 Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Sat, 21 Feb 2015 23:55:00 +0900 +Subject: ALSA: fireworks/bebob/dice/oxfw: make it possible to shutdown safely + +From: Takashi Sakamoto + +commit dec84316dd53c90e93b4ee849483bd4bd1e9a585 upstream. + +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: Takashi Sakamoto +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/firewire/bebob/bebob.c | 10 ++++++---- + sound/firewire/bebob/bebob_stream.c | 4 ---- + sound/firewire/dice/dice.c | 5 +---- + sound/firewire/fireworks/fireworks.c | 10 ++++------ + sound/firewire/fireworks/fireworks_stream.c | 4 ---- + sound/firewire/oxfw/oxfw.c | 10 ++++------ + 6 files changed, 15 insertions(+), 28 deletions(-) + +--- a/sound/firewire/bebob/bebob.c ++++ b/sound/firewire/bebob/bebob.c +@@ -127,8 +127,11 @@ bebob_card_free(struct snd_card *card) + { + struct snd_bebob *bebob = card->private_data; + ++ snd_bebob_stream_destroy_duplex(bebob); + fw_unit_put(bebob->unit); + ++ kfree(bebob->maudio_special_quirk); ++ + if (bebob->card_index >= 0) { + mutex_lock(&devices_mutex); + clear_bit(bebob->card_index, devices_used); +@@ -314,10 +317,9 @@ static void bebob_remove(struct fw_unit + if (bebob == NULL) + return; + +- kfree(bebob->maudio_special_quirk); +- +- snd_bebob_stream_destroy_duplex(bebob); +- snd_card_disconnect(bebob->card); ++ /* Awake bus-reset waiters. */ ++ if (!completion_done(&bebob->bus_reset)) ++ complete_all(&bebob->bus_reset); + + /* No need to wait for releasing card object in this context. */ + snd_card_free_when_closed(bebob->card); +--- a/sound/firewire/bebob/bebob_stream.c ++++ b/sound/firewire/bebob/bebob_stream.c +@@ -716,14 +716,10 @@ void snd_bebob_stream_update_duplex(stru + */ + void snd_bebob_stream_destroy_duplex(struct snd_bebob *bebob) + { +- mutex_lock(&bebob->mutex); +- + amdtp_stream_destroy(&bebob->rx_stream); + amdtp_stream_destroy(&bebob->tx_stream); + + destroy_both_connections(bebob); +- +- mutex_unlock(&bebob->mutex); + } + + /* +--- a/sound/firewire/dice/dice.c ++++ b/sound/firewire/dice/dice.c +@@ -236,6 +236,7 @@ static void dice_card_free(struct snd_ca + { + struct snd_dice *dice = card->private_data; + ++ snd_dice_stream_destroy_duplex(dice); + snd_dice_transaction_destroy(dice); + fw_unit_put(dice->unit); + +@@ -313,10 +314,6 @@ static void dice_remove(struct fw_unit * + { + struct snd_dice *dice = dev_get_drvdata(&unit->device); + +- snd_card_disconnect(dice->card); +- +- snd_dice_stream_destroy_duplex(dice); +- + /* No need to wait for releasing card object in this context. */ + snd_card_free_when_closed(dice->card); + } +--- a/sound/firewire/fireworks/fireworks.c ++++ b/sound/firewire/fireworks/fireworks.c +@@ -184,8 +184,12 @@ efw_card_free(struct snd_card *card) + { + struct snd_efw *efw = card->private_data; + ++ snd_efw_stream_destroy_duplex(efw); ++ snd_efw_transaction_remove_instance(efw); + fw_unit_put(efw->unit); + ++ kfree(efw->resp_buf); ++ + if (efw->card_index >= 0) { + mutex_lock(&devices_mutex); + clear_bit(efw->card_index, devices_used); +@@ -193,7 +197,6 @@ efw_card_free(struct snd_card *card) + } + + mutex_destroy(&efw->mutex); +- kfree(efw->resp_buf); + } + + static int +@@ -297,11 +300,6 @@ static void efw_remove(struct fw_unit *u + { + struct snd_efw *efw = dev_get_drvdata(&unit->device); + +- snd_efw_stream_destroy_duplex(efw); +- snd_efw_transaction_remove_instance(efw); +- +- snd_card_disconnect(efw->card); +- + /* No need to wait for releasing card object in this context. */ + snd_card_free_when_closed(efw->card); + } +--- a/sound/firewire/fireworks/fireworks_stream.c ++++ b/sound/firewire/fireworks/fireworks_stream.c +@@ -324,12 +324,8 @@ void snd_efw_stream_update_duplex(struct + + void snd_efw_stream_destroy_duplex(struct snd_efw *efw) + { +- mutex_lock(&efw->mutex); +- + destroy_stream(efw, &efw->rx_stream); + destroy_stream(efw, &efw->tx_stream); +- +- mutex_unlock(&efw->mutex); + } + + void snd_efw_stream_lock_changed(struct snd_efw *efw) +--- a/sound/firewire/oxfw/oxfw.c ++++ b/sound/firewire/oxfw/oxfw.c +@@ -115,6 +115,10 @@ static void oxfw_card_free(struct snd_ca + struct snd_oxfw *oxfw = card->private_data; + unsigned int i; + ++ snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream); ++ if (oxfw->has_output) ++ snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); ++ + fw_unit_put(oxfw->unit); + + for (i = 0; i < SND_OXFW_STREAM_FORMAT_ENTRIES; i++) { +@@ -220,12 +224,6 @@ static void oxfw_remove(struct fw_unit * + { + struct snd_oxfw *oxfw = dev_get_drvdata(&unit->device); + +- snd_card_disconnect(oxfw->card); +- +- snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream); +- if (oxfw->has_output) +- snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); +- + /* No need to wait for releasing card object in this context. */ + snd_card_free_when_closed(oxfw->card); + } diff --git a/queue-3.19/alsa-hda-add-pin-configs-for-asus-mobo-with-idt-92hd73xx-codec.patch b/queue-3.19/alsa-hda-add-pin-configs-for-asus-mobo-with-idt-92hd73xx-codec.patch new file mode 100644 index 00000000000..125eb0254f2 --- /dev/null +++ b/queue-3.19/alsa-hda-add-pin-configs-for-asus-mobo-with-idt-92hd73xx-codec.patch @@ -0,0 +1,67 @@ +From 6426460e5d87810e042962281fe3c1e8fc256162 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 19 Feb 2015 13:01:37 +0100 +Subject: ALSA: hda - Add pin configs for ASUS mobo with IDT 92HD73XX codec + +From: Takashi Iwai + +commit 6426460e5d87810e042962281fe3c1e8fc256162 upstream. + +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: Misan Thropos +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_sigmatel.c | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_sigmatel.c ++++ b/sound/pci/hda/patch_sigmatel.c +@@ -79,6 +79,7 @@ enum { + STAC_ALIENWARE_M17X, + STAC_92HD89XX_HP_FRONT_JACK, + STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK, ++ STAC_92HD73XX_ASUS_MOBO, + STAC_92HD73XX_MODELS + }; + +@@ -1911,7 +1912,18 @@ static const struct hda_fixup stac92hd73 + [STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK] = { + .type = HDA_FIXUP_PINS, + .v.pins = stac92hd89xx_hp_z1_g2_right_mic_jack_pin_configs, +- } ++ }, ++ [STAC_92HD73XX_ASUS_MOBO] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = (const struct hda_pintbl[]) { ++ /* enable 5.1 and SPDIF out */ ++ { 0x0c, 0x01014411 }, ++ { 0x0d, 0x01014410 }, ++ { 0x0e, 0x01014412 }, ++ { 0x22, 0x014b1180 }, ++ { } ++ } ++ }, + }; + + static const struct hda_model_fixup stac92hd73xx_models[] = { +@@ -1923,6 +1935,7 @@ static const struct hda_model_fixup stac + { .id = STAC_DELL_M6_BOTH, .name = "dell-m6" }, + { .id = STAC_DELL_EQ, .name = "dell-eq" }, + { .id = STAC_ALIENWARE_M17X, .name = "alienware" }, ++ { .id = STAC_92HD73XX_ASUS_MOBO, .name = "asus-mobo" }, + {} + }; + +@@ -1975,6 +1988,8 @@ static const struct snd_pci_quirk stac92 + "HP Z1 G2", STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK), + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17, + "unknown HP", STAC_92HD89XX_HP_FRONT_JACK), ++ SND_PCI_QUIRK(PCI_VENDOR_ID_ASUSTEK, 0x83f8, "ASUS AT4NM10", ++ STAC_92HD73XX_ASUS_MOBO), + {} /* terminator */ + }; + diff --git a/queue-3.19/alsa-hda-controller-code-do-not-export-static-functions.patch b/queue-3.19/alsa-hda-controller-code-do-not-export-static-functions.patch new file mode 100644 index 00000000000..61c2bd1ed9c --- /dev/null +++ b/queue-3.19/alsa-hda-controller-code-do-not-export-static-functions.patch @@ -0,0 +1,64 @@ +From 37ed398839fa3e0d2de77925097db7a370abb096 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Tue, 24 Feb 2015 12:04:57 +0100 +Subject: ALSA: hda: controller code - do not export static functions + +From: Jaroslav Kysela + +commit 37ed398839fa3e0d2de77925097db7a370abb096 upstream. + +It is a bad idea to export static functions. GCC for some platforms +shows errors like: + + error: __ksymtab_azx_get_response causes a section type conflict + +Signed-off-by: Jaroslav Kysela +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_controller.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- a/sound/pci/hda/hda_controller.c ++++ b/sound/pci/hda/hda_controller.c +@@ -957,7 +957,6 @@ static int azx_alloc_cmd_io(struct azx * + dev_err(chip->card->dev, "cannot allocate CORB/RIRB\n"); + return err; + } +-EXPORT_SYMBOL_GPL(azx_alloc_cmd_io); + + static void azx_init_cmd_io(struct azx *chip) + { +@@ -1022,7 +1021,6 @@ static void azx_init_cmd_io(struct azx * + azx_writeb(chip, RIRBCTL, AZX_RBCTL_DMA_EN | AZX_RBCTL_IRQ_EN); + spin_unlock_irq(&chip->reg_lock); + } +-EXPORT_SYMBOL_GPL(azx_init_cmd_io); + + static void azx_free_cmd_io(struct azx *chip) + { +@@ -1032,7 +1030,6 @@ static void azx_free_cmd_io(struct azx * + azx_writeb(chip, CORBCTL, 0); + spin_unlock_irq(&chip->reg_lock); + } +-EXPORT_SYMBOL_GPL(azx_free_cmd_io); + + static unsigned int azx_command_addr(u32 cmd) + { +@@ -1312,7 +1309,6 @@ static int azx_send_cmd(struct hda_bus * + else + return azx_corb_send_cmd(bus, val); + } +-EXPORT_SYMBOL_GPL(azx_send_cmd); + + /* get a response */ + static unsigned int azx_get_response(struct hda_bus *bus, +@@ -1326,7 +1322,6 @@ static unsigned int azx_get_response(str + else + return azx_rirb_get_response(bus, addr); + } +-EXPORT_SYMBOL_GPL(azx_get_response); + + #ifdef CONFIG_SND_HDA_DSP_LOADER + /* diff --git a/queue-3.19/alsa-hda-disable-runtime-pm-for-panther-point-again.patch b/queue-3.19/alsa-hda-disable-runtime-pm-for-panther-point-again.patch new file mode 100644 index 00000000000..31927694346 --- /dev/null +++ b/queue-3.19/alsa-hda-disable-runtime-pm-for-panther-point-again.patch @@ -0,0 +1,33 @@ +From de5d0ad506cb10ab143e2ffb9def7607e3671f83 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 25 Feb 2015 07:53:31 +0100 +Subject: ALSA: hda - Disable runtime PM for Panther Point again + +From: Takashi Iwai + +commit de5d0ad506cb10ab143e2ffb9def7607e3671f83 upstream. + +This is essentially a partial revert of the commit [b1920c21102a: +'ALSA: hda - Enable runtime PM on Panther Point']. There was a bug +report showing the HD-audio bus hang during runtime PM on HP Spectre +XT. + +Reported-by: Dang Sananikone +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_intel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -2004,7 +2004,7 @@ static const struct pci_device_id azx_id + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, + /* Panther Point */ + { PCI_DEVICE(0x8086, 0x1e20), +- .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, ++ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, + /* Lynx Point */ + { PCI_DEVICE(0x8086, 0x8c20), + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, diff --git a/queue-3.19/alsa-hda-one-more-dell-macine-needs-dell1_mic_no_presence-quirk.patch b/queue-3.19/alsa-hda-one-more-dell-macine-needs-dell1_mic_no_presence-quirk.patch new file mode 100644 index 00000000000..63473b5bce3 --- /dev/null +++ b/queue-3.19/alsa-hda-one-more-dell-macine-needs-dell1_mic_no_presence-quirk.patch @@ -0,0 +1,34 @@ +From 70658b99490dd86cfdbf4fca117bbe2ef9a80d03 Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Fri, 6 Mar 2015 14:03:57 +0800 +Subject: ALSA: hda - One more Dell macine needs DELL1_MIC_NO_PRESENCE quirk + +From: Hui Wang + +commit 70658b99490dd86cfdbf4fca117bbe2ef9a80d03 upstream. + +BugLink: https://bugs.launchpad.net/bugs/1428947 +Signed-off-by: Hui Wang +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -5114,6 +5114,13 @@ static const struct snd_hda_pin_quirk al + {0x17, 0x40000000}, + {0x1d, 0x40700001}, + {0x21, 0x02211040}), ++ SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, ++ ALC255_STANDARD_PINS, ++ {0x12, 0x90a60170}, ++ {0x14, 0x90170140}, ++ {0x17, 0x40000000}, ++ {0x1d, 0x40700001}, ++ {0x21, 0x02211050}), + SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, + {0x12, 0x90a60130}, + {0x13, 0x40000000}, diff --git a/queue-3.19/alsa-oxfw-fix-a-condition-and-return-code-in-start_stream.patch b/queue-3.19/alsa-oxfw-fix-a-condition-and-return-code-in-start_stream.patch new file mode 100644 index 00000000000..4c45f05a5d8 --- /dev/null +++ b/queue-3.19/alsa-oxfw-fix-a-condition-and-return-code-in-start_stream.patch @@ -0,0 +1,39 @@ +From f2b14c0bc510c6a8f67a4f36049deefe5d99a537 Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Fri, 27 Feb 2015 09:39:32 +0900 +Subject: ALSA: oxfw: fix a condition and return code in start_stream() + +From: Takashi Sakamoto + +commit f2b14c0bc510c6a8f67a4f36049deefe5d99a537 upstream. + +The amdtp_stream_wait_callback() doesn't return minus value and +the return code is not for error code. + +This commit fixes with a propper condition and an error code. + +Fixes: f3699e2c7745 ('ALSA: oxfw: Change the way to start stream') +Reported-by: Dan Carpenter +Signed-off-by: Takashi Sakamoto +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/firewire/oxfw/oxfw-stream.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/sound/firewire/oxfw/oxfw-stream.c ++++ b/sound/firewire/oxfw/oxfw-stream.c +@@ -171,9 +171,10 @@ static int start_stream(struct snd_oxfw + } + + /* Wait first packet */ +- err = amdtp_stream_wait_callback(stream, CALLBACK_TIMEOUT); +- if (err < 0) ++ if (!amdtp_stream_wait_callback(stream, CALLBACK_TIMEOUT)) { + stop_stream(oxfw, stream); ++ err = -ETIMEDOUT; ++ } + end: + return err; + } diff --git a/queue-3.19/alsa-pcm-don-t-leave-prepared-state-after-draining.patch b/queue-3.19/alsa-pcm-don-t-leave-prepared-state-after-draining.patch new file mode 100644 index 00000000000..633dd32a2d0 --- /dev/null +++ b/queue-3.19/alsa-pcm-don-t-leave-prepared-state-after-draining.patch @@ -0,0 +1,32 @@ +From 70372a7566b5e552dbe48abdac08c275081d8558 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 18 Dec 2014 10:02:41 +0100 +Subject: ALSA: pcm: Don't leave PREPARED state after draining + +From: Takashi Iwai + +commit 70372a7566b5e552dbe48abdac08c275081d8558 upstream. + +When a PCM draining is performed to an empty stream that has been +already in PREPARED state, the current code just ignores and leaves as +it is, although the drain is supposed to set all such streams to SETUP +state. This patch covers that overlooked case. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/core/pcm_native.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/core/pcm_native.c ++++ b/sound/core/pcm_native.c +@@ -1546,6 +1546,8 @@ static int snd_pcm_do_drain_init(struct + if (! snd_pcm_playback_empty(substream)) { + snd_pcm_do_start(substream, SNDRV_PCM_STATE_DRAINING); + snd_pcm_post_start(substream, SNDRV_PCM_STATE_DRAINING); ++ } else { ++ runtime->status->state = SNDRV_PCM_STATE_SETUP; + } + break; + case SNDRV_PCM_STATE_RUNNING: diff --git a/queue-3.19/series b/queue-3.19/series index 4e843a6b90e..be795529eca 100644 --- a/queue-3.19/series +++ b/queue-3.19/series @@ -103,3 +103,13 @@ sunrpc-always-manipulate-rpc_rqst-rq_bc_pa_list-under-xprt-bc_pa_lock.patch arc-fix-kstk_esp.patch tty-fix-up-atime-mtime-mess-take-four.patch serial-8250-revert-tty-serial-8250_core-read-only-rx-if-there-is-something-in-the-fifo.patch +alsa-pcm-don-t-leave-prepared-state-after-draining.patch +alsa-hda-add-pin-configs-for-asus-mobo-with-idt-92hd73xx-codec.patch +alsa-fireworks-bebob-dice-oxfw-add-reference-counting-for-firewire-unit.patch +alsa-firewire-lib-remove-reference-counting.patch +alsa-fireworks-bebob-dice-oxfw-allow-stream-destructor-after-releasing-runtime.patch +alsa-fireworks-bebob-dice-oxfw-make-it-possible-to-shutdown-safely.patch +alsa-hda-controller-code-do-not-export-static-functions.patch +alsa-hda-disable-runtime-pm-for-panther-point-again.patch +alsa-oxfw-fix-a-condition-and-return-code-in-start_stream.patch +alsa-hda-one-more-dell-macine-needs-dell1_mic_no_presence-quirk.patch