1. 22 Jul, 2024 2 commits
  2. 19 Jul, 2024 2 commits
    • Arnd Bergmann's avatar
      ALSA: hda: tas2781: mark const variables as __maybe_unused · a2d6d8ae
      Arnd Bergmann authored
      An earlier patch changed the DECLARE_TLV_DB_SCALE declaration, but
      now there are additional static const variables that cause
      the same build warnings:
      
      In file included from sound/pci/hda/tas2781_hda_i2c.c:23:
      include/sound/tas2781-tlv.h:23:28: error: 'tas2563_dvc_table' defined but not used [-Werror=unused-const-variable=]
         23 | static const unsigned char tas2563_dvc_table[][4] = {
            |                            ^~~~~~~~~~~~~~~~~
      In file included from include/sound/tlv.h:10,
                       from sound/pci/hda/tas2781_hda_i2c.c:22:
      include/sound/tas2781-tlv.h:20:35: error: 'tas2563_dvc_tlv' defined but not used [-Werror=unused-const-variable=]
         20 | static const DECLARE_TLV_DB_SCALE(tas2563_dvc_tlv, -12150, 50, 1);
            |                                   ^~~~~~~~~~~~~~~
      
      Mark them all as unused as well.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://patch.msgid.link/20240719095640.3741247-1-arnd@kernel.orgSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a2d6d8ae
    • wangdicheng's avatar
      ALSA: usb-audio: Fix microphone sound on HD webcam. · 74dba240
      wangdicheng authored
      I own an external usb Webcam, HD webcam, which had low mic volume and
      inconsistent sound quality. Video works as expected.
      
      (snip)
      [   95.473820][ 1] [   T73] usb 5-2.2: new high-speed USB device number 7 using xhci_hcd
      [   95.773974][ 1] [   T73] usb 5-2.2: New USB device found, idVendor=1bcf, idProduct=2281, bcdDevice= 0.05
      [   95.783445][ 1] [   T73] usb 5-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
      [   95.791872][ 1] [   T73] usb 5-2.2: Product: HD webcam
      [   95.797001][ 1] [   T73] usb 5-2.2: Manufacturer: Sunplus IT Co
      [   95.802996][ 1] [   T73] usb 5-2.2: SerialNumber: 20200513
      [   96.092610][ 2] [ T3680] usb 5-2.2: Warning! Unlikely big volume range (=4096), cval->res is probably wrong.
      [   96.102436][ 2] [ T3680] usb 5-2.2: [5] FU [Mic Capture Volume] ch = 1, val = 0/4096/1
      
      Set up quirk cval->res to 16 for 256 levels,
      Set GET_SAMPLE_RATE quirk flag to stop trying to get the sample rate.
      Confirmed that happened anyway later due to the backoff mechanism,
      After 3 failures.
      
      All audio stream on device interfaces share the same values,
      apart from wMaxPacketSize and tSamFreq :
      
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        3
            bAlternateSetting       4
            bNumEndpoints           1
            bInterfaceClass         1 Audio
      
      Interface Descriptor:
        bLength                 9
        bDescriptorType         4
        bInterfaceNumber        3
        bAlternateSetting       4
        bNumEndpoints           1
        bInterfaceClass         1 Audio
        bInterfaceSubClass      2 Streaming
        bInterfaceProtocol      0
        iInterface              0
        AudioStreaming Interface Descriptor:
          bLength                 7
          bDescriptorType        36
          bDescriptorSubtype      1 (AS_GENERAL)
          bTerminalLink           3
          bDelay                  1 frames
          wFormatTag         0x0001 PCM
        AudioStreaming Interface Descriptor:
          bLength                11
          bDescriptorType        36
          bDescriptorSubtype      2 (FORMAT_TYPE)
          bFormatType             1 (FORMAT_TYPE_I)
          bNrChannels             1
          bSubframeSize           2
          bBitResolution         16
          bSamFreqType            1 Discrete
          tSamFreq[ 0]        48000
        Endpoint Descriptor:
          bLength                 9
          bDescriptorType         5
          bEndpointAddress     0x86  EP 6 IN
          bmAttributes            5
            Transfer Type            Isochronous
            Synch Type               Asynchronous
            Usage Type               Data
          wMaxPacketSize     0x0064  1x 100 bytes
          bInterval               4
          bRefresh                0
          bSynchAddress           0
          AudioStreaming Endpoint Descriptor:
            bLength                 7
            bDescriptorType        37
            bDescriptorSubtype      1 (EP_GENERAL)
            bmAttributes         0x01
              Sampling Frequency
            bLockDelayUnits         0 Undefined
            wLockDelay         0x0000
      (snip)
      
      Testing patch provides consistent good sound recording quality and volume range.
      
      (snip)
      [   95.473820][ 1] [   T73] usb 5-2.2: new high-speed USB device number 7 using xhci_hcd
      [   95.773974][ 1] [   T73] usb 5-2.2: New USB device found, idVendor=1bcf, idProduct=2281, bcdDevice= 0.05
      [   95.783445][ 1] [   T73] usb 5-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
      [   95.791872][ 1] [   T73] usb 5-2.2: Product: HD webcam
      [   95.797001][ 1] [   T73] usb 5-2.2: Manufacturer: Sunplus IT Co
      [   95.802996][ 1] [   T73] usb 5-2.2: SerialNumber: 20200513
      [   96.110630][ 3] [ T3680] usbcore: registered new interface driver snd-usb-audio
      [   96.114329][ 7] [ T3677] usb 5-2.2: Found UVC 1.00 device HD webcam (1bcf:2281)
      [   96.167555][ 7] [ T3677] usbcore: registered new interface driver uvcvideo
      Signed-off-by: default avatarwangdicheng <wangdicheng@kylinos.cn>
      Cc: <stable@vger.kernel.org>
      Link: https://patch.msgid.link/20240719020906.8078-1-wangdich9700@163.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      74dba240
  3. 18 Jul, 2024 3 commits
  4. 17 Jul, 2024 3 commits
  5. 15 Jul, 2024 4 commits
  6. 14 Jul, 2024 1 commit
  7. 12 Jul, 2024 5 commits
  8. 11 Jul, 2024 2 commits
  9. 10 Jul, 2024 11 commits
  10. 09 Jul, 2024 6 commits
  11. 08 Jul, 2024 1 commit
    • Mark Brown's avatar
      ASoC: fsl-asoc-card: add S/PDIF controller support · 54e49a3c
      Mark Brown authored
      Merge series from Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>:
      
      This is a series of patches aiming to make the machine driver
      `fsl-asoc-card` compatible with S/PDIF controllers on imx boards.  The
      main goal is to allow the use of S/PDIF controllers with ASRC modules.
      
      The `imx-spdif` machine driver already has specific support for S/PDIF
      controllers but doesn't support using an ASRC with it. However, the
      `fsl-asoc-card` machine driver has the necessary code to create a sound
      card which can use an ASRC module.
      It is then possible to extend the support for S/PDIF audio cards by
      merging the `imx-spdif` driver into `fsl-asoc-card`.
      
      The first three patches adapt the `fsl-asoc-card` driver to support
      multiple codec use cases.
      The driver can get 2 codec phandles from the device tree, and
      codec-related variables are doubled.
      `for_each_codecs` macros are also used when possible to ease adding
      other multi-codec use cases in the future.
      It makes possible to use the two S/PDIF dummy codec drivers
      `spdif_receiver` and `spdif_transmitter` instead of `snd-soc-dummy`,
      which was used in `imx-spdif`.
      
      The fourth patch merges the S/PDIF support from `imx-spdif` to
      `fsl-asoc-card`.
      `fsl-asoc-card` offers the same functionalities as `imx-spdif` did, but
      this merge also extends the S/PDIF support with the possibility of using
      an ASRC.
      Compatible "fsl,imx-audio-spdif" is kept, but `fsl-asoc-card` uses
      different DT properties compared to `imx-spdif`:
      * The "spdif-controller" property from `imx-spdif` is named "audio-cpu"
        in `fsl-asoc-card`.
      * `fsl-asoc-card` uses codecs explicitly declared in DT with
        "audio-codec". With an S/PDIF, codec drivers `spdif_transmitter` and
        `spdif_receiver` should be used. Driver `imx-spdif` used instead the
        dummy codec and a pair of boolean properties, "spdif-in" and
        "spdif-out".
      Backward compatibility is therefore implemented in `fsl-asoc-card`.
      However, it is recommended to use the new properties when needed.
      Especially, declaring and using S/PDIF transmitter and/or receiver nodes
      is better than using the dummy codec.
      
      The last three patches update the device tree bindings of
      `fsl-asoc-card` and update all in-tree device trees to use the
      `fsl-asoc-card` properties.
      Note that as the old properties are still supported:
      * previous versions of in-tree device trees are still supported.
      * out-of-tree device trees are still supported.
      
      This series of patches was successfully built for arm64 and x86 on top
      of the latest "for-next" branch of the ASoC git tree on the 26th of June
      2024.
      These modifications have also been tested on an i.MX8MN evaluation board
      with a linux kernel RT v6.1.26-rt8.
      54e49a3c