UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    USB-C headphones on OnePlus 6T

    Scheduled Pinned Locked Moved Solved Support
    oneplusaudiousb-cheadphones
    8 Posts 4 Posters 1.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • A Offline
        ancientsounds
        last edited by

        Re: Focal problems - Headphones and time

        When I plug USB-C headphones into my OnePlus 6T, they aren't detected by the Music app or the media player. BUT ... I managed to get them working using aplay on the command line. So just wanted to record that here.

        First, without headphones plugged in,

        aplay -l

        lists a bunch of ALSA audio devices (all on the same card), ending in card 0, device 43

        Plug in headphones and repeat aplay -l, reveals that the headphones are detected as card 1: Audio [USB Audio]

        aplay -L
        

        gives more info about this device and the various ways it can be driven (hw, plughw, usbstream etc), especially the key piece of information:

        plughw:Card=Audio,DEV=0

        So now,

        aplay -D plughw:CARD=Audio,DEV=0 <audio-filename> 
        

        does the job, and I have music coming through the headphones, yay!

        Too loud though, and the volume controls don't work yet on the headphones nor on the phone.

        MrT10001M 1 Reply Last reply Reply Quote 0
        • A Offline
          ancientsounds @ancientsounds
          last edited by

          Further progress, using Pulse Audio, especially pacmd

          To switch audio output to the USB headphones:

          pacmd load-module module-alsa-sink device=plughw:1,0

          Most importantly, to switch back to the speakers when you're finished with headphones:

          pacmd set-default-sink 1

          A FuseteamF 3 Replies Last reply Reply Quote 0
          • MrT10001M Offline
            MrT10001 @ancientsounds
            last edited by

            @ancientsounds Have you tried Alsamixer in terminal?

            Xiaomi Redmi Note 7.... And more...
            I have too many devices...

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              ancientsounds @MrT10001
              last edited by ancientsounds

              @MrT10001 Working up to that; I have another problem to overcome first, with Libertine. But many thanks for the suggestion!

              ... Later ... (having failed to fix the Libertine problem)

              YES!

              amixer -c 1 sset PCM 70%

              makes the volume much more comfortable.
              Time for me to learn some more about amixer B-)

              A 1 Reply Last reply Reply Quote 0
              • A Offline
                ancientsounds @ancientsounds
                last edited by

                Further progress, using Pulse Audio, especially pacmd

                To switch audio output to the USB headphones:

                pacmd load-module module-alsa-sink device=plughw:1,0

                Most importantly, to switch back to the speakers when you're finished with headphones:

                pacmd set-default-sink 1

                A FuseteamF 3 Replies Last reply Reply Quote 0
                • A ancientsounds has marked this topic as solved on
                • A Offline
                  ancientsounds @ancientsounds
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    ancientsounds @ancientsounds
                    last edited by ancientsounds

                    @ancientsounds

                    Another experiment with USB audio

                    Trying to work out how to automatically switch to USB-C when I plug in the headphones (rather than switching manually as previously discussed, by typing on the command line).

                    pacmd load-module module-udev-detect

                    works, partly: that is, it will detect the headphones when plugged in, and shows “Usb speakers” when turning the volume up or down. BUT playing music using the Music app doesn't work, i.e. no sound comes out. So manual switching is still necessary when using the Music app.

                    1 Reply Last reply Reply Quote 0
                    • FuseteamF Offline
                      Fuseteam @ancientsounds
                      last edited by

                      @ancientsounds said in USB-C headphones on OnePlus 6T:

                      Further progress, using Pulse Audio, especially pacmd

                      To switch audio output to the USB headphones:

                      pacmd load-module module-alsa-sink device=plughw:1,0

                      Most importantly, to switch back to the speakers when you're finished with headphones:

                      pacmd set-default-sink 1

                      this seems to work on the fp4 too

                      A 1 Reply Last reply Reply Quote 1
                      • A Offline
                        AmauryDBZ @Fuseteam
                        last edited by

                        @Fuseteam tested on my FP4.

                        1. The switch beetween headphones and speaker is automatic, music playing works well but when I have a call it switches back to phone speaker.
                        2. I have to re-enter this commandline after reboot : pacmd load-module module-udev-detect
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post