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

Sony Xperia X (suzu/F5121 & F5122)

Scheduled Pinned Locked Moved Sony Xperia X (F5121 & F5122)
324 Posts 63 Posters 235.3k Views 15 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.
    • F Offline
      flohack @c4pp4
      last edited by 31 May 2020, 14:26

      @c4pp4 Wonderful, aber you able to integrate this permanently into the system image with a PR on Github? Your solution is too complex to apply and also will be overwritten by an update πŸ™‚

      My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

      1 Reply Last reply Reply Quote 0
      • F Offline
        fredldotme
        last edited by 1 Jun 2020, 08:31

        Yeah, those changes presented as a PR would be highly appreciated! I'm currently occupied with a lot of other things, so I probably can't do it myself in the short term. The files you're modifying are probably in the suzu and loire repos on GitHub linked in the top post.

        1 Reply Last reply Reply Quote 0
        • F Offline
          fredldotme
          last edited by 1 Jun 2020, 10:50

          Thanks again to @c4pp4 for preparing those changes as a pull request, the changes will land within the next two days. πŸ™‚

          C 1 Reply Last reply 1 Jun 2020, 11:54 Reply Quote 0
          • C Offline
            c4pp4 @fredldotme
            last edited by 1 Jun 2020, 11:54

            @fredldotme
            No problem πŸ™‚

            I'm trying to achieve 44.1 kHz as the default rate or find out why is resampler too slow. I'm not sure if it's pulseaudio server, droid module or qcom driver related or something else.

            1 Reply Last reply Reply Quote 0
            • C Offline
              c4pp4
              last edited by c4pp4 6 Jan 2020, 18:25 1 Jun 2020, 18:02

              @fredldotme
              I think I find out why it's always using 48 kHz. It's related to qcom/audio/hal. According to this commit https://github.com/fredldotme/device-sony-common/commit/b3235f337a371d7746fe591e3adcaca99c90dc4f we are using qcom/audio/default/hal/audio_hw.c where adev_open_output_stream function is always assigning 48 kHz rate regardless of what we configure in audio_policy.conf/touch.pa:

              3065       out->sample_rate = out->config.rate
              

              newer version contains:

              5295       if (config->sample_rate == 0) {
              5296                   out->sample_rate = out->config.rate;
              5297               } else {
              5298                   out->sample_rate = config->sample_rate;
              5299       }
              

              Is there a chance to test patched version?

              F 1 Reply Last reply 1 Jun 2020, 20:42 Reply Quote 0
              • G Offline
                Giampy
                last edited by 1 Jun 2020, 18:54

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • F Offline
                  fredldotme @c4pp4
                  last edited by 1 Jun 2020, 20:42

                  @c4pp4 you could build your own Halium image and test it that way. The build instructions are here: https://github.com/Halium/projectmanagement/issues/98

                  Just build the systemimage, run simg2img, e2fsck and resize2fs on it and put it in /system/var/lib/lxc/android/system.img.

                  C 2 Replies Last reply 1 Jun 2020, 21:57 Reply Quote 0
                  • C Offline
                    c4pp4 @fredldotme
                    last edited by 1 Jun 2020, 21:57

                    @fredldotme
                    Thank you!

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      c4pp4 @fredldotme
                      last edited by c4pp4 6 Apr 2020, 00:13 4 Jun 2020, 00:04

                      @fredldotme
                      I've patched it and successfully built and tested.

                      patch:

                      diff -Nur a/hardware/qcom/audio/hal/audio_hw.c b/hardware/qcom/audio/hal/audio_hw.c
                      --- a/hardware/qcom/audio/hal/audio_hw.c	2020-06-03 09:11:31.406960000 +0200
                      +++ b/hardware/qcom/audio/hal/audio_hw.c	2020-06-03 23:34:16.000000000 +0200
                      @@ -3033,6 +3033,8 @@
                                       out->format = audio_format_from_pcm_format(out->config.format);
                                   }
                               }
                      +        if (config->sample_rate != 0)
                      +            out->config.rate = config->sample_rate;
                               out->sample_rate = out->config.rate;
                           }
                           ALOGV("%s: Usecase(%s) config->format %#x  out->config.format %#x\n",
                      

                      adb shell pacmd list-sinks:

                      2 sink(s) available.
                        * index: 0
                      	name: <sink.primary>
                      	driver: <module-droid-card.c>
                      	flags: HARDWARE DECIBEL_VOLUME LATENCY 
                      	state: SUSPENDED
                      	suspend cause: IDLE 
                      	priority: 9000
                      	volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                      	        balance 0,00
                      	base volume: 65536 / 100% / 0,00 dB
                      	volume steps: 65537
                      	muted: no
                      	current latency: 0,00 ms
                      	max request: 0 KiB
                      	max rewind: 0 KiB
                      	monitor source: 0
                      	sample spec: s16le 2ch 44100Hz
                      	channel map: front-left,front-right
                      	             Stereo
                      	used by: 0
                      	linked by: 1
                      	fixed latency: 10,00 ms
                      	card: 0 <droid_card.primary>
                      	module: 4
                      	properties:
                      		device.description = "Droid sink primary"
                      		device.class = "sound"
                      		device.api = "droid-hal"
                      		droid.flags = "AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST"
                      		droid.hw_module = "primary"
                      		device.icon_name = "audio-card"
                      		droid.output.primary = "true"
                      		droid.output.low_latency = "true"
                      		droid.output.media_latency = "true"
                      	ports:
                      		output-earpiece: Output to earpiece (priority 200, latency offset 0 usec, available: yes)
                      			properties:
                      				
                      		output-speaker: Output to speaker (priority 300, latency offset 0 usec, available: yes)
                      			properties:
                      				
                      		output-wired_headset: Output to wired headset (priority 100, latency offset 0 usec, available: no)
                      			properties:
                      				
                      		output-wired_headphone: Output to wired headphone (priority 100, latency offset 0 usec, available: no)
                      			properties:
                      				
                      		output-bluetooth_sco: Output to bluetooth sco (priority 100, latency offset 0 usec, available: yes)
                      			properties:
                      				
                      		output-sco_headset: Output to sco headset (priority 100, latency offset 0 usec, available: yes)
                      			properties:
                      				
                      		output-sco_carkit: Output to sco carkit (priority 100, latency offset 0 usec, available: yes)
                      			properties:
                      				
                      		output-aux_digital: Output to aux digital (priority 100, latency offset 0 usec, available: yes)
                      			properties:
                      				
                      		output-speaker+wired_headphone: Output to speaker+wired headphone (priority 100, latency offset 0 usec, available: no)
                      			properties:
                      				
                      		output-parking: Parking port (priority 50, latency offset 0 usec, available: yes)
                      			properties:
                      				
                      	active port: <output-speaker>
                      
                      F 1 Reply Last reply 4 Jun 2020, 18:02 Reply Quote 0
                      • F Offline
                        fredldotme @c4pp4
                        last edited by fredldotme 6 Apr 2020, 18:03 4 Jun 2020, 18:02

                        @c4pp4 looks sane at first glance. It would be interesting to know how it behaves with different sample settings provided through the touch.pa file. Does it now allow forcing the sample rate that way? In that case even better, but it looks like it should work on all Sony devices.

                        Would you like to prepare a PR for it, so it has your name in the commit history? πŸ™‚

                        C 1 Reply Last reply 6 Jun 2020, 07:56 Reply Quote 0
                        • C Offline
                          c4pp4 @fredldotme
                          last edited by c4pp4 6 Jun 2020, 20:29 6 Jun 2020, 07:56

                          @fredldotme
                          It should work on all devices using 'hardware/qcom/audio'. Now it takes default settings from pulseaudio (44.100 kHz) if it's not specified through /etc/pulse/daemon.conf. You can override it changing 'default-sample-rate' parameter. You can change the sampling rate through /etc/pulse/touch.pa as well using 'rate', 'sink_rate' or source_rate' parameter when loading module-droid-card-24.

                          F 1 Reply Last reply 6 Jun 2020, 18:41 Reply Quote 0
                          • F Offline
                            fredldotme @c4pp4
                            last edited by 6 Jun 2020, 18:41

                            @c4pp4 awesome stuff! Should give us more flexibility should the default not provide a sufficient audio experience. Will you prepare a PR for it? I'm currently off my normal setup, only carrying a backup of Halium 7.1 on a microSD card.

                            1 Reply Last reply Reply Quote 0
                            • K Offline
                              kalle.kruse
                              last edited by 7 Jun 2020, 19:39

                              Thanks again for the great port, @fredldotme! I have been using the Xperia X as my daily driver for months already and I am pretty happy with it. I have been observing a number of issues, and before creating bug reports I would like to make sure they are not specific to this port and that there are no easy fixes:

                              • Under "Updates" I see an "Ubuntu touch Version 320" update but when clicking on "Restart & install" nothing happens.
                              • Sometimes when the screen has been locked and turned off for a long time the device takes ages (>10sec?) to wake up.
                              • On openstreetmap.org I cannot scroll the map in Morph Browser. I am pretty sure this had been working before on the bq Aquarius E4.5.

                              And a question: Is there any hope to get autofocus to work for the camera?

                              1 Reply Last reply Reply Quote 0
                              • D Offline
                                dan.socea
                                last edited by 11 Jun 2020, 07:39

                                Hello!
                                Are there any plans on moving to ubuntu 20.04, or this is not possible due to Xperia X's hardware?

                                F 1 Reply Last reply 11 Jun 2020, 12:36 Reply Quote 0
                                • F Offline
                                  flohack @dan.socea
                                  last edited by 11 Jun 2020, 12:36

                                  @dan-socea We will move to 20.04 and the Xperia X should not have an issue for that, as its just about kernel version to be high enough for systemd to run.

                                  My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                                  D 1 Reply Last reply 11 Jun 2020, 12:48 Reply Quote 1
                                  • D Offline
                                    dan.socea @flohack
                                    last edited by 11 Jun 2020, 12:48

                                    @Flohack That is great to hear, that there is still some life left into this device.

                                    1 Reply Last reply Reply Quote 0
                                    • C Offline
                                      c4pp4
                                      last edited by 15 Jun 2020, 00:52

                                      I got a problem when playing music after the screen is turned off. When on BATTERY, the music is interrupted. After couple of seconds it's playing again and it's again interrupted. When the screen is turned on (still locked) the music is playing without problem. When on BATTERY and Wi-Fi is turned off, it's playing without problem. When on USB it's playing without problem regardless of Wi-Fi state. It's not only about music player. When I receive a message it vibrates but it plays sound after the screen is activated. Incoming call is without problem. Clean reinstalling via UBports installer didn't solve it. Can someone confirm it? Maybe it's caused by some of recent updates.

                                      W 1 Reply Last reply 15 Jun 2020, 08:48 Reply Quote 0
                                      • E Offline
                                        eichenbast
                                        last edited by 15 Jun 2020, 08:22

                                        I can confirm "When on BATTERY, the music is interrupted. After couple of seconds it's playing again and it's again interrupted. When the screen is turned on (still locked) the music is playing without problem. When on BATTERY and Wi-Fi is turned off, it's playing without problem." and "When I receive a message it vibrates but it plays sound after the screen is activated. Incoming call is without problem."

                                        I have not tested more. And: no problem with the Apps: "Flas" and "Clound Music" .

                                        1 Reply Last reply Reply Quote 0
                                        • W Offline
                                          wdehoog @c4pp4
                                          last edited by 15 Jun 2020, 08:48

                                          @c4pp4 @eichenbast how are you playing the music?

                                          This is probably caused by the media-hub not keeping/aquiring a 'wakelock'.
                                          Flas probably works since it plays a stream (which is 1 track) for which the lock is acquired. (I don't know what Cloud Music is.)

                                          When charging or with screen on the phone does not go in sleep mode so the music plays fine. Some app or service preventing to go to sleep (for example by having a lock) also keeps the music playing fine.

                                          C 1 Reply Last reply 15 Jun 2020, 12:48 Reply Quote 0
                                          • C Offline
                                            c4pp4 @wdehoog
                                            last edited by 15 Jun 2020, 12:48

                                            @wdehoog said in Sony Xperia X (suzu/F5121 & F5122):

                                            how are you playing the music?

                                            I'm using preinstalled UBports Music app.

                                            W 1 Reply Last reply 15 Jun 2020, 12:57 Reply Quote 0
                                            195 out of 324
                                            • First post
                                              195/324
                                              Last post