1. 15 1月, 2014 23 次提交
  2. 14 1月, 2014 4 次提交
    • M
      [media] tea575x: Fix build with ARCH=c6x · eab924d0
      Mauro Carvalho Chehab 提交于
      In file included from /devel/v4l/temp/include/asm-generic/page.h:23:0,
                       from /devel/v4l/temp/arch/c6x/include/asm/page.h:9,
                       from /devel/v4l/temp/include/asm-generic/io.h:14,
                       from arch/c6x/include/generated/asm/io.h:1,
                       from /devel/v4l/temp/drivers/media/radio/tea575x.c:23:
      /devel/v4l/temp/arch/c6x/include/asm/setup.h:17:27: error: unknown type name ‘phys_addr_t’
       extern int c6x_add_memory(phys_addr_t start, unsigned long size);
      
      It seems that, on such arch, the includes from asm/ should be
      after the ones from linux/.
      
      The proper fix would be to patch the arch files, but, as
      this fix is trivial, apply it. Also, we generally put the
      asm includes after the linux ones, anyway.
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      eab924d0
    • M
      [media] dib8000: Fix a few warnings when compiled for avr32 · e4a3bc1c
      Mauro Carvalho Chehab 提交于
      	drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_get_time_us':
      	drivers/media/dvb-frontends/dib8000.c:3957: warning: 'interleaving' may be used uninitialized in this function
      	drivers/media/dvb-frontends/dib8000.c:3956: warning: 'rate_denum' may be used uninitialized in this function
      
      Those are actually false positives, but it doesn't hurt cleaning them.
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      e4a3bc1c
    • M
      [media] dib8000: Properly represent long long integers · 5dc8526b
      Mauro Carvalho Chehab 提交于
      When compiling with avr32, it gets those errors:
      
      	drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_get_stats':
      	drivers/media/dvb-frontends/dib8000.c:4121: warning: integer constant is too large for 'long' type
      
      Fix integer representation to avoid overflow.
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      5dc8526b
    • M
      [media] radio-usb-si4713: make si4713_register_i2c_adapter static · 6fcd3b61
      Mauro Carvalho Chehab 提交于
      This function isn't used nowhere outside the same .c file.
      Fixes this warning:
      
      drivers/media/radio/si4713/radio-usb-si4713.c:418:5: warning: no previous prototype for 'si4713_register_i2c_adapter' [-Wmissing-prototypes]
       int si4713_register_i2c_adapter(struct si4713_usb_device *radio)
           ^
      
      Cc: Hans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      6fcd3b61
  3. 13 1月, 2014 8 次提交
  4. 12 1月, 2014 5 次提交
    • M
      [media] em28xx-audio: return -ENODEV when the device is disconnected · 8b1fa579
      Mauro Carvalho Chehab 提交于
      If em28xx is disconnected, return -ENODEV to all PCM callbacks.
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      8b1fa579
    • M
      [media] em28xx-audio: split URB initialization code · 966f4163
      Mauro Carvalho Chehab 提交于
      The URB calculus code may eventually be moved to some other
      place, like at pcm open, if it ends by needing more setups, like
      working with different bit rates, or different audio latency.
      
      So, move it into a separate routine. That also makes the code
      more readable.
      
      No functional changes.
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      966f4163
    • M
      [media] em28xx-audio: don't wait for lock in non-block mode · 34906633
      Mauro Carvalho Chehab 提交于
      Pulseaudio has the bad habit of stopping a streaming audio if
      a device, opened in non-block mode, waits.
      
      It is impossible to avoid em28xx to wait, as it will send commands
      via I2C, and other I2C operations may be happening (firmware
      transfers, Remote Controller polling, etc). Yet, as each em28xx
      subdriver locks em28xx-dev to protect the access to the hardware,
      it is possible to minimize the audio glitches by returning -EAGAIN
      to pulseaudio, if the lock is already taken by another subdriver.
      Reported-by: NAntti Palosaari <crope@iki.fi>
      Tested-by: NAntti Palosaari <crope@iki.fi>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      34906633
    • M
      [media] em28xx-audio: fix the period size in bytes · 49677aef
      Mauro Carvalho Chehab 提交于
      If the period size is wrong, userspace will assume a wrong delay
      any may negociate an inadequate value.
      
      The em28xx devices use 8 for URB interval, in microframes,
      and the driver programs it to have 64 packets.
      
      That means that the IRQ sampling period is 125 * 8 * 64,
      with is equal to 64 ms.
      
      So, that's the minimal latency with the current settings. It is
      possible to program a lower latency, by using less than 64 packets,
      but that increases the amount of bandwitdh used, and the number of
      IRQ events per second.
      
      In any case, in order to support it, the driver logic should be
      changed to fill those parameters in realtime.
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      49677aef
    • M
      [media] em28xx-audio: don't hardcode audio URB calculus · 1b3fd2d3
      Mauro Carvalho Chehab 提交于
      The current code hardcodes the number of audio URBs, the number
      of packets per URB and the maximum URB size.
      
      This is not a good idea, as it:
      
      - wastes more bandwidth than necessary, by using a very
        large number of packets;
      
      - those constants are bound to an specific scenario, with
        a bandwidth of 48 kHz;
      
      - don't take the maximum endpoint size into account;
      
      - with urb->interval = 1 on xHCI, those constraints cause a "funny"
        setup: URBs with 64 packets inside, with only 24 bytes total. E. g.
        a complete waste of space.
      
      Change the code to do dynamic URB audio calculus and allocation.
      
      For now, use the same constraints as used before this patch, to
      avoid regressions.
      
      A good scenario (tested) seems to use those defines, instead:
      
      	#define EM28XX_MAX_AUDIO_BUFS          8
      	#define EM28XX_MIN_AUDIO_PACKETS       2
      
      But let's not do such change here, letting the optimization to
      happen on latter patches, after more tests.
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      1b3fd2d3