Skip to content
Snippets Groups Projects
  1. Nov 09, 2023
    • Uwe Kleine-König's avatar
      OSS: dmasound/paula: Convert to platform remove callback returning void · bce36aa6
      Uwe Kleine-König authored
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new(), which already returns void. Eventually after all drivers
      are converted, .remove_new() will be renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Link: https://lore.kernel.org/r/20231107151223.3971602-2-u.kleine-koenig@pengutronix.de
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      bce36aa6
    • Vitalii Torshyn's avatar
      ALSA: hda: ASUS UM5302LA: Added quirks for cs35L41/10431A83 on i2c bus · 6ae90e90
      Vitalii Torshyn authored
      
      Proposed patch fixes initialization of CSC3551 on the UM5302LA laptop.
      Patching DSDT table is not required since ASUS did added _DSD entry.
      Nothing new introduced but reused work started by Stefan B.
      
      Currently there is no official firmware available for 10431A83 on
      cirrus git unfortunately.
      For testing used 104317f3 (which is also seems on i2c bus):
      
      $ cd /lib/firmware/cirrus/ && \
      for fw in $(find ./ -name '*104317f3*'); do newfw=$(echo $fw | sed 's/104317f3/10431a83/g'); echo echo "$fw -> $newfw"; ln -s $f $newfw; done
      
      With the patch applied to 6.6.0 and obviously symlinks to 104317F3 FW,
      speakers works and to my susrprise they sound quite good and loud
      without distortion.
      
      Probably confirmation from cirrus team is needed on firmware.
      
      Signed-off-by: default avatarVitalii Torshyn <vitaly.torshyn@gmail.com>
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=218119
      Link: https://lore.kernel.org/r/CAHiQ-bCMPpCJ8eOYAaVVoqGkFixS1qTgSS4xfbZvL4oZV9LYew@mail.gmail.com
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6ae90e90
    • Takashi Iwai's avatar
      ALSA: info: Fix potential deadlock at disconnection · c7a60651
      Takashi Iwai authored
      
      As reported recently, ALSA core info helper may cause a deadlock at
      the forced device disconnection during the procfs operation.
      
      The proc_remove() (that is called from the snd_card_disconnect()
      helper) has a synchronization of the pending procfs accesses via
      wait_for_completion().  Meanwhile, ALSA procfs helper takes the global
      mutex_lock(&info_mutex) at both the proc_open callback and
      snd_card_info_disconnect() helper.  Since the proc_open can't finish
      due to the mutex lock, wait_for_completion() never returns, either,
      hence it deadlocks.
      
      	TASK#1				TASK#2
      	proc_reg_open()
      	  takes use_pde()
      	snd_info_text_entry_open()
      					snd_card_disconnect()
      					snd_info_card_disconnect()
      					  takes mutex_lock(&info_mutex)
      					proc_remove()
      					wait_for_completion(unused_pde)
      					  ... waiting task#1 closes
      	mutex_lock(&info_mutex)
      		=> DEADLOCK
      
      This patch is a workaround for avoiding the deadlock scenario above.
      
      The basic strategy is to move proc_remove() call outside the mutex
      lock.  proc_remove() can work gracefully without extra locking, and it
      can delete the tree recursively alone.  So, we call proc_remove() at
      snd_info_card_disconnection() at first, then delete the rest resources
      recursively within the info_mutex lock.
      
      After the change, the function snd_info_disconnect() doesn't do
      disconnection by itself any longer, but it merely clears the procfs
      pointer.  So rename the function to snd_info_clear_entries() for
      avoiding confusion.
      
      The similar change is applied to snd_info_free_entry(), too.  Since
      the proc_remove() is called only conditionally with the non-NULL
      entry->p, it's skipped after the snd_info_clear_entries() call.
      
      Reported-by: default avatarShinhyung Kang <s47.kang@samsung.com>
      Closes: https://lore.kernel.org/r/664457955.21699345385931.JavaMail.epsvc@epcpadp4
      
      
      Reviewed-by: default avatarJaroslav Kysela <perex@perex.cz>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20231109141954.4283-1-tiwai@suse.de
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c7a60651
  2. Nov 08, 2023
  3. Nov 07, 2023
  4. Nov 06, 2023
  5. Nov 03, 2023
  6. Nov 01, 2023
  7. Oct 31, 2023
  8. Oct 30, 2023
  9. Oct 29, 2023
  10. Oct 27, 2023
  11. Oct 26, 2023
Loading