ASoC: ti: davinci-mcasp: Fix the DIT mode and OMAP4 support
Subsystems (4)
v2 cover ASoC: ti: davinci-mcasp: Fix the DIT mode and OMAP4 support
Hi,
Changes since v1:
- Do not calculat that we allow one serializer in DIT mode, just set the max_active_serializers to 1.
it has been on my todo list for several years to support McASP on OMAP4 devices. For Galaxy Nexus we had an omap-mcasp driver (which was mostly a stripped down davinci-mcasp driver) to support what was needed on that specific phone + it's dock for S/PDIF (48KHz, 16bit, stereo).
Not many (if any) device available to test the DIT mode of McASP. I have used BeagleBone White (McASP1 AXR3 can be routed to a pin) to get the S/PDIF mode working then PandaES for OMAP4 support (on PandaES the gpio_121 is not used and the signal is routed to expansion J6 pin14).
In theory the McASP in OMAP5 should be working after this series, but the OMAP5 TRM is not public and I do not have one to check the addresses and see if there is a way to test it on omap5-uevm.
Mark, Tony:
The ASoC and dts patches can go via separate tree I felt that it is better if they are together, at least initially.
Nikolaus: fyi, this might be useful for Pyra?
Regards,
Péter
---
Peter Ujfalusi (5):
ASoC: ti: davinci-mcasp: Fix DIT mode support
ASoC: dt-bindings: davinci-mcasp: Add compatible string for OMAP4
ASoC: ti: davinci-mcasp: Add support for the OMAP4 version of McASP
ARM: dts: omap4-l4-abe: Correct sidle modes for McASP
ARM: dts: omap4-l4-abe: Add McASP configuration
.../bindings/sound/davinci-mcasp-audio.txt | 1 + arch/arm/boot/dts/omap4-l4-abe.dtsi | 39 ++-- include/linux/platform_data/davinci_asp.h | 1 + sound/soc/ti/Kconfig | 1 + sound/soc/ti/davinci-mcasp.c | 176 +++++++++++++++--- 5 files changed, 175 insertions(+), 43 deletions(-)
Signature · 1 line
2.32.0
PATCH v2 1/5 ASoC: ti: davinci-mcasp: Fix DIT mode support
The DIT mode support has not been tested due to lack of platform where it can be tested.
To be able to use the McASP on OMAP4/5 (only supporting DIT mode) we need to have DIT mode working in the McASP driver on a know platform. After hacking around (on BBW, mcasp1.axr1 can be routed out for this) it appeared that DIT mode is broken.
This patch fixes it up and 16/24 bit audio works along with passthrough, but I have only tested with DTS example and test files.
--- sound/soc/ti/davinci-mcasp.c | 150 ++++++++++++++++++++++++++++++----- 1 file changed, 129 insertions(+), 21 deletions(-)
sound/soc/ti/davinci-mcasp.c +129 -21
@@ -83,6 +83,8 @@ struct davinci_mcasp {struct snd_pcm_substream *substreams[2 ];unsigned int dai_fmt; +u32 iec958_status; +/* Audio can not be enabled due to missing parameter(s) */ bool missing_audio_param;
@@ -757,6 +759,9 @@ static int davinci_mcasp_set_tdm_slot(struct snd_soc_dai *dai, {struct davinci_mcasp *mcasp =snd_soc_dai_get_drvdata (dai); +if (mcasp->op_mode ==DAVINCI_MCASP_DIT_MODE ) +return 0 ; +dev_dbg (mcasp->dev,"%s() tx_mask 0x%08x rx_mask 0x%08x slots %d width %d\n" , __func__, tx_mask, rx_mask, slots, slot_width);
@@ -827,6 +832,20 @@ static int davinci_config_channel_size(struct davinci_mcasp *mcasp,mcasp_mod_bits (mcasp,DAVINCI_MCASP_RXFMT_REG ,RXROT (rx_rotate),RXROT (7 ));mcasp_set_reg (mcasp,DAVINCI_MCASP_RXMASK_REG , mask); + }else { +/* +* according to the TRM it should be TXROT=0, this one works: +* 16 bit to 23-8 (TXROT=6, rotate 24 bits) +* 24 bit to 23-0 (TXROT=0, rotate 0 bits) +* +* TXROT = 0 only works with 24bit samples +*/ + tx_rotate = (sample_width /4 +2 ) &0x7 ; + +mcasp_mod_bits (mcasp,DAVINCI_MCASP_TXFMT_REG ,TXROT (tx_rotate), +TXROT (7 )); +mcasp_mod_bits (mcasp,DAVINCI_MCASP_TXFMT_REG ,TXSSZ (15 ), +TXSSZ (0x0F )); }mcasp_set_reg (mcasp,DAVINCI_MCASP_TXMASK_REG , mask);
@@ -842,10 +861,16 @@ static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,u8 tx_ser =0 ;u8 rx_ser =0 ;u8 slots = mcasp->tdm_slots; -u8 max_active_serializers = (channels + slots -1 ) / slots; -u8 max_rx_serializers, max_tx_serializers; +u8 max_active_serializers, max_rx_serializers, max_tx_serializers;int active_serializers, numevt;u32 reg; + +/* In DIT mode we only allow maximum of one serializers for now */ +if (mcasp->op_mode ==DAVINCI_MCASP_DIT_MODE ) + max_active_serializers =1 ; +else + max_active_serializers = (channels + slots -1 ) / slots; +/* Default configuration */ if (mcasp->version <MCASP_VERSION_3 )mcasp_set_bits (mcasp,DAVINCI_MCASP_PWREMUMGT_REG ,MCASP_SOFT );
@@ -1031,16 +1056,18 @@ static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream,static int mcasp_dit_hw_param (struct davinci_mcasp *mcasp,unsigned int rate) { -u32 cs_value =0 ; -u8 *cs_bytes = (u8 *) &cs_value; +u8 *cs_bytes = (u8 *)&mcasp->iec958_status; -/* Set the TX format : 24 bit right rotation, 32 bit slot, Pad 0 -and LSB first */ -mcasp_set_bits (mcasp,DAVINCI_MCASP_TXFMT_REG ,TXROT (6 ) |TXSSZ (15 )); +if (!mcasp->dat_port) +mcasp_set_bits (mcasp,DAVINCI_MCASP_TXFMT_REG ,TXSEL ); +else +mcasp_clr_bits (mcasp,DAVINCI_MCASP_TXFMT_REG ,TXSEL );/* Set TX frame synch : DIT Mode, 1 bit width, internal, rising edge */ mcasp_set_reg (mcasp,DAVINCI_MCASP_TXFMCTL_REG ,AFSXE |FSXMOD (0x180 )); +mcasp_set_reg (mcasp,DAVINCI_MCASP_TXMASK_REG ,0xFFFF ); +/* Set the TX tdm : for all the slots */ mcasp_set_reg (mcasp,DAVINCI_MCASP_TXTDM_REG ,0xFFFFFFFF );
@@ -1049,16 +1076,8 @@ static int mcasp_dit_hw_param(struct davinci_mcasp *mcasp,mcasp_clr_bits (mcasp,DAVINCI_MCASP_XEVTCTL_REG ,TXDATADMADIS ); -/* Only 44100 and 48000 are valid, both have the same setting */ -mcasp_set_bits (mcasp,DAVINCI_MCASP_AHCLKXCTL_REG ,AHCLKXDIV (3 )); - -/* Enable the DIT */ -mcasp_set_bits (mcasp,DAVINCI_MCASP_TXDITCTL_REG ,DITEN ); -/* Set S/PDIF channel status bits */ - cs_bytes[0 ] =IEC958_AES0_CON_NOT_COPYRIGHT ; - cs_bytes[1 ] =IEC958_AES1_CON_PCM_CODER ; - + cs_bytes[3 ] &= ~IEC958_AES3_CON_FS ;switch (rate) {case 22050 : cs_bytes[3 ] |=IEC958_AES3_CON_FS_22050 ;
@@ -1088,12 +1107,15 @@ static int mcasp_dit_hw_param(struct davinci_mcasp *mcasp, cs_bytes[3 ] |=IEC958_AES3_CON_FS_192000 ;break ;default : -printk (KERN_WARNING "unsupported sampling rate: %d\n" , rate); +dev_err (mcasp->dev,"unsupported sampling rate: %d\n" , rate);return -EINVAL ; } -mcasp_set_reg (mcasp,DAVINCI_MCASP_DITCSRA_REG , cs_value); -mcasp_set_reg (mcasp,DAVINCI_MCASP_DITCSRB_REG , cs_value); +mcasp_set_reg (mcasp,DAVINCI_MCASP_DITCSRA_REG , mcasp->iec958_status); +mcasp_set_reg (mcasp,DAVINCI_MCASP_DITCSRB_REG , mcasp->iec958_status); + +/* Enable the DIT */ +mcasp_set_bits (mcasp,DAVINCI_MCASP_TXDITCTL_REG ,DITEN );return 0 ; }
@@ -1237,12 +1259,18 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,int slots = mcasp->tdm_slots;int rate =params_rate (params);int sbits =params_width (params); +unsigned int bclk_target;if (mcasp->slot_width) sbits = mcasp->slot_width; +if (mcasp->op_mode ==DAVINCI_MCASP_IIS_MODE ) + bclk_target = rate * sbits * slots; +else + bclk_target = rate *128 ; +davinci_mcasp_calc_clk_div (mcasp, mcasp->sysclk_freq, - rate * sbits * slots, true); + bclk_target, true); } ret = mcasp_common_hw_param(mcasp, substream->stream,
@@ -1598,6 +1626,77 @@ static const struct snd_soc_dai_ops davinci_mcasp_dai_ops = { .set_tdm_slot = davinci_mcasp_set_tdm_slot, }; +static int davinci_mcasp_iec958_info (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_info *uinfo) +{ + uinfo->type =SNDRV_CTL_ELEM_TYPE_IEC958 ; + uinfo->count =1 ; + +return 0 ; +} + +static int davinci_mcasp_iec958_get (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *uctl) +{ +struct snd_soc_dai *cpu_dai =snd_kcontrol_chip (kcontrol); +struct davinci_mcasp *mcasp =snd_soc_dai_get_drvdata (cpu_dai); + +memcpy (uctl->value.iec958.status, &mcasp->iec958_status, +sizeof (mcasp->iec958_status)); + +return 0 ; +} + +static int davinci_mcasp_iec958_put (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *uctl) +{ +struct snd_soc_dai *cpu_dai =snd_kcontrol_chip (kcontrol); +struct davinci_mcasp *mcasp =snd_soc_dai_get_drvdata (cpu_dai); + +memcpy (&mcasp->iec958_status, uctl->value.iec958.status, +sizeof (mcasp->iec958_status)); + +return 0 ; +} + +static int davinci_mcasp_iec958_con_mask_get (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_dai *cpu_dai =snd_kcontrol_chip (kcontrol); +struct davinci_mcasp *mcasp =snd_soc_dai_get_drvdata (cpu_dai); + +memset (ucontrol->value.iec958.status,0xff ,sizeof (mcasp->iec958_status)); +return 0 ; +} + +static const struct snd_kcontrol_new davinci_mcasp_iec958_ctls[] = { + { + .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | +SNDRV_CTL_ELEM_ACCESS_VOLATILE ), + .iface =SNDRV_CTL_ELEM_IFACE_PCM , + .name =SNDRV_CTL_NAME_IEC958 ("" ,PLAYBACK ,DEFAULT ), + .info = davinci_mcasp_iec958_info, + .get = davinci_mcasp_iec958_get, + .put = davinci_mcasp_iec958_put, + }, { + .access =SNDRV_CTL_ELEM_ACCESS_READ , + .iface =SNDRV_CTL_ELEM_IFACE_MIXER , + .name =SNDRV_CTL_NAME_IEC958 ("" ,PLAYBACK ,CON_MASK ), + .info = davinci_mcasp_iec958_info, + .get = davinci_mcasp_iec958_con_mask_get, + }, +}; + +static void davinci_mcasp_init_iec958_status (struct davinci_mcasp *mcasp) +{ +unsigned char *cs = (u8 *)&mcasp->iec958_status; + + cs[0 ] =IEC958_AES0_CON_NOT_COPYRIGHT |IEC958_AES0_CON_EMPHASIS_NONE ; + cs[1 ] =IEC958_AES1_CON_PCM_CODER ; + cs[2 ] =IEC958_AES2_CON_SOURCE_UNSPEC |IEC958_AES2_CON_CHANNEL_UNSPEC ; + cs[3 ] =IEC958_AES3_CON_CLOCK_1000PPM ; +} +static int davinci_mcasp_dai_probe (struct snd_soc_dai *dai) {struct davinci_mcasp *mcasp =snd_soc_dai_get_drvdata (dai);
@@ -1605,6 +1704,12 @@ static int davinci_mcasp_dai_probe(struct snd_soc_dai *dai) dai->playback_dma_data = &mcasp->dma_data[SNDRV_PCM_STREAM_PLAYBACK ]; dai->capture_dma_data = &mcasp->dma_data[SNDRV_PCM_STREAM_CAPTURE ]; +if (mcasp->op_mode ==DAVINCI_MCASP_DIT_MODE ) { +davinci_mcasp_init_iec958_status (mcasp); +snd_soc_add_dai_controls (dai, davinci_mcasp_iec958_ctls, +ARRAY_SIZE (davinci_mcasp_iec958_ctls)); + } +return 0 ; }
@@ -1651,7 +1756,8 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = { .channels_min = 1, .channels_max = 384, .rates = DAVINCI_MCASP_RATES, - .formats = DAVINCI_MCASP_PCM_FMTS, + .formats =SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE, }, .ops = &davinci_mcasp_dai_ops, },
@@ -1871,6 +1977,8 @@ static int davinci_mcasp_get_config(struct davinci_mcasp *mcasp, }else { mcasp->tdm_slots = pdata->tdm_slots; } + }else { + mcasp->tdm_slots =32 ; } mcasp->num_serializer = pdata->num_serializer;
Signature · 1 line
2.32.0
PATCH v2 2/5 ASoC: dt-bindings: davinci-mcasp: Add compatible string for OMAP4
In reply to Peter UjfalusiOMAP4 has one McASP instance with single serializer and supporting only DIT mode.
According to the TRM the DAT port needs to be accessed as specific offset compared to other devices where access to any part of the DAT region is valid.
To handle this constraint we need to introduce a new compatiple string for OMAP4.
--- Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +1 -0
@@ -6,6 +6,7 @@ Required properties: "ti,da830-mcasp-audio" : for both DA830 & DA850 platforms "ti,am33xx-mcasp-audio" : for AM33xx platforms (AM33xx, AM43xx, TI81xx) "ti,dra7-mcasp-audio" : for DRA7xx platforms + "ti,omap4-mcasp-audio" : for OMAP4 - reg : Should contain reg specifiers for the entries in the reg-names property. - reg-names : Should contain:
Signature · 1 line
2.32.0
PATCH v2 3/5 ASoC: ti: davinci-mcasp: Add support for the OMAP4 version of McASP
In reply to Peter UjfalusiFrom: Peter Ujfalusi <[email protected]>
There is a single McASP on OMAP4 (and OMAP5) which is configured to only support DIT playback mode on a single serializer.
Add 0x200 offset to DAT port address as the TRM suggests it.
--- include/linux/platform_data/davinci_asp.h | 1 + sound/soc/ti/Kconfig | 1 + sound/soc/ti/davinci-mcasp.c | 26 ++++++++++++++++++++--- 3 files changed, 25 insertions(+), 3 deletions(-)
include/linux/platform_data/davinci_asp.h +1 -0
@@ -96,6 +96,7 @@ enum {MCASP_VERSION_2 ,/* DA8xx/OMAPL1x */ MCASP_VERSION_3 ,/* TI81xx/AM33xx */ MCASP_VERSION_4 ,/* DRA7xxx */ + MCASP_VERSION_OMAP, /* OMAP4/5 */ }; enum mcbsp_clk_input_pin {
sound/soc/ti/Kconfig +1 -0
@@ -35,6 +35,7 @@ config SND_SOC_DAVINCI_MCASP various Texas Instruments SoCs like: - daVinci devices - Sitara line of SoCs (AM335x, AM438x, etc) + - OMAP4 - DRA7x devices - Keystone devices - K3 devices (am654, j721e)
sound/soc/ti/davinci-mcasp.c +23 -3
@@ -1794,6 +1794,12 @@ static struct davinci_mcasp_pdata dra7_mcasp_pdata = { .version = MCASP_VERSION_4, }; +static struct davinci_mcasp_pdata omap_mcasp_pdata = { + .tx_dma_offset =0x200 , + .rx_dma_offset =0 , + .version =MCASP_VERSION_OMAP , +}; +static const struct of_device_id mcasp_dt_ids[] = { { .compatible ="ti,dm646x-mcasp-audio" ,
@@ -1811,6 +1817,10 @@ static const struct of_device_id mcasp_dt_ids[] = { .compatible = "ti,dra7-mcasp-audio", .data = &dra7_mcasp_pdata, }, + { + .compatible = "ti,omap4-mcasp-audio", + .data = &omap_mcasp_pdata, + }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, mcasp_dt_ids);
@@ -2350,10 +2360,17 @@ static int davinci_mcasp_probe(struct platform_device *pdev) dma_data = &mcasp->dma_data[SNDRV_PCM_STREAM_PLAYBACK ]; dma_data->filter_data ="tx" ; -if (dat) +if (dat) { dma_data->addr = dat->start; -else +/* +* According to the TRM there should be 0x200 offset added to +* the DAT port address +*/ +if (mcasp->version ==MCASP_VERSION_OMAP ) + dma_data->addr +=davinci_mcasp_txdma_offset (mcasp->pdata); + }else { dma_data->addr = mem->start +davinci_mcasp_txdma_offset (mcasp->pdata); + }/* RX is not valid in DIT mode */
@@ -2418,7 +2435,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev) ret =edma_pcm_platform_register (&pdev->dev);break ;case PCM_SDMA : - ret =sdma_pcm_platform_register (&pdev->dev,"tx" ,"rx" ); +if (mcasp->op_mode ==DAVINCI_MCASP_IIS_MODE ) + ret =sdma_pcm_platform_register (&pdev->dev,"tx" ,"rx" ); +else + ret =sdma_pcm_platform_register (&pdev->dev,"tx" ,NULL );break ;case PCM_UDMA : ret =udma_pcm_platform_register (&pdev->dev);
Signature · 1 line
2.32.0
PATCH v2 4/5 ARM: dts: omap4-l4-abe: Correct sidle modes for McASP
In reply to Peter UjfalusiMcASP only supports Force-idle, No-idle and Smart-idle modes
--- arch/arm/boot/dts/omap4-l4-abe.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/boot/dts/omap4-l4-abe.dtsi +1 -2
@@ -192,8 +192,7 @@ target-module@28000 { /* 0x40128000, ap 8 08.0 */ reg-names = "rev", "sysc"; ti,sysc-sidle = <SYSC_IDLE_FORCE>, <SYSC_IDLE_NO>, - <SYSC_IDLE_SMART>, - <SYSC_IDLE_SMART_WKUP>; + <SYSC_IDLE_SMART>; /* Domains (V, P, C): iva, abe_pwrdm, abe_clkdm */ clocks = <&abe_clkctrl OMAP4_MCASP_CLKCTRL 0>; clock-names = "fck";
Signature · 1 line
2.32.0
PATCH v2 5/5 ARM: dts: omap4-l4-abe: Add McASP configuration
In reply to Peter UjfalusiOMAP4 has a single McASP instance with single serializer and locked for DIT mode.
To be able to enable the support the following fixes needed:
- Add the DAT port ranges to the target module's ranges
- SIDLE mode must be disabled as it is not working with McASP most likely module integration issue with McASP
We can already fill in the op-mode and serial-dir for McASP as it only supports this configuration, but keep the module disabled as there is no known device available where it is used.
--- arch/arm/boot/dts/omap4-l4-abe.dtsi | 38 +++++++++++++++-------------- 1 file changed, 20 insertions(+), 18 deletions(-)
arch/arm/boot/dts/omap4-l4-abe.dtsi +20 -18
@@ -186,36 +186,38 @@ mcbsp3: mcbsp@0 { }; target-module@28000 { /* 0x40128000, ap 8 08.0 */ + /* 0x4012a000, ap 10 0a.0 */ compatible = "ti,sysc-mcasp", "ti,sysc"; reg = <0x28000 0x4>, <0x28004 0x4>; reg-names = "rev", "sysc"; ti,sysc-sidle = <SYSC_IDLE_FORCE>, - <SYSC_IDLE_NO>, - <SYSC_IDLE_SMART>; + <SYSC_IDLE_NO>; /* Domains (V, P, C): iva, abe_pwrdm, abe_clkdm */ clocks = <&abe_clkctrl OMAP4_MCASP_CLKCTRL 0>; clock-names = "fck"; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x28000 0x1000>, - <0x49028000 0x49028000 0x1000>; - - /* - * Child device unsupported by davinci-mcasp. At least - * RX path is disabled for omap4, and only DIT mode - * works with no I2S. See also old Android kernel - * omap-mcasp driver for more information. - */ - }; - - target-module@2a000 { /* 0x4012a000, ap 10 0a.0 */ - compatible = "ti,sysc"; - status = "disabled"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0x0 0x2a000 0x1000>, + <0x49028000 0x49028000 0x1000>, + <0x2000 0x2a000 0x1000>, <0x4902a000 0x4902a000 0x1000>; + + mcasp0: mcasp@0 { + compatible = "ti,omap4-mcasp-audio"; + reg = <0x0 0x2000>, + <0x4902a000 0x1000>; /* L3 data port */ + reg-names = "mpu","dat"; + interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tx"; + dmas = <&sdma 8>; + dma-names = "tx"; + clocks = <&abe_clkctrl OMAP4_MCASP_CLKCTRL 0>; + clock-names = "fck"; + op-mode = <1>; /* MCASP_DIT_MODE */ + serial-dir = < 1 >; /* 1 TX serializers */ + status = "disabled"; + }; }; target-module@2e000 { /* 0x4012e000, ap 12 0c.0 */
Signature · 1 line
2.32.0
Mark Brown
maintainerQuoted 3 lines · Peter Ujfalusi
Mark, Tony:
The ASoC and dts patches can go via separate tree I felt that it is better if they are together, at least initially.
I'm happy to take both through ASoC? The patches look fine to me.
Hi Mark, Tony,
Quoted 7 lines · Mark Brown
Quoted 3 lines · Peter Ujfalusi
Mark, Tony:
The ASoC and dts patches can go via separate tree I felt that it is better if they are together, at least initially.I'm happy to take both through ASoC? The patches look fine to me.
Tony prefers if I leave the TRM documented (but not working) Smart-idle mode intact in DT for the McASP and add some quirk via drivers/bus/ti-sysc.c.
Tony, can you confirm it?
The ASoC patches are not affected by this, it is just that we need to block SIDLE mode in a different way than how I did it in the last patch.
I'll take a look on how to implement the needed quirk for the McASP module, then I can send the dts+ti-sysc patch to linux-omap.
Signature · 1 line
Péter
Quoted 9 lines · Péter Ujfalusi
Hi Mark, Tony,
Quoted 6 lines · Mark Brown
Quoted 3 lines · Peter Ujfalusi
Mark, Tony:
The ASoC and dts patches can go via separate tree I felt that it is better if they are together, at least initially.
Quoted 6 lines
Quoted 1 line
I'm happy to take both through ASoC? The patches look fine to me.
Tony prefers if I leave the TRM documented (but not working) Smart-idle mode intact in DT for the McASP and add some quirk via
drivers/bus/ti-sysc.c.
Tony, can you confirm it?
Yes let's keep the smart-idle in dts if it's documented in the TRM. And let's just add a line to drivers/bus/ti-sysc.c for a McASP quirk.
Quoted 5 lines
The ASoC patches are not affected by this, it is just that we need to block SIDLE mode in a different way than how I did it in the last patch.
I'll take a look on how to implement the needed quirk for the McASP module, then I can send the dts+ti-sysc patch to linux-omap.
OK sounds good to me.
Regards,
Tony
Mark Brown
maintainerQuoted 7 lines · Tony Lindgren
Quoted 5 lines
The ASoC patches are not affected by this, it is just that we need to block SIDLE mode in a different way than how I did it in the last patch.
I'll take a look on how to implement the needed quirk for the McASP module, then I can send the dts+ti-sysc patch to linux-omap.
OK sounds good to me.
So should I queue the ASoC patches and then let the DT patches go via Tony's tree?
Quoted 5 lines · Mark Brown
Quoted 2 lines · Tony Lindgren
Quoted 2 lines
The ASoC patches are not affected by this, it is just that we need to block SIDLE mode in a different way than how I did it in the last patch.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I'll take a look on how to implement the needed quirk for the McASP module, then I can send the dts+ti-sysc patch to linux-omap.
OK sounds good to me.
So should I queue the ASoC patches and then let the DT patches go via Tony's tree?
Yes, please. I don't know when I will have time to revisit the DT part.
Signature · 1 line
Péter
Mark Brown
maintainerRe: (subset) [PATCH v2 0/5] ASoC: ti: davinci-mcasp: Fix the DIT mode and OMAP4 support
In reply to Peter UjfalusiQuoted 11 lines · Peter Ujfalusi
Changes since v1:
- Do not calculat that we allow one serializer in DIT mode, just set themax_active_serializersto 1.Reported-by kernel test robot <[email protected]>it has been on my todo list for several years to support McASP on OMAP4 devices. For Galaxy Nexus we had an omap-mcasp driver (which was mostly a stripped down davinci-mcasp driver) to support what was needed on that specific phone + it's dock for S/PDIF (48KHz, 16bit, stereo).
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/5] ASoC: ti: davinci-mcasp: Fix DIT mode support
commit: bbdd3f4dbe81e19b9123bc54e23ed54517615524
[2/5] ASoC: dt-bindings: davinci-mcasp: Add compatible string for OMAP4
commit: 5dcd276e1525e0c7ae7aa1f0426b6343ebf994e0
[3/5] ASoC: ti: davinci-mcasp: Add support for the OMAP4 version of McASP
commit: 0238bcf80e972f2ce25d767e54f89a9e49773f6eAll being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark