1. 21 11月, 2015 1 次提交
    • A
      ASoC: samsung: pass filter function as pointer · 9bdca822
      Arnd Bergmann 提交于
      As we are now passing the filter data as pointers to the drivers,
      we can take the final step and also pass the filter function the
      same way. I'm keeping this change separate, as there it's less
      obvious that this is a net win.
      
      Upsides of this are:
      
      - The ASoC drivers are completely independent from the DMA engine
        implementation, which simplifies the Kconfig logic and in theory
        allows the same sound drivers to be built in a kernel that supports
        different kinds of dmaengine drivers.
      
      - Consistency with other subsystems and drivers
      
      On the other hand, we have a few downsides:
      
      - The s3c24xx-dma driver now needs to be built-in for the ac97 platform
        device to be instantiated on s3c2440.
      
      - samsung_dmaengine_pcm_config cannot be marked 'const' any more
        because the filter function pointer needs to be set at runtime.
        This is safe as long we don't have multiple different DMA engines
        in thet same system at runtime, but is nonetheless ugly.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      9bdca822
  2. 19 11月, 2015 2 次提交
    • A
      ASoC: s3c24xx-i2s: pass DMA channels as platform data · 359fdfa6
      Arnd Bergmann 提交于
      This is a minor cleanup to make the s3c2412-i2s and s3c24xx-i2s
      drivers independent of the mach/dma.h header file and to allow
      removing the dependency on the specific dmaengine driver in the
      next patch.
      
      As a side not, only the s3c24xx-i2s driver seems to still be
      used, while the definition of the s3c2412-i2s platform device was
      removed in commit 6d259a25 ("ARM: SAMSUNG: use static
      declaration when it is not used in other files") after it had
      never been referenced since its introduction in f0fba2ad
      ("ASoC: multi-component - ASoC Multi-Component Support").
      
      Apparently it should have been used by mach-jive.c, but that
      never happened. My patch at this point leaves the current state
      unchanged, we can decide whether to fix or delete the jive
      driver and s3c2412-i2s another time.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      359fdfa6
    • A
      ASoC: samsung: pass DMA channels as pointers · b9a1a743
      Arnd Bergmann 提交于
      ARM64 allmodconfig produces a bunch of warnings when building the
      samsung ASoC code:
      
      sound/soc/samsung/dmaengine.c: In function 'samsung_asoc_init_dma_data':
      sound/soc/samsung/dmaengine.c:53:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
         playback_data->filter_data = (void *)playback->channel;
      sound/soc/samsung/dmaengine.c:60:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
         capture_data->filter_data = (void *)capture->channel;
      
      We could easily shut up the warning by adding an intermediate cast,
      but there is a bigger underlying problem: The use of IORESOURCE_DMA
      to pass data from platform code to device drivers is dubious to start
      with, as what we really want is a pointer that can be passed into
      a filter function.
      
      Note that on s3c64xx, the pl08x DMA data is already a pointer, but
      gets cast to resource_size_t so we can pass it as a resource, and it
      then gets converted back to a pointer. In contrast, the data we pass
      for s3c24xx is an index into a device specific table, and we artificially
      convert that into a pointer for the filter function.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      b9a1a743
  3. 14 11月, 2015 4 次提交
  4. 12 11月, 2015 13 次提交
  5. 11 11月, 2015 20 次提交