[PATCH v6 0/7] ASoC: sun4i-i2s: Updates to the driver

2019-10-16 Thread codekipper
ed to this which I will deliver after support for the H6 has gone in. These other patches are required for HDMI audio which is driving this patchset and they can be found here https://github.com/codekipper/linux-sunxi/commits/upstream-i2s BR, CK --- v6 changes compared to v5 are: - rebased onto the

[PATCH v6 4/7] ASoC: sun4i-i2s: Add functions for RX and TX channel selects

2019-10-16 Thread codekipper
From: Marcus Cooper Newer SoCs like the H6 have the channel select bits in a different positions than what is on the H3. As we will eventually add multi- channel support then create function calls as opposed to regmap fields to add support for different devices. Signed-off-by: Marcus Cooper ---

[PATCH v6 3/7] ASoC: sun4i-i2s: Add functions for RX and TX channel enables

2019-10-16 Thread codekipper
From: Marcus Cooper Newer SoCs like the H6 have the channel enable bits in a different position to what is on the H3. As we will eventually add multi- channel support then create function calls as opposed to regmap fields to add support for different devices. Signed-off-by: Marcus Cooper --- s

[PATCH v6 5/7] ASoC: sun4i-i2s: Add functions for RX and TX channel mapping

2019-10-16 Thread codekipper
From: Marcus Cooper As we will eventually add multi-channel audio support to the i2s then create function calls as opposed to regmap fields to add support for different devices. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 45 + 1 file chan

[PATCH v6 7/7] ASoC: sun4i-i2s: Add support for H6 I2S

2019-10-16 Thread codekipper
From: Jernej Skrabec H6 I2S is very similar to that in H3, except it supports up to 16 channels. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 143 1 file changed, 143 insertions(+) diff --git a/sound/soc/sun

[PATCH v6 1/7] ASoC: sun4i-i2s: Move channel select offset

2019-10-16 Thread codekipper
From: Marcus Cooper On the newer SoCs the offset is used to set the mode of the connection. As it is to be used elsewhere then it makes sense to move it to the main structure. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 22 +++--- 1 file changed, 11 insertion

[PATCH v6 2/7] ASoC: sun4i-i2s: Add functions for RX and TX channel offsets

2019-10-16 Thread codekipper
From: Marcus Cooper Newer SoCs like the H6 have the channel offset bits in a different position to what is on the H3. As we will eventually add multi- channel support then create function calls as opposed to regmap fields to add support for different devices. Signed-off-by: Marcus Cooper --- s

[PATCH v6 6/7] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible

2019-10-16 Thread codekipper
From: Jernej Skrabec H6 I2S is very similar to H3, except that it supports up to 16 channels and thus few registers have fields on different position. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper --- .../devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml | 2 ++ 1 file

[PATCH v6 3/3] ASoC: sun4i-i2s: Adjust LRCLK width

2019-08-26 Thread codekipper
From: Marcus Cooper Some codecs such as i2s based HDMI audio and the Pine64 DAC require a different amount of bit clocks per frame than what is calculated by the sample width. Use the values obtained by the tdm slot bindings to adjust the LRCLK width accordingly. Signed-off-by: Marcus Cooper --

[PATCH v6 2/3] ASoC: sun4i-i2s: Add regmap field to sign extend sample

2019-08-26 Thread codekipper
From: Marcus Cooper On the newer SoCs such as the H3 and A64 this is set by default to transfer a 0 after each sample in each slot. However the A10 and A20 SoCs that this driver was developed on had a default setting where it padded the audio gain with zeros. This isn't a problem whilst we have

[PATCH v6 1/3] ASoC: sun4i-i2s: incorrect regmap for A83T

2019-08-26 Thread codekipper
From: Marcus Cooper The regmap configuration is set up for the legacy block on the A83T whereas it uses the new block with a larger register map. Fixes: 21faaea1343f ("ASoC: sun4i-i2s: Add support for A83T") Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 2 +- 1 file changed, 1

[PATCH v6 0/3] ASoC: sun4i-i2s: Updates to the driver

2019-08-26 Thread codekipper
audio delivered. H6 and multi-channel HDMI will follow shortly. My test branch for this can be found at https://github.com/codekipper/linux-sunxi/commits/upstream-i2s , I've been using a Pine64 to test with; validating the new SoC block with HDMI audio and ensuring that I've not broken the old

[PATCH] ASoC: sun4i-i2s: incorrect regmap for A83t

2019-08-21 Thread codekipper
From: Marcus Cooper Fixes: 21faaea1343f ("ASoC: sun4i-i2s: Add support for A83T") Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index cbc6e59aa089..056a29

[PATCH v5 02/15] ASoC: sun4i-i2s: Add set_tdm_slot functionality

2019-08-13 Thread codekipper
From: Marcus Cooper Codecs without a control connection such as i2s based HDMI audio and the Pine64 DAC require a different amount of bit clocks per frame than what is calculated by the sample width. Use the tdm slot bindings to provide this mechanism. Signed-off-by: Marcus Cooper --- sound/so

[PATCH v5 05/15] ASoC: sun4i-i2s: Add functions for RX and TX channel offsets

2019-08-13 Thread codekipper
From: Marcus Cooper Newer SoCs like the H6 have the channel offset bits in a different position to what is on the H3. As we will eventually add multi- channel support then create function calls as opposed to regmap fields to add support for different devices. Signed-off-by: Marcus Cooper --- s

[PATCH v5 04/15] ASoC: sun4i-i2s: Support more formats on newer SoCs

2019-08-13 Thread codekipper
From: Marcus Cooper There is a need to support more formats on the newer SoCs(H3 and later). Extend the formats supported to include DSP_A and DSP_B modes. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 87 +++-- 1 file changed, 63 insertions(+),

[PATCH v5 07/15] ASoC: sun4i-i2s: Add functions for RX and TX channel selects

2019-08-13 Thread codekipper
From: Marcus Cooper Newer SoCs like the H6 have the channel select bits in a different positions than what is on the H3. As we will eventually add multi- channel support then create function calls as opposed to regmap fields to add support for different devices. Signed-off-by: Marcus Cooper ---

[PATCH v5 09/15] clk: sunxi-ng: h6: Allow I2S to change parent rate

2019-08-13 Thread codekipper
From: Jernej Skrabec I2S doesn't work if parent rate couldn't be change. Difference between wanted and actual rate is too big. Fix this by adding CLK_SET_RATE_PARENT flag to I2S clocks. Signed-off-by: Jernej Skrabec --- drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 8 1 file changed, 4 inse

[PATCH v5 10/15] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible

2019-08-13 Thread codekipper
From: Jernej Skrabec H6 I2S is very similar to H3, except that it supports up to 16 channels and thus few registers have fields on different position. Signed-off-by: Jernej Skrabec --- .../devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH v5 01/15] ASoC: sun4i-i2s: Add regmap field to sign extend sample

2019-08-13 Thread codekipper
From: Marcus Cooper On the newer SoCs such as the H3 and A64 this is set by default to transfer a 0 after each sample in each slot. However the A10 and A20 SoCs that this driver was developed on had a default setting where it padded the audio gain with zeros. This isn't a problem whilst we have

[PATCH v5 00/15] ASoC: sun4i-i2s: Updates to the driver

2019-08-13 Thread codekipper
ng the tdm property to override the old way to calculate the frame width. What I've seen in what has already been mainlined is that the i2s driver has a frame width that is fixed to 32 bits and this can be overridden using the tdm property. My test branch for this can be found at https://github

[PATCH v5 13/15] ASoC: sun4i-i2s: Add multichannel functionality

2019-08-13 Thread codekipper
From: Marcus Cooper The i2s block can be used to pass PCM data over multiple channels and is sometimes used for the audio side of an HDMI connection. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 93 + 1 file changed, 63 insertions(+), 30 de

[PATCH v5 15/15] ASoC: sun4i-i2s: Adjust regmap settings

2019-08-13 Thread codekipper
From: Marcus Cooper Bypass the regmap cache when flushing the i2s FIFOs and modify the tables to reflect this. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 31 ++- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/sound/soc/sunxi/sun4

[PATCH v5 12/15] ASoC: sun4i-i2s: Add multi-lane functionality

2019-08-13 Thread codekipper
From: Marcus Cooper The i2s block supports multi-lane i2s output however this functionality is only possible in earlier SoCs where the pins are exposed and for the i2s block used for HDMI audio on the later SoCs. To enable this functionality, an optional property has been added to the bindings.

[PATCH v5 14/15] ASoc: sun4i-i2s: Add 20, 24 and 32 bit support

2019-08-13 Thread codekipper
From: Marcus Cooper Extend the functionality of the driver to include support of 20 and 24 bits per sample for the earlier SoCs. Newer SoCs can also handle 32bit samples. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 21 +++-- 1 file changed, 19 insertions(+),

[PATCH v5 03/15] ASoC: sun4i-i2s: Correct divider calculations

2019-08-13 Thread codekipper
From: Marcus Cooper The clock division circuitry is different on the H3 and later SoCs. The division of bclk is now based on pll2. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 73 + 1 file changed, 49 insertions(+), 24 deletions(-) diff --

[PATCH v5 08/15] ASoC: sun4i-i2s: Add functions for channel mapping

2019-08-13 Thread codekipper
From: Marcus Cooper As we will eventually add multi-channel audio support to the i2s then create function calls as opposed to regmap fields to add support for different devices. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 71 + 1 file chan

[PATCH v5 11/15] ASoC: sun4i-i2s: Add support for H6 I2S

2019-08-13 Thread codekipper
From: Jernej Skrabec H6 I2S is very similar to that in H3, except it supports up to 16 channels. Signed-off-by: Jernej Skrabec --- sound/soc/sunxi/sun4i-i2s.c | 148 1 file changed, 148 insertions(+) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sun

[PATCH v5 06/15] ASoC: sun4i-i2s: Add functions for RX and TX channel enables

2019-08-13 Thread codekipper
From: Marcus Cooper Newer SoCs like the H6 have the channel enable bits in a different position to what is on the H3. As we will eventually add multi- channel support then create function calls as opposed to regmap fields to add support for different devices. Signed-off-by: Marcus Cooper --- s

[PATCH v4 2/9] ASoC: sun4i-i2s: Add offset to RX channel select

2019-06-03 Thread codekipper
From: Marcus Cooper Whilst testing the capture functionality of the i2s on the newer SoCs it was noticed that the recording was somewhat distorted. This was due to the offset not being set correctly on the receiver side. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 4 1

[PATCH v4 8/9] ASoc: sun4i-i2s: Add 20, 24 and 32 bit support

2019-06-03 Thread codekipper
From: Marcus Cooper Extend the functionality of the driver to include support of 20 and 24 bits per sample for the earlier SoCs. Newer SoCs can also handle 32bit samples. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 34 +++--- 1 file changed, 31 i

[PATCH v4 6/9] ASoC: sun4i-i2s: Add multi-lane functionality

2019-06-03 Thread codekipper
From: Marcus Cooper The i2s block supports multi-lane i2s output however this functionality is only possible in earlier SoCs where the pins are exposed and for the i2s block used for HDMI audio on the later SoCs. To enable this functionality, an optional property has been added to the bindings.

[PATCH v4 9/9] ASoC: sun4i-i2s: Adjust regmap settings

2019-06-03 Thread codekipper
From: Marcus Cooper Bypass the regmap cache when flushing the i2s FIFOs and modify the tables to reflect this. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i

[PATCH v4 3/9] ASoC: sun4i-i2s: Add regmap field to sign extend sample

2019-06-03 Thread codekipper
From: Marcus Cooper On the newer SoCs this is set by default to transfer a 0 after each sample in each slot. However the platform that this driver was developed on had the default setting where it padded the audio gain with zeros. This isn't a problem whilst we have only support for 16bit audio b

[PATCH v4 5/9] ASoC: sun4i-i2s: Add set_tdm_slot functionality

2019-06-03 Thread codekipper
From: Marcus Cooper Some codecs require a different amount of a bit clocks per frame than what is calculated by the sample width. Use the tdm slot bindings to provide this mechanism. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 22 -- 1 file changed, 20 in

[PATCH v4 7/9] ASoC: sun4i-i2s: Add multichannel functionality

2019-06-03 Thread codekipper
From: Marcus Cooper The i2s block can be used to pass PCM data over multiple channels and is sometimes used for the audio side of an HDMI connection. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 121 +++- 1 file changed, 64 insertions(+), 57 de

[PATCH v4 1/9] ASoC: sun4i-i2s: Fix sun8i tx channel offset mask

2019-06-03 Thread codekipper
From: Marcus Cooper Although not causing any noticeable issues, the mask for the channel offset is covering too many bits. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/su

[PATCH v4 4/9] ASoC: sun4i-i2s: Reduce quirks for sun8i-h3

2019-06-03 Thread codekipper
From: Marcus Cooper We have a number of flags used to identify the functionality of the IP block found on the sun8i-h3 and later devices. As it is only neccessary to identify this new block then replace these flags with just one. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 2

[PATCH v4 0/9]ASoC: sun4i-i2s: Updates to the driver

2019-06-03 Thread codekipper
From: Marcus Cooper Hi All, here is a patch series to add some improvements to the sun4i-i2s driver found whilst getting slave clocking and hdmi audio working on the newer SoCs. As the LibreELEC project is progressing extremely well then there has been some activity getting surround sound workin

[PATCH v3 8/9] ASoC: sun4i-i2s: Add set_tdm_slot functionality

2018-12-21 Thread codekipper
From: Marcus Cooper Some codecs require a different amount of a bit clocks per frame than what is calculated by the sample width. Use the tdm slot bindings to provide this mechanism. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 22 -- 1 file changed, 20 in

[PATCH v3 2/9] ASoC: sun4i-i2s: Add regmap field to sign extend sample

2018-12-21 Thread codekipper
From: Marcus Cooper On the newer SoCs this is set by default to transfer a 0 after each sample in each slot. Add the regmap field to configure this and set it so that it pads the sample with 0s. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 15 +++ 1 file changed,

[PATCH v3 6/9] ASoC: sun4i-i2s: Add multi-lane functionality

2018-12-21 Thread codekipper
From: Marcus Cooper The i2s block supports multi-lane i2s output however this functionality is only possible in earlier SoCs where the pins are exposed and for the i2s block used for HDMI audio on the later SoCs. To enable this functionality, an optional property has been added to the bindings.

[PATCH v3 3/9] ASoc: sun4i-i2s: Add 20, 24 and 32 bit support

2018-12-21 Thread codekipper
From: Marcus Cooper Extend the functionality of the driver to include support of 20 and 24 bits per sample for the earlier SoCs. Newer SoCs can also handle 32bit samples. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 41 ++--- 1 file changed, 3

[PATCH v3 7/9] ASoC: sun4i-i2s: Do not divide clocks when slave

2018-12-21 Thread codekipper
From: Marcus Cooper There is no need to set the clock and calculate the division of the audio pll for the bclk and sync signals when they are not required. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 144 +++- 1 file changed, 77 insertions(+),

[PATCH v3 1/9] ASoC: sun4i-i2s: Adjust regmap settings

2018-12-21 Thread codekipper
From: Marcus Cooper Bypass the regmap cache when flushing the i2s FIFOs and modify the tables to reflect this. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i

[PATCH v3 0/9] ASoC: sun4i-i2s: Updates to the driver

2018-12-21 Thread codekipper
From: Marcus Cooper Hi All, here is a patch series to add some improvements to the sun4i-i2s driver found whilst getting slave clocking and hdmi audio working on the newer SoCs. Since the last push there has been some activity getting surround sound working and this is included. The functionali

[PATCH v3 9/9] ASoC: sun4i-i2s: Add multichannel functionality

2018-12-21 Thread codekipper
From: Marcus Cooper The i2s block can be used to pass PCM data over multiple channels and is sometimes used for the audio side of an HDMI connection. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 121 +++- 1 file changed, 64 insertions(+), 57 de

[PATCH v3 5/9] ASoC: sun4i-i2s: Correct divider calculations

2018-12-21 Thread codekipper
From: Marcus Cooper The clock division circuitry is different on the H3 and later SoCs. The division of bclk is now based on pll2. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 82 + 1 file changed, 56 insertions(+), 26 deletions(-) diff --

[PATCH v3 4/9] ASoC: sun4i-i2s: Fix offset mask

2018-12-21 Thread codekipper
From: Marcus Cooper Also add offset to RX channel select Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index adb988ae9ac5..93a484d7e228 100644 --- a

[PATCH v2 2/6] ASoC: sun4i-i2s: Add regmap field to sign extend sample

2018-03-12 Thread codekipper
From: Marcus Cooper On the newer SoCs (H3, H5, A64 etc) this is set by default to transfer a 0 after each sample in each slot whereas on the earlier SoCs (A20, A31 etc) the default sign extension is to pad the LSB. Add the regmap field to configure this and set it so that it pads the sample with

[PATCH v2 0/6] ASoC: sun4i-i2s: Updates to the driver

2018-03-12 Thread codekipper
to set the slot width and now use a dedicated property. This has been tested on a Pine64 using the ES9023 audio POT board (https://github.com/codekipper/linux-sunxi/commits/upstream) and HDMI audio (https://github.com/codekipper/linux-sunxi/commits/sunxi-wip-a64) BR, CK --- v2 changes compared

[PATCH v2 5/6] ASoc: sun4i-i2s: Add 20, 24 and 32 bit support

2018-03-12 Thread codekipper
From: Marcus Cooper Extend the functionality of the driver to include support of 20 and 24 bits per sample for the earlier SoCs. Newer SoCs can also handle 32bit samples. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 34 +++--- 1 file changed, 31 i

[PATCH v2 4/6] ASoC: sun4i-i2s: Add multi-lane functionality

2018-03-12 Thread codekipper
From: Marcus Cooper The i2s block supports multi-lane i2s output however this functionality is only possible in earlier SoCs where the pins are exposed and for the i2s block used for HDMI audio on the later SoCs. To enable this functionality, an optional property has been added to the bindings.

[PATCH v2 1/6] ASoC: sun4i-i2s: Add slot width override

2018-03-12 Thread codekipper
From: Marcus Cooper Some codecs require a different amount of a bit clocks per frame than what is calculated by using the sample width. Use a slot width override property to provide this mechanism. Signed-off-by: Marcus Cooper --- Documentation/devicetree/bindings/sound/sun4i-i2s.txt | 5

[PATCH v2 6/6] ASoC: sun4i-i2s: Add support for loopback

2018-03-12 Thread codekipper
From: Marcus Cooper The DAI has a loopback register which can be set and therefore routes the transmit fifo to receive fifo. This is useful for testing the block without the need for any external hardware. Signed-off-by: Marcus Cooper --- Documentation/devicetree/bindings/sound/sun4i-i2s.txt |

[PATCH v2 3/6] ASoC: sun4i-i2s: Correct divider calculations

2018-03-12 Thread codekipper
From: Marcus Cooper The clock division circuitry is different on the H3 and later SoCs. The division of bclk is now based on pll2. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 76 +++-- 1 file changed, 52 insertions(+), 24 deletions(-)

[PATCH 2/3] ASoC: sun4i-i2s: Do not divide clocks when slave

2018-01-24 Thread codekipper
From: Marcus Cooper There is no need to set the clock and calculate the division of the audio pll for the bclk and sync signals when they are not required. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 116 1 file changed, 64 insert

[PATCH 0/3] ASoC: sun4i-i2s: Updates to the driver

2018-01-24 Thread codekipper
From: Marcus Cooper Hi All, here is a patch series to add some improvements to the sun4i-i2s driver found whilst getting slave clocking and hdmi audio working on the newer SoCs. This has been tested on a Pine64 using the ES9023 audio POT board (https://github.com/codekipper/linux-sunxi/commits

[PATCH 1/3] ASoC: sun4i-i2s: Add set_tdm_slot functionality

2018-01-24 Thread codekipper
From: Marcus Cooper Some codecs require a different amount of a bit clocks per frame than what is calculated by the sample width. Use the tdm slot bindings to provide this mechanism. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 23 +-- 1 file changed, 21 i

[PATCH 3/3] ASoC: sun4i-i2s: Add regmap field to sign extend sample

2018-01-24 Thread codekipper
From: Marcus Cooper On the newer SoCs this is set by default to transfer a 0 after each sample in each slot. Add the regmap field to configure this and set it so that it pads the sample with 0s. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 15 +++ 1 file changed,

[PATCH v5 3/8] ASoC: sun4i-i2s: bclk and lrclk polarity tidyup

2017-08-19 Thread codekipper
From: Marcus Cooper On newer SoCs the bit fields for the blck and lrclk polarity are in a different locations. Use regmap fields to set the polarity bits as intended. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 45 - 1 file changed

[PATCH v5 1/8] ASoC: sun4i-i2s: Add regmap fields for channels

2017-08-19 Thread codekipper
From: Marcus Cooper On the original i2s block the channel mapping and selection were configured for stereo audio by default: This is not the case with the newer SoCs and they are also located at different offsets. To support the newer SoC then regmap fields have been added to the quirks and thes

[PATCH v5 2/8] ASoC: sun4i-i2s: Add regfields for word size select and sample resolution

2017-08-19 Thread codekipper
From: Marcus Cooper On newer SoCs the location of the slot width select and sample resolution are different and also there is a bigger range of support. For the current supported rates then an offset is required. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai --- sound/soc/sunxi/sun4

[PATCH v5 5/8] ASoC: sun4i-i2s: Add regmap field to set DAI format

2017-08-19 Thread codekipper
From: Marcus Cooper On the newer SoCs the bits to configure the operational mode are located in a different register. Add a regmap field so that this location can be configured. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 15 --- 1 file changed, 12 insertions(+),

[PATCH v5 4/8] ASoC: sun4i-i2s: Add mclk enable regmap field

2017-08-19 Thread codekipper
From: Marcus Cooper The location of the mclk output enable bit is different on newer SoCs. Use a regmap field to enable it. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i

[PATCH v5 7/8] ASoC: sun4i-i2s: Update global enable with bitmask

2017-08-19 Thread codekipper
From: Marcus Cooper The default value of the config register is different on newer SoCs and therefore enabling/disabling with a register write will clear bits used to set the direction of the clock and frame pins. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai --- sound/soc/sunxi/sun4

[PATCH v5 0/8] ASoC: Add I2S support for Allwinner H3 SoCs

2017-08-19 Thread codekipper
audio DAC board To get i2s working some additional patches are required which will be delivered later. For now they have been pushed here https://github.com/codekipper/linux-sunxi/commits/sunxi-audio-h3 I don't own a A33 device which uses the i2s block for the audio codec so if someone could

[PATCH v5 6/8] ASoC: sun4i-i2s: Check for slave select bit

2017-08-19 Thread codekipper
From: Marcus Cooper The newer SoCs do not have this setting. Instead they set the pin direction. Add a check to see if the bit is valid and if so set it accordingly. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai --- sound/soc/sunxi/sun4i-i2s.c | 37 +--

[PATCH v5 8/8] ASoC: sun4i-i2s: Add support for H3

2017-08-19 Thread codekipper
From: Marcus Cooper The sun8i-h3 introduces a lot of changes to the i2s block such as different register locations, extended clock division and more operational modes. As we have to consider the earlier implementation then these changes need to be isolated. None of the new functionality has been

[PATCH v3 02/11] ASoC: sun4i-i2s: Add regmap config to quirks

2017-08-12 Thread codekipper
From: Marcus Cooper The newer SoCs have a larger range than the original SoC that this driver was developed for. By adding the regmap config to the quirks then the driver can initialise the managed register map correctly. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai --- sound/soc/su

[PATCH v3 00/11] ASoC: Add I2S support for Allwinner H3 SoCs

2017-08-12 Thread codekipper
audio DAC board To get i2s working some additional patches are required which will be delivered later. For now they have been pushed here https://github.com/codekipper/linux-sunxi/commits/sunxi-audio-h3 I don't own a A33 device which uses the i2s block for the audio codec so if someone could

[PATCH v3 04/11] ASoC: sun4i-i2s: Add regmap fields for channels

2017-08-12 Thread codekipper
From: Marcus Cooper On the original i2s block the channel mapping and selection were configured for stereo audio by default: This is not the case with the newer SoCs and they are also located at different offsets. To support the newer SoC then regmap fields have been added to the quirks and thes

[PATCH v3 07/11] ASoC: sun4i-i2s: Add mclk enable regmap field

2017-08-12 Thread codekipper
From: Marcus Cooper The location of the mclk output enable bit is different on newer SoCs. Use a regmap field to enable it. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/sound/soc/sunxi/

[PATCH v3 11/11] ASoC: sun4i-i2s: Add support for H3

2017-08-12 Thread codekipper
From: Marcus Cooper The sun8i-h3 introduces a lot of changes to the i2s block such as different register locations, extended clock division and more operational modes. As we have to consider the earlier implementation then these changes need to be isolated. None of the new functionality has been

[PATCH v3 05/11] ASoC: sun4i-i2s: Add regfields for word size select and sample resolution

2017-08-12 Thread codekipper
From: Marcus Cooper On newer SoCs the location of the slot width select and sample resolution are different and also there is a bigger range of support. For the current supported rates then an offset is required. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai --- sound/soc/sunxi/sun4

[PATCH v3 08/11] ASoC: sun4i-i2s: Add regmap field to set DAI format

2017-08-12 Thread codekipper
From: Marcus Cooper On the newer SoCs the bits to configure the operational mode are located in a different register. Add a regmap field so that this location can be configured. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 16 +--- 1 file changed, 13 insertions(+)

[PATCH v3 06/11] ASoC: sun4i-i2s: bclk and lrclk polarity tidyup

2017-08-12 Thread codekipper
From: Marcus Cooper On newer SoCs the bit fields for the blck and lrclk polarity are in a different locations. Use regmap fields to set the polarity bits as intended. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 47 - 1 file changed

[PATCH v3 10/11] ASoC: sun4i-i2s: Update global enable with bitmask

2017-08-12 Thread codekipper
From: Marcus Cooper The default value of the config register is different on newer SoCs and therefore enabling/disabling with a register write will clear bits used to set the direction of the clock and frame pins. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai --- sound/soc/sunxi/sun4

[PATCH v3 01/11] ASoC: sun4i-i2s: Add clkdiv offsets to quirks

2017-08-12 Thread codekipper
From: Marcus Cooper The BCLKDIV and MCLKDIV found on newer SoCs start from an offset of 1. Add the functionality to adjust the division values according to the needs to the device being used. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 8 1 file changed, 8 insertion

[PATCH v3 09/11] ASoC: sun4i-i2s: Check for slave select bit

2017-08-12 Thread codekipper
From: Marcus Cooper The newer SoCs do not have this setting. Instead they set the pin direction. Add a check to see if the bit is valid and if so set it accordingly. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai --- sound/soc/sunxi/sun4i-i2s.c | 37 +--

[PATCH v3 03/11] ASoC: sun4i-i2s: Add TX FIFO offset to quirks

2017-08-12 Thread codekipper
From: Marcus Cooper It has been seen that the newer SoCs have a different TX FIFO address. Add this to the quirks structure. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai --- sound/soc/sunxi/sun4i-i2s.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/s

[PATCH v3 01/12] ASoC: sun4i-i2s: Extend quirks scope

2017-07-29 Thread codekipper
From: Marcus Cooper In preparation for the changes required to support newer SoCs then quirks has been moved and also added to the device structure. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff

[PATCH v3 03/12] ASoC: sun4i-i2s: Add regmap config to quirks

2017-07-29 Thread codekipper
From: Marcus Cooper The newer SoCs have a larger range than the original SoC that this driver was developed for. By adding the regmap config to the quirks then the driver can initialise the managed register map correctly. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 10 ++

[PATCH v3 05/12] ASoC: sun4i-i2s: Add regmap fields for channels

2017-07-29 Thread codekipper
From: Marcus Cooper On the original i2s block the channel mapping and selection were configured for stereo audio by default: This is not the case with the newer SoCs and they are also located at different offsets. To support the newer SoC then regmap fields have been added to the quirks and thes

[PATCH v3 04/12] ASoC: sun4i-i2s: Add TX FIFO offset to quirks

2017-07-29 Thread codekipper
From: Marcus Cooper It has been seen that the newer SoCs have a different TX FIFO address. Add this to the quirks structure. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/soun

[PATCH v3 06/12] ASoC: sun4i-i2s: Add changes for wss and sr

2017-07-29 Thread codekipper
From: Marcus Cooper On newer SoCs the location of the slot width select and sample resolution are different and also there is a bigger range of support. For the current supported rates then an offset is required. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 31 ++

[PATCH v3 08/12] ASoC: sun4i-i2s: Add mclk enable regmap field

2017-07-29 Thread codekipper
From: Marcus Cooper The location of the mclk output enable bit is different on newer SoCs. Use a regmap field to enable it. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/sound/soc/sunxi/s

[PATCH v3 07/12] ASoC: sun4i-i2s: bclk and lrclk polarity tidyup

2017-07-29 Thread codekipper
From: Marcus Cooper On newer SoCs the bit fields for the blck and lrclk polarity are in a different locations. Use regmap fields to set the polarity bits as intended. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 45 - 1 file changed

[PATCH v3 12/12] ASoC: sun4i-i2s: Add support for H3

2017-07-29 Thread codekipper
From: Marcus Cooper The sun8i-h3 introduces a lot of changes to the i2s block such as different register locations, extended clock division and more operational modes. As we have to consider the earlier implementation then these changes need to be isolated. Signed-off-by: Marcus Cooper --- ...

[PATCH v3 11/12] ASoC: sun4i-i2s: Update global enable with bitmask

2017-07-29 Thread codekipper
From: Marcus Cooper The default value of the config register is different on newer SoCs and therefore enabling/disabling with a register write will clear bits used to set the direction of the clock and frame pins. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 7 --- 1 file

[PATCH v3 10/12] ASoC: sun4i-i2s: Check for slave select bit

2017-07-29 Thread codekipper
From: Marcus Cooper The newer SoCs do not have this setting. Instead they set the pin direction. Add a check to see if the bit is valid and if so set it accordingly. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 38 ++ 1 file changed, 22 ins

[PATCH v3 09/12] ASoC: sun4i-i2s: Add regmap field to set format

2017-07-29 Thread codekipper
From: Marcus Cooper On the newer SoCs the bits to configure the operational mode are located in a different register. Add a regmap field so that this location can be configured. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 15 --- 1 file changed, 12 insertions(+),

[PATCH v3 00/12] ASoC: Add I2S support for Allwinner H3 SoCs

2017-07-29 Thread codekipper
audio DAC board To get i2s working some additional patches are required which will be delivered later. For now they have been pushed here https://github.com/codekipper/linux-sunxi/commits/sunxi-audio-h3 I don't own a A33 device which uses the i2s block for the audio codec so if someone could

[PATCH v3 02/12] ASoC: sun4i-i2s: Add clkdiv offsets to quirks

2017-07-29 Thread codekipper
From: Marcus Cooper The BCLKDIV and MCLKDIV found on newer SoCs start from an offset of 1. Add the functionality to adjust the division values according to the needs to the device being used. Signed-off-by: Marcus Cooper --- sound/soc/sunxi/sun4i-i2s.c | 8 ++-- 1 file changed, 6 insertion

[PATCH v2 0/2] ASoC: Add I2S support for Allwinner H3 SoCs

2017-07-21 Thread codekipper
audio DAC board To get i2s working some additional patches are required which will be delivered later. For now they have been pushed here https://github.com/codekipper/linux-sunxi/commits/sunxi-audio-h3 I don't own a A33 device which uses the i2s block for the audio codec so if someone could

[PATCH v2 2/2] ASoC: sun4i-i2s: Add support for H3

2017-07-21 Thread codekipper
From: Marcus Cooper The sun8i-h3 introduces a lot of changes to the i2s block such as different register locations, extended clock division and more operational modes. As we have to consider the earlier implementation then these changes need to be isolated. Signed-off-by: Marcus Cooper --- ...

[PATCH v2 1/2] ASoC: sun4i-i2s: Add more quirks for newer SoCs

2017-07-21 Thread codekipper
From: Marcus Cooper In preparation for changing this driver to support newer SoC implementations then where needed there has been a switch from regmap_update_bits to regmap_field. Also included are adjustment variables although they are not set as no adjustment is required for the current support

[PATCH 2/3] ASoC: sun4i-i2s: Get startup to call set_fmt

2017-07-05 Thread codekipper
From: Marcus Cooper The set_fmt function pointer is called during probing and this is whilst the block is disabled. It is over writing the default register values with the same settings so isn't noticed. This wasn't a problem with the older SoCs but with the desire to reuse as much functionlity a

[PATCH 0/3] ASoC: Add I2S support for Allwinner H3 SoCs

2017-07-05 Thread codekipper
audio DAC board To get i2s working some additional patches are required which will be delivered later. For now they have been pushed here https://github.com/codekipper/linux-sunxi/commits/sunxi-audio-h3 Thanks in advance, CK Marcus Cooper (3): ASoC: sun4i-i2s: Add more quirks for newer SoCs

[PATCH 3/3] ASoC: sun4i-i2s: Add support for H3

2017-07-05 Thread codekipper
From: Marcus Cooper There are a lot of changes to the sun8i-h3 i2s block but not enough to warrant to a new driver. Signed-off-by: Marcus Cooper --- .../devicetree/bindings/sound/sun4i-i2s.txt| 2 + sound/soc/sunxi/sun4i-i2s.c| 339 - 2 fil

  1   2   >